#include <amxmodx>
#include <cstrike>
#include <hamsandwich>
#include <fakemeta_util>
#include <fun>
#define INVISIBLE 180
#define SPEED 450.0
#define GRAVITY 0.5
#define HEALTH 250
#define ARMOR 250
enum _:SKILLS_COUNT
{
SKILL_INVISIBLE,
SKILL_SPEED,
SKILL_GRAVITY,
SKILL_ASIMOV,
SKILL_WEAPONS,
SKILL_HP,
SKILL_ARMOR
}
new UserSkill[33][SKILLS_COUNT];
new Ham:Ham_Player_ResetMaxSpeed = Ham_Item_PreFrame;
new MenuCan[33];
stock reset_skills(id) for(new i = 0; i < SKILLS_COUNT; i++) UserSkill[id][i] = 0;
public plugin_init()
{
register_plugin("[CSDM] IMPERATOR Menu", "1.0", "Anonymous");
RegisterHam(Ham_Spawn, "player", "fw_PlayerSpawn", 1);
register_clcmd("imperator_menu", "clcmd_vip_menu");
RegisterHam(Ham_Player_ResetMaxSpeed, "player", "fw_ResetMaxSpeed_Post", 1);
RegisterHam(Ham_TakeDamage, "player", "fw_TakeDamage");
register_message(get_user_msgid("CurWeapon"), "message_cur_weapon");
}
public client_authorized(id)
{
reset_skills(id);
}
public fw_ResetMaxSpeed_Post(id)
{
if(!is_user_alive(id)) return;
if(UserSkill[id][SKILL_SPEED] == 1) set_user_maxspeed(id, SPEED);
}
public fw_PlayerSpawn(id)
{
if(!is_user_alive(id)) return;
reset_skills(id);
set_user_gravity(id, 1.0);
set_user_rendering(id);
MenuCan[id] = 2;
}
public clcmd_vip_menu(id)
{
if(!(get_user_flags(id) & ADMIN_SLAY)) return PLUGIN_CONTINUE;
if(MenuCan[id] < 1) return PLUGIN_HANDLED;
static szTemp[48];
formatex(szTemp, 47, "rИмператор меню [dОсталось: %dr]", MenuCan[id]);
new menu = menu_create(szTemp, "vip_menu_handle");
menu_additem(menu, "Вкл. Невидимость");
menu_additem(menu, "Вкл. Скорость");
menu_additem(menu, "Вкл. Гравитацию");
menu_additem(menu, "Взять HP y[r+250y]");
menu_additem(menu, "Взять Броню y[r+250y]");
menu_additem(menu, "Взять d[Базуку]");
menu_additem(menu, "Взять d[Гр Шок]");
menu_setprop(menu, MPROP_EXITNAME, "Выход");
menu_display(id, menu, 0);
return PLUGIN_HANDLED;
}
public vip_menu_handle(id, menu, item)
{
if(item == MENU_EXIT) return PLUGIN_HANDLED;
if(!is_user_alive(id)) return PLUGIN_HANDLED;
if(MenuCan[id] < 1) return PLUGIN_HANDLED;
switch(item)
{
case 0:
{
if(UserSkill[id][SKILL_INVISIBLE] == 0)
{
UserSkill[id][SKILL_INVISIBLE] = 1;
set_user_rendering(id, kRenderFxGlowShell, 0, 0, 0, kRenderTransAlpha, INVISIBLE);
MenuCan[id] -= 1;
}
else client_print(id, print_chat, "У вас уже есть невидимость");
}
case 1:
{
if(UserSkill[id][SKILL_SPEED] == 0)
{
UserSkill[id][SKILL_SPEED] = 1;
ExecuteHamB(Ham_Player_ResetMaxSpeed, id);
MenuCan[id] -= 1;
}
else client_print(id, print_chat, "У вас уже есть скорость");
}
case 2:
{
if(UserSkill[id][SKILL_GRAVITY] == 0)
{
UserSkill[id][SKILL_GRAVITY] = 1;
set_user_gravity(id, GRAVITY);
MenuCan[id] -= 1;
}
else client_print(id, print_chat, "У вас уже есть гравитация");
}
case 3:
{
if(UserSkill[id][SKILL_HP] == 0)
{
UserSkill[id][SKILL_HP] = 1;
set_user_health(id, (get_user_health(id) + HEALTH));
MenuCan[id] -= 1;
}
else client_print(id, print_chat, "Вы уже брали здоровье");
}
case 4:
{
if(UserSkill[id][SKILL_ARMOR] == 0)
{
UserSkill[id][SKILL_ARMOR] = 1;
set_user_armor(id, (get_user_armor(id) + ARMOR));
MenuCan[id] -= 1;
}
else client_print(id, print_chat, "Вы уже брали броню");
}
case 5:
{
if(UserSkill[id][SKILL_WEAPONS] == 0)
{
UserSkill[id][SKILL_WEAPONS] = 1;
client_cmd(id, "amx_bazooka2325655s4242");
MenuCan[id] -= 1;
}
else client_print(id, print_chat, "У вас уже есть Базука");
}
case 6:
{
if(UserSkill[id][SKILL_ASIMOV] == 0)
{
UserSkill[id][SKILL_WEAPONS] = 1;
client_cmd(id, "shopgrenade_o");
MenuCan[id] -= 1;
}
else client_print(id, print_chat, "У вас уже есть Базука");
}
}
menu_destroy(menu);
return PLUGIN_HANDLED;
}
stock fm_cs_get_current_weapon_ent(id)
{
if (pev_valid(id) != 2)
return -1;
return get_pdata_cbase(id, 373, 5);
}
; Ham Sandwich module config file.
;
; IMPORTANT: It is highly suggested that you do not modify this file unless
; you know _exactly_ what you are doing!
;
; NOTE: Just because a mod contains a function does not means it will work
; as expected. If, for example, HamKilled() does not work as you think
; it should in Counter-Strike DO NOT FILE A BUG REPORT. This just
; exposes the function for you, whether or not it works, or how it
; works is up to plugin authors to figure out.
;
; NOTE: If a mod is missing keys for a certain native, that particular native
; will not be loaded! Example: Say CS is missing the "takedamage" index
; but has the use and pev indexes. The HamUse and HamePdataCbase natives
; will be registered, but the HamTakeDamage native will not register.
; In addition, any attempts to hook a function who's key is missing will
; result in the plugin failing.
;
; NOTE: The base key is only needed for the linux configs.
;
; NOTE: Any keys that begin with a modname (eg: cstrike_restart) will,
; obviously, only work on that mod and all mirrors of it (eg: czero).
;
; NOTE: If you change this file while the module is already loaded, you will
; need to restart the server for the changes to take effect. Changes to
; this file before the module is loaded will take effect when the module
; loads.
;
; NOTE: All of these offsets and settings are for the latest (at the time of
; release) legitimate version of the mod. However, there is a _chance_
; that they will work on older (and even newer) versions.
; eg: If they work on non-Steam CS 1.6 this is coincidental, if they do
; not work on non-Steam CS 1.6 this will not be officially fixed.
;
; Mirrors: These take the name of one mod, and copy all of its data to another
; name. An example of a use for this would be cstrike and czero: they
; use the same binary so all of its vtable offsets are guaranteed to
; be identical. Mirrors should always come first in the file!
;
; Version: $Id: hamdata.ini 3687 2008-03-04 18:51:35Z sawce $
@mirror cstrike czero
@mirror ns nsp
; TODO: check these - all are estimates
@section cstrike linux
pev 4
base 0x0
spawn 0
precache 1
keyvalue 3
objectcaps 6
activate 7
setobjectcollisionbox 8
classify 9
deathnotice 10
traceattack 11
takedamage 12
takehealth 13
killed 14
bloodcolor 15
tracebleed 16
istriggered 17
mymonsterpointer 18
mysquadmonsterpointer 19
gettogglestate 20
addpoints 21
addpointstoteam 22
addplayeritem 23
removeplayeritem 24
giveammo 25
getdelay 26
ismoving 27
overridereset 28
damagedecal 29
settogglestate 30
startsneaking 31
stopsneaking 32
oncontrols 33
issneaking 34
isalive 35
isbspmodel 36
reflectgauss 37
hastarget 38
isinworld 39
isplayer 40
isnetclient 41
teamid 42
getnexttarget 43
think 44
touch 45
use 46
blocked 47
respawn 48
updateowner 49
fbecomeprone 50
center 51
eyeposition 52
earposition 53
bodytarget 54
illumination 55
fvisible 56
fvecvisible 57
player_jump 76
player_duck 77
player_prethink 78
player_postthink 79
player_getgunposition 80
player_shouldfadeondeath 66
player_impulsecommands 83
player_updateclientdata 82
item_addtoplayer 59
item_addduplicate 60
item_getiteminfo 61
item_candeploy 62
item_deploy 64
item_canholster 66
item_holster 67
item_updateiteminfo 68
item_preframe 69
item_postframe 70
item_drop 71
item_kill 72
item_attachtoplayer 73
item_primaryammoindex 74
item_secondaryammoindex 75
item_updateclientdata 76
item_getweaponptr 77
item_itemslot 79
weapon_extractammo 80
weapon_extractclipammo 81
weapon_addweapon 82
weapon_playemptysound 83
weapon_resetemptysound 84
weapon_sendweaponanim 85
weapon_isusable 86
weapon_primaryattack 87
weapon_secondaryattack 88
weapon_reload 89
weapon_weaponidle 90
weapon_retireweapon 91
weapon_shouldweaponidle 92
weapon_usedecrement 93
cstrike_restart 2
cstrike_roundrespawn 84
cstrike_item_candrop 63
cstrike_item_getmaxspeed 78
@end
@section cstrike windows
pev 4
base 0x0
spawn 0
precache 1
keyvalue 3
objectcaps 6
activate 7
setobjectcollisionbox 8
classify 9
deathnotice 10
traceattack 11
takedamage 12
takehealth 13
killed 14
bloodcolor 15
tracebleed 16
istriggered 17
mymonsterpointer 18
mysquadmonsterpointer 19
gettogglestate 20
addpoints 21
addpointstoteam 22
addplayeritem 23
removeplayeritem 24
giveammo 25
getdelay 26
ismoving 27
overridereset 28
damagedecal 29
settogglestate 30
startsneaking 31
stopsneaking 32
oncontrols 33
issneaking 34
isalive 35
isbspmodel 36
reflectgauss 37
hastarget 38
isinworld 39
isplayer 40
isnetclient 41
teamid 42
getnexttarget 43
think 44
touch 45
use 46
blocked 47
respawn 48
updateowner 49
fbecomeprone 50
center 51
eyeposition 52
earposition 53
bodytarget 54
illumination 55
fvisible 56
fvecvisible 57
player_jump 76
player_duck 77
player_prethink 78
player_postthink 79
player_getgunposition 80
player_shouldfadeondeath 66
player_impulsecommands 83
player_updateclientdata 82
item_addtoplayer 59
item_addduplicate 60
item_getiteminfo 61
item_candeploy 62
item_deploy 64
item_canholster 66
item_holster 67
item_updateiteminfo 68
item_preframe 69
item_postframe 70
item_drop 71
item_kill 72
item_attachtoplayer 73
item_primaryammoindex 74
item_secondaryammoindex 75
item_updateclientdata 76
item_getweaponptr 77
item_itemslot 79
weapon_extractammo 80
weapon_extractclipammo 81
weapon_addweapon 82
weapon_playemptysound 83
weapon_resetemptysound 84
weapon_sendweaponanim 85
weapon_isusable 86
weapon_primaryattack 87
weapon_secondaryattack 88
weapon_reload 89
weapon_weaponidle 90
weapon_retireweapon 91
weapon_shouldweaponidle 92
weapon_usedecrement 93
cstrike_restart 2
cstrike_roundrespawn 84
cstrike_item_candrop 63
cstrike_item_getmaxspeed 78
@end
@section cstrike mac
pev 4
base 0x0
spawn 0
precache 1
keyvalue 3
objectcaps 6
activate 7
setobjectcollisionbox 8
classify 9
deathnotice 10
traceattack 11
takedamage 12
takehealth 13
killed 14
bloodcolor 15
tracebleed 16
istriggered 17
mymonsterpointer 18
mysquadmonsterpointer 19
gettogglestate 20
addpoints 21
addpointstoteam 22
addplayeritem 23
removeplayeritem 24
giveammo 25
getdelay 26
ismoving 27
overridereset 28
damagedecal 29
settogglestate 30
startsneaking 31
stopsneaking 32
oncontrols 33
issneaking 34
isalive 35
isbspmodel 36
reflectgauss 37
hastarget 38
isinworld 39
isplayer 40
isnetclient 41
teamid 42
getnexttarget 43
think 44
touch 45
use 46
blocked 47
respawn 48
updateowner 49
fbecomeprone 50
center 51
eyeposition 52
earposition 53
bodytarget 54
illumination 55
fvisible 56
fvecvisible 57
player_jump 76
player_duck 77
player_prethink 78
player_postthink 79
player_getgunposition 80
player_shouldfadeondeath 66
player_impulsecommands 83
player_updateclientdata 82
item_addtoplayer 59
item_addduplicate 60
item_getiteminfo 61
item_candeploy 62
item_deploy 64
item_canholster 66
item_holster 67
item_updateiteminfo 68
item_preframe 69
item_postframe 70
item_drop 71
item_kill 72
item_attachtoplayer 73
item_primaryammoindex 74
item_secondaryammoindex 75
item_updateclientdata 76
item_getweaponptr 77
item_itemslot 79
weapon_extractammo 80
weapon_extractclipammo 81
weapon_addweapon 82
weapon_playemptysound 83
weapon_resetemptysound 84
weapon_sendweaponanim 85
weapon_isusable 86
weapon_primaryattack 87
weapon_secondaryattack 88
weapon_reload 89
weapon_weaponidle 90
weapon_retireweapon 91
weapon_shouldweaponidle 92
weapon_usedecrement 93
cstrike_restart 2
cstrike_roundrespawn 84
cstrike_item_candrop 63
cstrike_item_getmaxspeed 78
@end
@section dod linux
pev 0
base 0x154
spawn 5
precache 6
keyvalue 7
objectcaps 10
activate 11
objectcollisionbox 14
classify 15
deathnotice 16
traceattack 19
takedamage 20
takehealth 21
killed 22
bloodcolor 23
tracebleed 24
mymonsterpointer 25
mysquadmonsterpointer 26
gettogglestate 27
addpoints 28
addpointstoteam 29
addplayeritem 30
removeplayeritem 31
giveammo 32
getdelay 33
ismoving 34
overridereset 35
damagedecal 36
settogglestate 37
startsneaking 38
stopsneaking 39
oncontrols 40
issneaking 41
isalive 42
isbspmodel 43
reflectgauss 44
hastarget 45
isinworld 46
isplayer 47
isnetclient 48
teamid 49
getnexttarget 50
think 51
touch 52
use 53
blocked 54
respawn 55
updateowner 56
fbecomeprone 57
center 58
eyeposition 59
earposition 60
bodytarget 61
illumination 62
fvisible 63
fvecvisible 64
player_jump 136
player_duck 137
player_prethink 134
player_postthink 135
player_getgunposition 128
player_shouldfadeondeath 68
player_impulsecommands 139
player_updateclientdata 138
item_addtoplayer 66
item_addduplicate 67
item_getiteminfo 68
item_candeploy 69
item_deploy 70
item_canholster 75
item_holster 76
item_updateiteminfo 77
item_preframe 78
item_postframe 79
item_drop 80
item_kill 81
item_attachtoplayer 82
item_primaryammoindex 83
item_secondaryammoindex 84
item_updateclientdata 85
item_getweaponptr 86
item_itemslot 87
weapon_extractammo 88
weapon_extractclipammo 89
weapon_addweapon 90
weapon_playemptysound 91
weapon_resetemptysound 92
weapon_sendweaponanim 93
weapon_isusable 94
weapon_primaryattack 104
weapon_secondaryattack 105
weapon_reload 106
weapon_weaponidle 107
weapon_retireweapon 108
weapon_shouldweaponidle 109
weapon_usedecrement 110
dod_roundrespawn 2
dod_roundrespawnent 3
dod_roundstore 4
dod_areasetindex 12
dod_areasendstatus 13
dod_getstate 17
dod_getstateent 18
dod_item_candrop 72
@end
@section dod windows
pev 4
base 0x0
spawn 3
precache 4
keyvalue 5
objectcaps 8
activate 9
objectcollisionbox 12
classify 13
deathnotice 14
traceattack 17
takedamage 18
takehealth 19
killed 20
bloodcolor 21
tracebleed 22
mymonsterpointer 23
mysquadmonsterpointer 24
gettogglestate 25
addpoints 26
addpointstoteam 27
addplayeritem 28
removeplayeritem 29
giveammo 30
getdelay 31
ismoving 32
overridereset 33
damagedecal 34
settogglestate 35
startsneaking 36
stopsneaking 37
oncontrols 48
issneaking 39
isalive 40
isbspmodel 41
reflectgauss 42
hastarget 43
isinworld 44
isplayer 45
isnetclient 46
teamid 47
getnexttarget 48
think 49
touch 50
use 51
blocked 52
respawn 53
updateowner 54
fbecomeprone 55
center 56
eyeposition 57
earposition 58
bodytarget 59
illumination 60
fvisible 61
fvecvisible 62
player_jump 134
player_duck 135
player_prethink 132
player_postthink 133
player_getgunposition 126
player_shouldfadeondeath 66
player_impulsecommands 137
player_updateclientdata 136
item_addtoplayer 64
item_addduplicate 65
item_getiteminfo 66
item_candeploy 67
item_deploy 68
item_canholster 73
item_holster 74
item_updateiteminfo 75
item_preframe 76
item_postframe 77
item_drop 78
item_kill 79
item_attachtoplayer 80
item_primaryammoindex 81
item_secondaryammoindex 82
item_updateclientdata 83
item_getweaponptr 84
item_itemslot 85
weapon_extractammo 86
weapon_extractclipammo 87
weapon_addweapon 88
weapon_playemptysound 89
weapon_resetemptysound 90
weapon_sendweaponanim 91
weapon_isusable 92
weapon_primaryattack 102
weapon_secondaryattack 103
weapon_reload 104
weapon_weaponidle 105
weapon_retireweapon 106
weapon_shouldweaponidle 107
weapon_usedecrement 108
dod_roundrespawn 0
dod_roundrespawnent 1
dod_roundstore 2
dod_areasetindex 10
dod_areasendstatus 11
dod_getstate 15
dod_getstateent 16
dod_item_candrop 70
@end
; TFC Does not have the following "standard" entries in its vtable:
; addpoints, addpointstoteam
@section tfc linux
pev 0
base 0x470
spawn 3
precache 4
keyvalue 5
objectcaps 8
activate 9
setobjectcollisionbox 10
classify 11
deathnotice 12
traceattack 13
takedamage 14
takehealth 15
killed 16
bloodcolor 17
tracebleed 18
istriggered 19
mymonsterpointer 20
mysquadmonsterpointer 21
gettogglestate 22
addplayeritem 23
removeplayeritem 24
giveammo 25
getdelay 26
ismoving 27
overridereset 28
damagedecal 29
settogglestate 30
startsneaking 31
stopsneaking 32
oncontrols 33
issneaking 34
isalive 35
isbspmodel 36
reflectgauss 37
hastarget 38
isinworld 39
isplayer 40
isnetclient 41
getnexttarget 43
think 44
touch 45
use 46
blocked 47
respawn 48
updateowner 49
fbecomeprone 50
center 51
eyeposition 52
earposition 53
bodytarget 54
illumination 55
fvisible 56
fvecvisible 57
player_jump 135
player_duck 136
player_prethink 137
player_postthink 138
player_shouldfadeondeath 69
player_impulsecommands 139
item_addtoplayer 67
item_addduplicate 68
item_getiteminfo 70
item_candeploy 71
item_deploy 72
item_canholster 73
item_holster 74
item_updateiteminfo 75
item_preframe 76
item_postframe 77
item_drop 78
item_kill 79
item_attachtoplayer 80
item_primaryammoindex 81
item_secondaryammoindex 82
item_updateclientdata 83
item_getweaponptr 84
item_itemslot 69
weapon_extractammo 85
weapon_extractclipammo 86
weapon_addweapon 87
weapon_playemptysound 88
weapon_resetemptysound 89
weapon_sendweaponanim 90
weapon_isusable 91
weapon_primaryattack 92
weapon_secondaryattack 93
weapon_reload 94
weapon_weaponidle 95
weapon_retireweapon 96
weapon_shouldweaponidle 97
tfc_engineeruse 58
tfc_finished 59
tfc_empexplode 60
tfc_calcempdmgrad 61
tfc_takeempblast 62
tfc_empremove 63
tfc_takeconcussionblast 64
tfc_concuss 65
@end
@section tfc windows
pev 4
base 0x0
spawn 1
precache 2
keyvalue 3
objectcaps 6
activate 7
setobjectcollisionbox 8
classify 9
deathnotice 10
traceattack 11
takedamage 12
takehealth 13
killed 14
bloodcolor 15
tracebleed 16
istriggered 17
mymonsterpointer 18
mysquadmonsterpointer 19
gettogglestate 20
addplayeritem 21
removeplayeritem 22
giveammo 23
getdelay 24
ismoving 25
overridereset 26
damagedecal 27
settogglestate 28
startsneaking 29
stopsneaking 30
oncontrols 31
issneaking 32
isalive 33
isbspmodel 34
reflectgauss 35
hastarget 36
isinworld 37
isplayer 38
isnetclient 39
getnexttarget 41
think 42
touch 43
use 44
blocked 45
respawn 46
updateowner 47
fbecomeprone 48
center 49
eyeposition 50
earposition 51
bodytarget 52
illumination 53
fvisible 54
fvecvisible 55
player_jump 133
player_duck 134
player_prethink 135
player_postthink 136
player_shouldfadeondeath 67
player_impulsecommands 137
item_addtoplayer 65
item_addduplicate 66
item_getiteminfo 68
item_candeploy 69
item_deploy 70
item_canholster 71
item_holster 72
item_updateiteminfo 73
item_preframe 74
item_postframe 75
item_drop 76
item_kill 77
item_attachtoplayer 78
item_primaryammoindex 79
item_secondaryammoindex 80
item_updateclientdata 81
item_getweaponptr 82
item_itemslot 67
weapon_extractammo 83
weapon_extractclipammo 84
weapon_addweapon 85
weapon_playemptysound 86
weapon_resetemptysound 87
weapon_sendweaponanim 88
weapon_isusable 89
weapon_primaryattack 90
weapon_secondaryattack 91
weapon_reload 92
weapon_weaponidle 93
weapon_retireweapon 94
weapon_shouldweaponidle 95
tfc_engineeruse 56
tfc_finished 57
tfc_empexplode 58
tfc_calcempdmgrad 59
tfc_takeempblast 60
tfc_empremove 61
tfc_takeconcussionblast 62
tfc_concuss 63
@end
; ns'
s linux binary is compiled with gcc 3.3, so the "base" is 0, and pev is 4
@section ns linux
pev 4
base 0x0
spawn 0
precache 1
keyvalue 2
objectcaps 5
activate 6
setobjectcollisionbox 7
classify 8
deathnotice 9
traceattack 10
takedamage 11
takehealth 12
killed 14
bloodcolor 16
tracebleed 17
istriggered 18
mymonsterpointer 19
mysquadmonsterpointer 20
gettogglestate 21
addpoints 22
addpointstoteam 23
addplayeritem 24
removeplayeritem 25
giveammo 26
getdelay 27
ismoving 28
overridereset 29
damagedecal 30
settogglestate 31
startsneaking 32
stopsneaking 33
oncontrols 34
issneaking 35
isalive 36
isbspmodel 37
reflectgauss 38
hastarget 39
isinworld 40
isplayer 41
isnetclient 42
teamid 43
getnexttarget 46
think 47
touch 48
use 49
blocked 50
respawn 52
updateowner 53
fbecomeprone 54
center 55
eyeposition 56
earposition 57
bodytarget 58
illumination 59
fvisible 60
fvecvisible 61
player_jump 83
player_duck 84
player_prethink 85
player_postthink 86
player_getgunposition 87
player_shouldfadeondeath 72
player_impulsecommands 101
player_updateclientdata 99
item_addtoplayer 64
item_addduplicate 65
item_getiteminfo 68
item_candeploy 69
item_deploy 70
item_canholster 71
item_holster 72
item_updateiteminfo 74
item_preframe 75
item_postframe 76
item_drop 77
item_kill 78
item_attachtoplayer 79
item_primaryammoindex 80
item_secondaryammoindex 81
item_updateclientdata 82
item_getweaponptr 83
item_itemslot 84
weapon_extractammo 85
weapon_extractclipammo 86
weapon_addweapon 87
weapon_playemptysound 88
weapon_resetemptysound 89
weapon_sendweaponanim 94
weapon_isusable 73
weapon_primaryattack 98
weapon_secondaryattack 99
weapon_reload 100
weapon_weaponidle 101
weapon_retireweapon 102
weapon_shouldweaponidle 103
weapon_usedecrement 104
ns_getpointvalue 13
ns_awardkill 15
ns_resetentity 45
ns_updateonremove 51
@end
@section ns windows
pev 4
base 0x0
spawn 0
precache 1
keyvalue 2
objectcaps 5
activate 6
setobjectcollisionbox 7
classify 8
deathnotice 9
traceattack 10
takedamage 11
takehealth 12
killed 14
bloodcolor 16
tracebleed 17
istriggered 18
mymonsterpointer 19
mysquadmonsterpointer 20
gettogglestate 21
addpoints 22
addpointstoteam 23
addplayeritem 24
removeplayeritem 25
giveammo 26
getdelay 27
ismoving 28
overridereset 29
damagedecal 30
settogglestate 31
startsneaking 32
stopsneaking 33
oncontrols 34
issneaking 35
isalive 36
isbspmodel 37
reflectgauss 38
hastarget 39
isinworld 40
isplayer 41
isnetclient 42
teamid 43
getnexttarget 46
think 47
touch 48
use 49
blocked 50
respawn 52
updateowner 53
fbecomeprone 54
center 55
eyeposition 56
earposition 57
bodytarget 58
illumination 59
fvisible 60
fvecvisible 61
player_jump 83
player_duck 84
player_prethink 85
player_postthink 86
player_getgunposition 87
player_shouldfadeondeath 72
player_impulsecommands 101
player_updateclientdata 99
item_addtoplayer 64
item_addduplicate 65
item_getiteminfo 68
item_candeploy 69
item_deploy 70
item_canholster 71
item_holster 72
item_updateiteminfo 74
item_preframe 75
item_postframe 76
item_drop 77
item_kill 78
item_attachtoplayer 79
item_primaryammoindex 80
item_secondaryammoindex 81
item_updateclientdata 82
item_getweaponptr 83
item_itemslot 84
weapon_extractammo 85
weapon_extractclipammo 86
weapon_addweapon 87
weapon_playemptysound 88
weapon_resetemptysound 89
weapon_sendweaponanim 94
weapon_isusable 73
weapon_primaryattack 98
weapon_secondaryattack 99
weapon_reload 100
weapon_weaponidle 101
weapon_retireweapon 102
weapon_shouldweaponidle 103
weapon_usedecrement 104
ns_getpointvalue 13
ns_awardkill 15
ns_resetentity 45
ns_updateonremove 51
@end
@section ts linux
pev 0
base 0x60
spawn 9
precache 10
keyvalue 11
objectcaps 14
activate 15
setobjectcollisionbox 18
classify 19
deathnotice 20
traceattack 21
takedamage 22
takehealth 23
killed 24
bloodcolor 25
tracebleed 26
istriggered 27
mymonsterpointer 28
mysquadmonsterpointer 29
gettogglestate 30
addpoints 31
addpointstoteam 32
addplayeritem 33
removeplayeritem 34
giveammo 35
getdelay 36
ismoving 37
overridereset 38
damagedecal 39
settogglestate 40
startsneaking 41
stopsneaking 42
oncontrols 43
issneaking 44
isalive 45
isbspmodel 46
reflectgauss 47
hastarget 48
isinworld 49
isplayer 50
isnetclient 51
teamid 52
getnexttarget 53
think 54
touch 55
use 56
blocked 57
respawn 59
updateowner 60
fbecomeprone 61
center 62
eyeposition 63
earposition 64
bodytarget 65
illumination 66
fvisible 67
fvecvisible 68
player_jump 86
player_duck 87
player_prethink 88
player_postthink 89
player_getgunposition 90
player_shouldfadeondeath 77
player_impulsecommands 92
player_updateclientdata 91
item_addtoplayer 70
item_addduplicate 71
item_candeploy 73
item_deploy 74
item_canholster 75
item_holster 76
item_updateiteminfo 77
item_preframe 78
item_postframe 79
item_drop 80
item_kill 81
item_attachtoplayer 82
item_primaryammoindex 83
item_secondaryammoindex 84
item_updateclientdata 85
item_getweaponptr 86
item_itemslot 87
weapon_extractammo 88
weapon_extractclipammo 89
weapon_addweapon 90
weapon_playemptysound 91
weapon_resetemptysound 92
weapon_sendweaponanim 93
weapon_isusable 94
weapon_primaryattack 95
weapon_secondaryattack 96
weapon_reload 98
weapon_weaponidle 99
weapon_retireweapon 100
weapon_shouldweaponidle 101
weapon_usedecrement 102
ts_breakablerespawn 2
ts_canusedthroughwalls 3
ts_giveslowmul 4
ts_goslow 5
ts_inslow 6
ts_isobjective 7
ts_enableobjective 8
ts_onfreeentprivatedata 12
ts_shouldcollide 13
ts_weapon_alternateattack 97
@end
@section ts windows
pev 4
base 0x0
spawn 7
precache 8
keyvalue 9
objectcaps 12
activate 13
setobjectcollisionbox 16
classify 17
deathnotice 18
traceattack 19
takedamage 20
takehealth 21
killed 22
bloodcolor 23
tracebleed 24
istriggered 25
mymonsterpointer 26
mysquadmonsterpointer 27
gettogglestate 28
addpoints 29
addpointstoteam 30
addplayeritem 31
removeplayeritem 32
giveammo 33
getdelay 34
ismoving 35
overridereset 36
damagedecal 37
settogglestate 38
startsneaking 39
stopsneaking 40
oncontrols 41
issneaking 42
isalive 43
isbspmodel 44
reflectgauss 45
hastarget 46
isinworld 47
isplayer 48
isnetclient 49
teamid 50
getnexttarget 51
think 52
touch 53
use 54
blocked 55
respawn 57
updateowner 58
fbecomeprone 59
center 60
eyeposition 61
earposition 62
bodytarget 63
illumination 64
fvisible 65
fvecvisible 66
player_jump 84
player_duck 85
player_prethink 86
player_postthink 87
player_getgunposition 88
player_shouldfadeondeath 75
player_impulsecommands 90
player_updateclientdata 89
item_addtoplayer 68
item_addduplicate 69
item_candeploy 71
item_deploy 72
item_canholster 73
item_holster 74
item_updateiteminfo 75
item_preframe 76
item_postframe 77
item_drop 78
item_kill 79
item_attachtoplayer 80
item_primaryammoindex 81
item_secondaryammoindex 82
item_updateclientdata 83
item_getweaponptr 84
item_itemslot 85
weapon_extractammo 86
weapon_extractclipammo 87
weapon_addweapon 88
weapon_playemptysound 89
weapon_resetemptysound 90
weapon_sendweaponanim 91
weapon_isusable 92
weapon_primaryattack 93
weapon_secondaryattack 94
weapon_reload 96
weapon_weaponidle 97
weapon_retireweapon 98
weapon_shouldweaponidle 99
weapon_usedecrement 100
ts_breakablerespawn 0
ts_canusedthroughwalls 1
ts_giveslowmul 2
ts_goslow 3
ts_inslow 4
ts_isobjective 5
ts_enableobjective 6
ts_onfreeentprivatedata 10
ts_shouldcollide 11
ts_weapon_alternateattack 95
@end
@section esf windows
pev 4
base 0x0
spawn 0
precache 1
keyvalue 2
objectcaps 5
activate 6
setobjectcollisionbox 7
classify 8
deathnotice 9
traceattack 10
takedamage 11
takehealth 12
killed 13
bloodcolor 14
tracebleed 15
istriggered 16
mymonsterpointer 17
mysquadmonsterpointer 18
gettogglestate 19
addpoints 20
addpointstoteam 21
addplayeritem 22
removeplayeritem 23
getdelay 24
ismoving 25
overridereset 26
damagedecal 27
settogglestate 28
startsneaking 29
stopsneaking 30
oncontrols 31
issneaking 32
isalive 33
isbspmodel 34
reflectgauss 35
hastarget 36
isinworld 37
isplayer 38
isnetclient 39
teamid 40
getnexttarget 41
think 42
touch 43
use 44
blocked 45
respawn 46
updateowner 47
fbecomeprone 48
center 49
eyeposition 50
earposition 51
bodytarget 52
illumination 53
fvisible 54
fvecvisible 55
player_jump 124
player_prethink 125
player_postthink 126
player_getgunposition 118
player_shouldfadeondeath 59
player_impulsecommands 128
player_updateclientdata 127
item_addtoplayer 57
item_addduplicate 58
item_getiteminfo 59
item_candeploy 60
item_deploy 61
item_canholster 62
item_holster 63
item_updateiteminfo 64
item_preframe 65
item_postframe 66
item_drop 67
item_kill 68
item_attachtoplayer 69
item_primaryammoindex 70
item_secondaryammoindex 71
item_updateclientdata 72
item_getweaponptr 73
item_itemslot 74
weapon_playemptysound 75
weapon_resetemptysound 76
weapon_sendweaponanim 77
weapon_primaryattack 78
weapon_secondaryattack 79
weapon_weaponidle 80
weapon_retireweapon 81
weapon_shouldweaponidle 82
weapon_usedecrement 83
@end
@section esf linux
pev 0
base 0x60
spawn 2
precache 3
keyvalue 4
objectcaps 7
activate 8
setobjectcollisionbox 9
classify 10
deathnotice 11
traceattack 12
takedamage 13
takehealth 14
killed 15
bloodcolor 16
tracebleed 17
istriggered 18
mymonsterpointer 19
mysquadmonsterpointer 20
gettogglestate 21
addpoints 22
addpointstoteam 23
addplayeritem 24
removeplayeritem 25
getdelay 26
ismoving 27
overridereset 28
damagedecal 29
settogglestate 30
startsneaking 31
stopsneaking 32
oncontrols 33
issneaking 34
isalive 35
isbspmodel 36
reflectgauss 37
hastarget 38
isinworld 39
isplayer 40
isnetclient 41
teamid 42
getnexttarget 43
think 44
touch 45
use 46
blocked 47
respawn 48
updateowner 49
fbecomeprone 50
center 51
eyeposition 52
earposition 53
bodytarget 54
illumination 55
fvisible 56
fvecvisible 57
player_jump 126
player_prethink 127
player_postthink 128
player_getgunposition 120
player_shouldfadeondeath 61
player_impulsecommands 130
player_updateclientdata 129
item_addtoplayer 59
item_addduplicate 60
item_getiteminfo 61
item_candeploy 62
item_deploy 63
item_canholster 64
item_holster 65
item_updateiteminfo 66
item_preframe 67
item_postframe 68
item_drop 69
item_kill 70
item_attachtoplayer 71
item_primaryammoindex 72
item_secondaryammoindex 73
item_updateclientdata 74
item_getweaponptr 75
item_itemslot 76
weapon_playemptysound 77
weapon_resetemptysound 78
weapon_sendweaponanim 79
weapon_primaryattack 80
weapon_secondaryattack 81
weapon_weaponidle 82
weapon_retireweapon 83
weapon_shouldweaponidle 84
weapon_usedecrement 85
@end
; ESF Open Beta is built with GCC 3.x, and the VTable was slightly changed
@section esf_openbeta linux
pev 4
base 0x0
spawn 0
precache 1
keyvalue 2
objectcaps 5
activate 6
setobjectcollisionbox 7
classify 8
deathnotice 9
traceattack 10
takedamage 11
takehealth 13
killed 14
bloodcolor 15
tracebleed 16
istriggered 17
mymonsterpointer 18
mysquadmonsterpointer 19
gettogglestate 20
addpoints 21
addpointstoteam 22
addplayeritem 23
removeplayeritem 24
getdelay 25
ismoving 26
overridereset 27
damagedecal 28
settogglestate 29
startsneaking 30
stopsneaking 31
oncontrols 32
issneaking 33
isalive 34
isbspmodel 35
reflectgauss 36
hastarget 37
isinworld 38
isplayer 39
isnetclient 41
teamid 42
getnexttarget 43
think 44
touch 45
use 46
blocked 47
respawn 48
updateowner 49
fbecomeprone 50
center 51
eyeposition 52
earposition 53
bodytarget 54
illumination 55
fvisible 56
fvecvisible 57
player_jump 131
player_prethink 132
player_postthink 133
player_getgunposition 120
player_shouldfadeondeath 61
player_impulsecommands 135
player_updateclientdata 134
item_addtoplayer 59
item_addduplicate 60
item_getiteminfo 61
item_candeploy 62
item_deploy 63
item_canholster 64
item_holster 65
item_updateiteminfo 66
item_preframe 67
item_postframe 68
item_drop 69
item_kill 70
item_attachtoplayer 71
item_primaryammoindex 72
item_secondaryammoindex 73
item_updateclientdata 74
item_getweaponptr 75
item_itemslot 76
weapon_playemptysound 77
weapon_resetemptysound 78
weapon_sendweaponanim 79
weapon_primaryattack 80
weapon_secondaryattack 81
weapon_weaponidle 82
weapon_retireweapon 83
weapon_shouldweaponidle 84
weapon_usedecrement 85
esf_isenvmodel 40
esf_takedamage2 12
@end
@section esf_openbeta windows
pev 4
base 0x0
spawn 0
precache 1
keyvalue 2
objectcaps 5
activate 6
setobjectcollisionbox 7
classify 8
deathnotice 9
traceattack 10
takedamage 11
takehealth 13
killed 14
bloodcolor 15
tracebleed 16
istriggered 17
mymonsterpointer 18
mysquadmonsterpointer 19
gettogglestate 20
addpoints 21
addpointstoteam 22
addplayeritem 23
removeplayeritem 24
getdelay 25
ismoving 26
overridereset 27
damagedecal 28
settogglestate 29
startsneaking 30
stopsneaking 31
oncontrols 32
issneaking 33
isalive 34
isbspmodel 35
reflectgauss 36
hastarget 37
isinworld 38
isplayer 39
isnetclient 41
teamid 42
getnexttarget 43
think 44
touch 45
use 46
blocked 47
respawn 48
updateowner 49
fbecomeprone 50
center 51
eyeposition 52
earposition 53
bodytarget 54
illumination 55
fvisible 56
fvecvisible 57
player_jump 131
player_prethink 132
player_postthink 133
player_getgunposition 120
player_shouldfadeondeath 61
player_impulsecommands 135
player_updateclientdata 134
item_addtoplayer 59
item_addduplicate 60
item_getiteminfo 61
item_candeploy 62
item_deploy 63
item_canholster 64
item_holster 65
item_updateiteminfo 66
item_preframe 67
item_postframe 68
item_drop 69
item_kill 70
item_attachtoplayer 71
item_primaryammoindex 72
item_secondaryammoindex 73
item_updateclientdata 74
item_getweaponptr 75
item_itemslot 76
weapon_playemptysound 77
weapon_resetemptysound 78
weapon_sendweaponanim 79
weapon_primaryattack 80
weapon_secondaryattack 81
weapon_weaponidle 82
weapon_retireweapon 83
weapon_shouldweaponidle 84
weapon_usedecrement 85
esf_isenvmodel 40
esf_takedamage2 12
@end
@section valve linux
pev 4
base 0x0
spawn 0
precache 1
keyvalue 2
objectcaps 5
activate 6
setobjectcollisionbox 7
classify 8
deathnotice 9
traceattack 10
takedamage 11
takehealth 12
killed 13
bloodcolor 14
tracebleed 15
istriggered 16
mymonsterpointer 17
mysquadmonsterpointer 18
gettogglestate 19
addpoints 20
addpointstoteam 21
addplayeritem 22
removeplayeritem 23
giveammo 24
getdelay 25
ismoving 26
overridereset 27
damagedecal 28
settogglestate 29
startsneaking 30
stopsneaking 31
oncontrols 32
issneaking 33
isalive 34
isbspmodel 35
reflectgauss 36
hastarget 37
isinworld 38
isplayer 39
isnetclient 40
teamid 41
getnexttarget 42
think 43
touch 44
use 45
blocked 46
respawn 47
updateowner 48
fbecomeprone 49
center 50
eyeposition 51
earposition 52
bodytarget 53
illumination 54
fvisible 55
fvecvisible 56
player_jump 125
player_duck 126
player_prethink 127
player_postthink 128
player_getgunposition 119
player_shouldfadeondeath 60
player_impulsecommands 130
player_updateclientdata 129
item_addtoplayer 58
item_addduplicate 59
item_getiteminfo 60
item_candeploy 61
item_deploy 62
item_canholster 63
item_holster 64
item_updateiteminfo 65
item_preframe 66
item_postframe 67
item_drop 68
item_kill 69
item_attachtoplayer 70
item_primaryammoindex 71
item_secondaryammoindex 72
item_updateclientdata 73
item_getweaponptr 74
item_itemslot 75
weapon_extractammo 76
weapon_extractclipammo 77
weapon_addweapon 78
weapon_playemptysound 79
weapon_resetemptysound 80
weapon_sendweaponanim 81
weapon_isusable 82
weapon_primaryattack 83
weapon_secondaryattack 84
weapon_reload 85
weapon_weaponidle 86
weapon_retireweapon 87
weapon_shouldweaponidle 88
weapon_usedecrement 89
@end
@section valve windows
pev 4
base 0x0
spawn 0
precache 1
keyvalue 2
objectcaps 5
activate 6
setobjectcollisionbox 7
classify 8
deathnotice 9
traceattack 10
takedamage 11
takehealth 12
killed 13
bloodcolor 14
tracebleed 15
istriggered 16
mymonsterpointer 17
mysquadmonsterpointer 18
gettogglestate 19
addpoints 20
addpointstoteam 21
addplayeritem 22
removeplayeritem 23
giveammo 24
getdelay 25
ismoving 26
overridereset 27
damagedecal 28
settogglestate 29
startsneaking 30
stopsneaking 31
oncontrols 32
issneaking 33
isalive 34
isbspmodel 35
reflectgauss 36
hastarget 37
isinworld 38
isplayer 39
isnetclient 40
teamid 41
getnexttarget 42
think 43
touch 44
use 45
blocked 46
respawn 47
updateowner 48
fbecomeprone 49
center 50
eyeposition 51
earposition 52
bodytarget 53
illumination 54
fvisible 55
fvecvisible 56
player_jump 125
player_duck 126
player_prethink 127
player_postthink 128
player_getgunposition 119
player_shouldfadeondeath 60
player_impulsecommands 130
player_updateclientdata 129
item_addtoplayer 58
item_addduplicate 59
item_getiteminfo 60
item_candeploy 61
item_deploy 62
item_canholster 63
item_holster 64
item_updateiteminfo 65
item_preframe 66
item_postframe 67
item_drop 68
item_kill 69
item_attachtoplayer 70
item_primaryammoindex 71
item_secondaryammoindex 72
item_updateclientdata 73
item_getweaponptr 74
item_itemslot 75
weapon_extractammo 76
weapon_extractclipammo 77
weapon_addweapon 78
weapon_playemptysound 79
weapon_resetemptysound 80
weapon_sendweaponanim 81
weapon_isusable 82
weapon_primaryattack 83
weapon_secondaryattack 84
weapon_reload 85
weapon_weaponidle 86
weapon_retireweapon 87
weapon_shouldweaponidle 88
weapon_usedecrement 89
@end
@section valve mac
pev 4
base 0x0
spawn 0
precache 1
keyvalue 2
objectcaps 5
activate 6
setobjectcollisionbox 7
classify 8
deathnotice 9
traceattack 10
takedamage 11
takehealth 12
killed 13
bloodcolor 14
tracebleed 15
istriggered 16
mymonsterpointer 17
mysquadmonsterpointer 18
gettogglestate 19
addpoints 20
addpointstoteam 21
addplayeritem 22
removeplayeritem 23
giveammo 24
getdelay 25
ismoving 26
overridereset 27
damagedecal 28
settogglestate 29
startsneaking 30
stopsneaking 31
oncontrols 32
issneaking 33
isalive 34
isbspmodel 35
reflectgauss 36
hastarget 37
isinworld 38
isplayer 39
isnetclient 40
teamid 41
getnexttarget 42
think 43
touch 44
use 45
blocked 46
respawn 47
updateowner 48
fbecomeprone 49
center 50
eyeposition 51
earposition 52
bodytarget 53
illumination 54
fvisible 55
fvecvisible 56
player_jump 125
player_duck 126
player_prethink 127
player_postthink 128
player_getgunposition 119
player_shouldfadeondeath 60
player_impulsecommands 130
player_updateclientdata 129
item_addtoplayer 58
item_addduplicate 59
item_getiteminfo 60
item_candeploy 61
item_deploy 62
item_canholster 63
item_holster 64
item_updateiteminfo 65
item_preframe 66
item_postframe 67
item_drop 68
item_kill 69
item_attachtoplayer 70
item_primaryammoindex 71
item_secondaryammoindex 72
item_updateclientdata 73
item_getweaponptr 74
item_itemslot 75
weapon_extractammo 76
weapon_extractclipammo 77
weapon_addweapon 78
weapon_playemptysound 79
weapon_resetemptysound 80
weapon_sendweaponanim 81
weapon_isusable 82
weapon_primaryattack 83
weapon_secondaryattack 84
weapon_reload 85
weapon_weaponidle 86
weapon_retireweapon 87
weapon_shouldweaponidle 88
weapon_usedecrement 89
@end
; Sven-Coop has no linux binaries. This makes disassembly much harder.
; These offsets were contributed by ts2do
@section SvenCoop windows
pev 4
base 0x0
spawn 0
precache 1
keyvalue 2
objectcaps 5
takedamage 11
addpoints 20
addpointstoteam 21
addplayeritem 22
removeplayeritem 23
giveammo 24
oncontrols 32
isalive 34
isbspmodel 35
reflectgauss 36
hastarget 37
isinworld 38
isplayer 39
isnetclient 40
teamid 42
getnexttarget 43
think 44
touch 45
use 46
blocked 47
respawn 48
center 51
eyeposition 52
earposition 53
bodytarget 54
illumination 55
fvisible 56
@end
#1
chukuns
-
- Пользователь
-
- 41 сообщений
Новичок
Отправлено 30 Январь 2015 — 2:17
Пытался я найти ответы на подобные вопросы,но так и не нашел =) Вообщем,некоторые плагины отказываются работать,вот логи:
[AMXX] Run time error 10 (plugin «Duels_and_Bets.amxx») (native «get_pcvar_num») — debug not enabled!
[AMXX] To enable debug mode, add «debug» after the plugin name in plugins.ini (without quotes).
World triggered «Round_End»
[AMXX] Run time error 10 (plugin «Duels_and_Bets.amxx») (native «set_pcvar_string») — debug not enabled!
[AMXX] To enable debug mode, add «debug» after the plugin name in plugins.ini (without quotes).
[HAMSANDWICH] Failed to retrieve vtable for «trigger_push», hook for «CTriggerPush_Touch» not active.
[AMXX] Run time error 10 (plugin «DRM_triggers&entities_fix.amxx») (native «RegisterHam») — debug not enabled!
[AMXX] To enable debug mode, add «debug» after the plugin name in plugins.ini (without quotes).
[AMXX] Run time error 10 (plugin «adminmenu.amxx») (native «RegisterHam») — debug not enabled!
[AMXX] To enable debug mode, add «debug» after the plugin name in plugins.ini (without quotes).
И много плагинов с ошибкой «RegisterHam»
Вот прописанные модули:
cstrike
csx
amxmodx
engine
fakemeta
fun
hamsandwich
mysql
nvault
set_life
Dproto обновлять до старой версии пробовал,модули перезаливать на свои даже пробовал,debug дописывал,не помогает
Помогите найти ответ
- Наверх
#2
Kasper55
Отправлено 30 Январь 2015 — 2:38
При чем модули ? ПРи ЧЕМ ТУТ DPROTO ?
debug на плагин поставь
- Наверх
#3
chukuns
chukuns
-
- Пользователь
-
- 41 сообщений
Новичок
Отправлено 30 Январь 2015 — 3:12
При чем модули ? ПРи ЧЕМ ТУТ DPROTO ?
debug на плагин поставь
Повключал:
L 01/30/2015 — 04:10:33: Invalid CVAR pointer
L 01/30/2015 — 04:10:33: [AMXX] Displaying debug trace (plugin «Duels_and_Bets.amxx»)
L 01/30/2015 — 04:10:33: [AMXX] Run time error 10: native error (native «set_pcvar_string»)
L 01/30/2015 — 04:10:33: [AMXX] [0] Duels_and_Bets.sma::RoundStart (line 350)
L 01/30/2015 — 04:10:33: Server cvar «mp_limitteams» = «20»
L 01/30/2015 — 04:10:33: World triggered «Round_Start»
L 01/30/2015 — 04:10:35: Invalid CVAR pointer
L 01/30/2015 — 04:10:35: [AMXX] Displaying debug trace (plugin «Deathrun_Modes.amxx»)
L 01/30/2015 — 04:10:35: [AMXX] Run time error 10: native error (native «get_pcvar_num»)
L 01/30/2015 — 04:10:35: [AMXX] [0] Deathrun_Modes.sma::load_cfg (line 243)
L 01/30/2015 — 04:10:37: [HAMSANDWICH] Failed to retrieve vtable for «trigger_push», hook for «CTriggerPush_Touch» not active.
L 01/30/2015 — 04:10:37: [AMXX] Displaying debug trace (plugin «DRM_triggers&entities_fix.amxx»)
L 01/30/2015 — 04:10:37: [AMXX] Run time error 10: native error (native «RegisterHam»)
L 01/30/2015 — 04:10:37: [AMXX] [0] DRM_triggers&entities_fix.sma::delay_load (line 187)
L 01/30/2015 — 04:14:25: [HAMSANDWICH] Failed to retrieve vtable for «player», hook for «Spawn_player» not active.
L 01/30/2015 — 04:14:25: [AMXX] Displaying debug trace (plugin «hook.amxx»)
L 01/30/2015 — 04:14:25: [AMXX] Run time error 10: native error (native «RegisterHam»)
И остальные все плагины с Run time error 10: native error (native «RegisterHam»)
Сервер в краш уходит
Сообщение отредактировал chukuns: 30 Январь 2015 — 3:26
- Наверх
#4
sergei179
Отправлено 30 Январь 2015 — 12:37
Отключай плагины по очереди и проверяй после отключение которого краш прекратится
- Наверх
#5
Kasper55
Отправлено 30 Январь 2015 — 12:47
Отключай плагины по очереди и проверяй после отключение которого краш прекратится
тут просто нужно идти с этим к скриптеру
- Наверх
#6
sergei179
Отправлено 30 Январь 2015 — 13:48
тут просто нужно идти с этим к скриптеру
да, к ганнибалу, он то 100% решит, как мне когда то….
- Kasper55 это нравится
- Наверх
#7
chukuns
chukuns
-
- Пользователь
-
- 41 сообщений
Новичок
Отправлено 30 Январь 2015 — 18:09
- Наверх
Содержание
- Проблема с модулями
- #1 chukuns
- #2 Kasper55
- #3 chukuns
- #4 sergei179
- #5 Kasper55
- #6 sergei179
- #7 chukuns
- Amxx run time error 10 native error native registerham
- JailBreak Extreme : [AMXX] Run time error 10: native error
- JailBreak Extreme : [AMXX] Run time error 10: native error
Проблема с модулями
#1 chukuns
Пытался я найти ответы на подобные вопросы,но так и не нашел =) Вообщем,некоторые плагины отказываются работать,вот логи:
#2 Kasper55
При чем модули ? ПРи ЧЕМ ТУТ DPROTO ?
debug на плагин поставь
#3 chukuns
При чем модули ? ПРи ЧЕМ ТУТ DPROTO ?
debug на плагин поставь
Сообщение отредактировал chukuns: 30 Январь 2015 — 3:26
#4 sergei179
Отключай плагины по очереди и проверяй после отключение которого краш прекратится
#5 Kasper55
Отключай плагины по очереди и проверяй после отключение которого краш прекратится
тут просто нужно идти с этим к скриптеру
#6 sergei179
тут просто нужно идти с этим к скриптеру
да, к ганнибалу, он то 100% решит, как мне когда то.
#7 chukuns
Источник
Amxx run time error 10 native error native registerham
Shadows In Rain писал(а): Юля-Юлечка, на технических форумах любая проблема решается оченнь легко. Нужно просто показать сиськи. С пруфами.
JailBreak Extreme : [AMXX] Run time error 10: native error
Модератор: liFe iS GoOD
- Список форумов‹AMX Mod X‹Вопросы по AMXX и его плагинам
Правила форума
1. Запрещено материться и оскорблять других участников форума.
2. Запрещен флуд, оффтоп, дабл постинг во всех разделах форума, кроме раздела «Болтовня».
3. Запрещено взламывать сайт/форум или наносить любой вред проекту.
4. Запрещено рекламировать другие ресурсы.
5. Запрещено создавать темы без информативного названия. Название темы должно отображать ее смысл.
В данном разделе форума разрешено создавать темы, касающие только вопросов по AMX Mod X и его плагинам.
JailBreak Extreme : [AMXX] Run time error 10: native error
data » 30 дек 2011, 22:17
#define TASK_STATUS 2487000
#define TASK_FREEDAY 2487100
#define TASK_ROUND 2487200
#define TASK_HELP 2487300
#define TASK_SAFETIME 2487400
#define TASK_FREEEND 2487500
#define TEAM_MENU «#Team_Select_Spect»
#define TEAM_MENU2 «#Team_Select_Spect»
#define HUD_DELAY Float:4.0
#define CELL_RADIUS Float:200.0
new gp_PrecacheSpawn
new gp_PrecacheKeyValue
new gp_CrowbarMax
new gp_CrowbarMul
new gp_TeamRatio
new gp_CtMax
new gp_BoxMax
new gp_TalkMode
new gp_VoiceBlock
new gp_RetryTime
new gp_RoundMax
new gp_ButtonShoot
new gp_SimonSteps
new gp_SimonRandom
new gp_GlowModels
new gp_AutoLastresquest
new gp_LastRequest
new gp_Motd
new gp_SpectRounds
new gp_NosimonRounds
new gp_AutoOpen
new gp_TeamChange
new g_MaxClients
new g_MsgStatusText
new g_MsgStatusIcon
new g_MsgVGUIMenu
new g_MsgShowMenu
new g_MsgClCorpse
new g_MsgMOTD
new gc_TalkMode
new gc_VoiceBlock
new gc_SimonSteps
new gc_ButtonShoot
new Float : gc_CrowbarMul
// Precache
new const _FistModels [][] = < «models/p_bknuckles.mdl» , «models/v_by_ssss.mdl» >
new const _CrowbarModels [][] = < «models/p_crowbar.mdl» , «models/v_crowbar.mdl» >
new const _FistSounds [][] = < «weapons/cbar_hitbod2.wav» , «weapons/cbar_hitbod1.wav» , «weapons/bullet_hit1.wav» , «weapons/bullet_hit2.wav» >
new const _RemoveEntities [][] = <
«func_hostage_rescue» , «info_hostage_rescue» , «func_bomb_target» , «info_bomb_target» ,
«hostage_entity» , «info_vip_start» , «func_vip_safetyzone» , «func_escapezone»
>
// Reasons
new const g_Reasons [][] = <
«» ,
«JBE_PRISONER_REASON_1» ,
«JBE_PRISONER_REASON_2» ,
«JBE_PRISONER_REASON_3» ,
«JBE_PRISONER_REASON_4» ,
«JBE_PRISONER_REASON_5» ,
«JBE_PRISONER_REASON_6»
>
// Colors: 0:Simon / 1:Freeday / 2:CT Duel / 3:TT Duel
new const g_Colors [][ 3 ] = < < 0 , 255 , 255 >, < 0 , 255 , 0 >, < 0 , 0 , 255 >, < 255 , 42 , 0 >>
new CsTeams : g_PlayerTeam [ 33 ]
new Float : g_SimonRandom
new Trie : g_CellManagers
new g_HelpText [ 512 ]
new g_JailDay
new g_PlayerJoin
new g_PlayerReason [ 33 ]
new g_PlayerSpect [ 33 ]
new g_PlayerSimon [ 33 ]
new g_PlayerNomic
new g_PlayerWanted
new g_PlayerCrowbar
new g_PlayerRevolt
new g_PlayerHelp
new g_PlayerFreeday
new g_PlayerLast
new g_FreedayAuto
new g_FreedayNext
new g_TeamCount [ CsTeams ]
new g_TeamAlive [ CsTeams ]
new g_BoxStarted
new g_CrowbarCount
new g_Simon
new g_SimonAllowed
new g_SimonTalking
new g_SimonVoice
new g_RoundStarted
new g_LastDenied
new g_Freeday
new g_BlockWeapons
new g_RoundEnd
new g_Duel
new g_DuelA
new g_DuelB
new g_SafeTime
new g_Buttons [ 10 ]
public plugin_init ()
<
unregister_forward ( FM_Spawn , gp_PrecacheSpawn )
unregister_forward ( FM_KeyValue , gp_PrecacheKeyValue )
register_plugin ( PLUGIN_NAME , PLUGIN_VERSION , PLUGIN_AUTHOR )
register_cvar ( PLUGIN_CVAR , PLUGIN_VERSION , FCVAR_SERVER | FCVAR_SPONLY )
register_dictionary ( «jbextreme.txt» )
g_MsgStatusText = get_user_msgid ( «StatusText» )
g_MsgStatusIcon = get_user_msgid ( «StatusIcon» )
g_MsgVGUIMenu = get_user_msgid ( «VGUIMenu» )
g_MsgShowMenu = get_user_msgid ( «ShowMenu» )
g_MsgMOTD = get_user_msgid ( «MOTD» )
g_MsgClCorpse = get_user_msgid ( «ClCorpse» )
register_message ( g_MsgStatusText , «msg_statustext» )
register_message ( g_MsgStatusIcon , «msg_statusicon» )
register_message ( g_MsgVGUIMenu , «msg_vguimenu» )
register_message ( g_MsgShowMenu , «msg_showmenu» )
register_message ( g_MsgMOTD , «msg_motd» )
register_message ( g_MsgClCorpse , «msg_clcorpse» )
register_event ( «CurWeapon» , «current_weapon» , «be» , «1=1» , «2=29» )
register_event ( «StatusValue» , «player_status» , «be» , «1=2» , «2!0» )
register_event ( «StatusValue» , «player_status» , «be» , «1=1» , «2=0» )
register_impulse ( 100 , «impulse_100» )
RegisterHam ( Ham_Spawn , «player» , «player_spawn» , 1 )
RegisterHam ( Ham_TakeDamage , «player» , «player_damage» )
RegisterHam ( Ham_TraceAttack , «player» , «player_attack» )
RegisterHam ( Ham_TraceAttack , «func_button» , «button_attack» )
RegisterHam ( Ham_Killed , «player» , «player_killed» , 1 )
RegisterHam ( Ham_Touch , «weapon_hegrenade» , «player_touchweapon» )
RegisterHam ( Ham_Touch , «weaponbox» , «player_touchweapon» )
RegisterHam ( Ham_Touch , «armoury_entity» , «player_touchweapon» )
register_forward ( FM_SetClientKeyValue , «set_client_kv» )
register_forward ( FM_EmitSound , «sound_emit» )
register_forward ( FM_Voice_SetClientListening , «voice_listening» )
register_forward ( FM_CmdStart , «player_cmdstart» , 1 )
register_logevent ( «round_end» , 2 , «1=Round_End» )
register_logevent ( «round_first» , 2 , «0=World triggered» , «1&Restart_Round_» )
register_logevent ( «round_first» , 2 , «0=World triggered» , «1=Game_Commencing» )
register_logevent ( «round_start» , 2 , «0=World triggered» , «1=Round_Start» )
register_menucmd ( register_menuid ( TEAM_MENU ), 51 , «team_select» )
register_menucmd ( register_menuid ( TEAM_MENU2 ), 51 , «team_select» )
register_clcmd ( «jointeam» , «cmd_jointeam» )
register_clcmd ( «joinclass» , «cmd_joinclass» )
register_clcmd ( «+simonvoice» , «cmd_voiceon» )
register_clcmd ( «-simonvoice» , «cmd_voiceoff» )
register_clcmd ( «say /fd» , «cmd_freeday» )
register_clcmd ( «say /freeday» , «cmd_freeday» )
register_clcmd ( «say /day» , «cmd_freeday» )
register_clcmd ( «say /lr» , «cmd_lastrequest» )
register_clcmd ( «say /lastrequest» , «cmd_lastrequest» )
register_clcmd ( «say /duel» , «cmd_lastrequest» )
register_clcmd ( «say /simon» , «cmd_simon» )
register_clcmd ( «say /open» , «cmd_open» )
register_clcmd ( «say /nomic» , «cmd_nomic» )
register_clcmd ( «say /box» , «cmd_box» )
register_clcmd ( «say /help» , «cmd_help» )
register_clcmd ( «jbe_freeday» , «adm_freeday» , ADMIN_RESERVATION )
gp_GlowModels = register_cvar ( «jbe_glowmodels» , «1» )
gp_SimonSteps = register_cvar ( «jbe_simonsteps» , «0» )
gp_CrowbarMul = register_cvar ( «jbe_crowbarmultiplier» , «25.0» )
gp_CrowbarMax = register_cvar ( «jbe_maxcrowbar» , «0» )
gp_TeamRatio = register_cvar ( «jbe_teamratio» , «3» )
gp_TeamChange = register_cvar ( «jbe_teamchange» , «0» ) // 0-disable team change for tt / 1-enable team change
gp_CtMax = register_cvar ( «jbe_maxct» , «5» )
gp_BoxMax = register_cvar ( «jbe_boxmax» , «12» )
gp_RetryTime = register_cvar ( «jbe_retrytime» , «17.0» )
gp_RoundMax = register_cvar ( «jbe_freedayround» , «360.0» )
gp_AutoLastresquest = register_cvar ( «jbe_autolastrequest» , «1» )
gp_LastRequest = register_cvar ( «jbe_lastrequest» , «1» )
gp_Motd = register_cvar ( «jbe_motd» , «1» )
gp_SpectRounds = register_cvar ( «jbe_spectrounds» , «3» )
gp_NosimonRounds = register_cvar ( «jbe_nosimonrounds» , «7» )
gp_SimonRandom = register_cvar ( «jbe_randomsimon» , «0» )
gp_AutoOpen = register_cvar ( «jbe_autoopen» , «1» )
gp_TalkMode = register_cvar ( «jbe_talkmode» , «2» ) // 0-alltak / 1-tt talk / 2-tt no talk
gp_VoiceBlock = register_cvar ( «jbe_blockvoice» , «0» ) // 0-dont block / 1-block voicerecord / 2-block voicerecord except simon
gp_ButtonShoot = register_cvar ( «jbe_buttonshoot» , «0» ) // 0-standard / 1-func_button shoots!
g_MaxClients = get_global_int ( GL_maxClients )
for ( new i = 0 ; i sizeof ( g_HudSync ); i ++)
g_HudSync [ i ][ _hudsync ] = CreateHudSyncObj ()
formatex ( g_HelpText , charsmax ( g_HelpText ), «%L^n^n%L^n^n%L^n^n%L» ,
LANG_SERVER , «JBE_HELP_TITLE» ,
LANG_SERVER , «JBE_HELP_BINDS» ,
LANG_SERVER , «JBE_HELP_GUARD_CMDS» ,
LANG_SERVER , «JBE_HELP_PRISONER_CMDS» )
setup_buttons ()
>
public plugin_precache ()
<
static i
precache_model ( «models/player/jail_ssss/jail_ssss.mdl» )
precache_model ( «models/player/jail_ssss_/jail_ssssT.mdl» )
for ( i = 0 ; i sizeof ( _FistModels ); i ++)
precache_model ( _FistModels [ i ])
for ( i = 0 ; i sizeof ( _CrowbarModels ); i ++)
precache_model ( _CrowbarModels [ i ])
for ( i = 0 ; i sizeof ( _FistSounds ); i ++)
precache_sound ( _FistSounds [ i ])
precache_sound ( «jailB_ssss/duelka.wav» )
precache_sound ( «jailB_ssss/brass_bell_C.wav» )
g_CellManagers = TrieCreate ()
gp_PrecacheSpawn = register_forward ( FM_Spawn , «precache_spawn» , 1 )
gp_PrecacheKeyValue = register_forward ( FM_KeyValue , «precache_keyvalue» , 1 )
>
public precache_spawn ( ent )
<
if ( is_valid_ent ( ent ))
<
static szClass [ 33 ]
entity_get_string ( ent , EV_SZ_classname , szClass , sizeof ( szClass ))
for ( new i = 0 ; i sizeof ( _RemoveEntities ); i ++)
if ( equal ( szClass , _RemoveEntities [ i ]))
remove_entity ( ent )
>
>
public precache_keyvalue ( ent , kvd_handle )
<
static info [ 32 ]
if (! is_valid_ent ( ent ))
return FMRES_IGNORED
get_kvd ( kvd_handle , KV_ClassName , info , charsmax ( info ))
if (! equal ( info , «multi_manager» ))
return FMRES_IGNORED
get_kvd ( kvd_handle , KV_KeyName , info , charsmax ( info ))
TrieSetCell ( g_CellManagers , info , ent )
return FMRES_IGNORED
>
public client_putinserver ( id )
<
clear_bit ( g_PlayerJoin , id )
clear_bit ( g_PlayerHelp , id )
clear_bit ( g_PlayerCrowbar , id )
clear_bit ( g_PlayerNomic , id )
clear_bit ( g_PlayerWanted , id )
clear_bit ( g_SimonTalking , id )
clear_bit ( g_SimonVoice , id )
g_PlayerSpect [ id ] = 0
g_PlayerSimon [ id ] = 0
>
public client_disconnect ( id )
<
if ( g_Simon == id )
<
g_Simon = 0
ClearSyncHud ( 0 , g_HudSync [ 2 ][ _hudsync ])
player_hudmessage ( 0 , 2 , 5.0 , _ , «%L» , LANG_SERVER , «JBE_SIMON_HASGONE» )
>
else if ( g_PlayerLast == id || ( g_Duel && ( id == g_DuelA || id == g_DuelB )))
<
g_Duel = 0
g_DuelA = 0
g_DuelB = 0
g_LastDenied = 0
g_BlockWeapons = 0
g_PlayerLast = 0
>
team_count ()
>
public client_PostThink ( id )
<
if ( id != g_Simon || ! gc_SimonSteps || ! is_user_alive ( id ) ||
!( entity_get_int ( id , EV_INT_flags ) & FL_ONGROUND ) || entity_get_int ( id , EV_ENT_groundentity ))
return PLUGIN_CONTINUE
static Float : origin [ 3 ]
static Float : last [ 3 ]
entity_get_vector ( id , EV_VEC_origin , origin )
if ( get_distance_f ( origin , last ) 32.0 )
<
return PLUGIN_CONTINUE
>
vec_copy ( origin , last )
if ( entity_get_int ( id , EV_INT_bInDuck ))
origin [ 2 ] -= 18.0
else
origin [ 2 ] -= 36.0
message_begin ( MSG_BROADCAST , SVC_TEMPENTITY , < 0 , 0 , 0 >, 0 )
write_byte ( TE_WORLDDECAL )
write_coord ( floatround ( origin [ 0 ]))
write_coord ( floatround ( origin [ 1 ]))
write_coord ( floatround ( origin [ 2 ]))
write_byte ( 105 )
message_end ()
public msg_statustext ( msgid , dest , id )
<
return PLUGIN_HANDLED
>
public msg_statusicon ( msgid , dest , id )
<
static icon [ 5 ]
get_msg_arg_string ( 2 , icon , charsmax ( icon ))
if ( icon [ 0 ] == ‘b’ && icon [ 2 ] == ‘y’ && icon [ 3 ] == ‘z’ )
<
set_pdata_int ( id , 235 , get_pdata_int ( id , 235 ) &
( 1 0 ))
return PLUGIN_HANDLED
>
public msg_vguimenu ( msgid , dest , id )
<
static msgarg1
static CsTeams : team
msgarg1 = get_msg_arg_int ( 1 )
if ( msgarg1 == 2 )
<
team = cs_get_user_team ( id )
if (( team == CS_TEAM_T ) && ! is_user_admin ( id ) && ( is_user_alive ( id ) || ! get_pcvar_num ( gp_TeamChange )))
<
client_print ( id , print_center , «%L» , LANG_SERVER , «JBE_TEAM_CANTCHANGE» )
return PLUGIN_HANDLED
>
show_menu ( id , 51 , TEAM_MENU , — 1 )
return PLUGIN_HANDLED
>
public msg_showmenu ( msgid , dest , id )
<
static msgarg1 , roundloop
static CsTeams : team
msgarg1 = get_msg_arg_int ( 1 )
if ( msgarg1 != 531 && msgarg1 != 563 )
return PLUGIN_CONTINUE
roundloop = floatround ( get_pcvar_float ( gp_RetryTime ) / 2 )
team = cs_get_user_team ( id )
if ( team == CS_TEAM_T )
<
if (! is_user_admin ( id ) && ( is_user_alive ( id ) || ( g_RoundStarted >= roundloop ) || ! get_pcvar_num ( gp_TeamChange )))
<
client_print ( id , print_center , «%L» , LANG_SERVER , «JBE_TEAM_CANTCHANGE» )
return PLUGIN_HANDLED
>
else
<
show_menu ( id , 51 , TEAM_MENU , — 1 )
return PLUGIN_HANDLED
>
>
else
<
show_menu ( id , 51 , TEAM_MENU , — 1 )
return PLUGIN_HANDLED
>
public msg_motd ( msgid , dest , id )
<
if ( get_pcvar_num ( gp_Motd ))
return PLUGIN_HANDLED
public msg_clcorpse ( msgid , dest , id )
<
return PLUGIN_HANDLED
>
public current_weapon ( id )
<
if (! is_user_alive ( id ))
return PLUGIN_CONTINUE
if ( get_bit ( g_PlayerCrowbar , id ))
<
set_pev ( id , pev_viewmodel2 , _CrowbarModels [ 1 ])
set_pev ( id , pev_weaponmodel2 , _CrowbarModels [ 0 ])
>
else
<
set_pev ( id , pev_viewmodel2 , _FistModels [ 1 ])
set_pev ( id , pev_weaponmodel2 , _FistModels [ 0 ])
>
return PLUGIN_CONTINUE
>
public player_status ( id )
<
static type , player , CsTeams : team , name [ 32 ], health
type = read_data ( 1 )
player = read_data ( 2 )
switch ( type )
<
case ( 1 ):
<
ClearSyncHud ( id , g_HudSync [ 1 ][ _hudsync ])
>
case ( 2 ):
<
team = cs_get_user_team ( player )
if (( team != CS_TEAM_T ) && ( team != CS_TEAM_CT ))
return PLUGIN_HANDLED
health = get_user_health ( player )
get_user_name ( player , name , charsmax ( name ))
player_hudmessage ( id , 4 , 2.0 , < 0 , 255 , 0 >, «%L» , LANG_SERVER ,
( team == CS_TEAM_T ) ? «JBE_PRISONER_STATUS» : «JBE_GUARD_STATUS» , name , health )
>
>
return PLUGIN_HANDLED
>
public impulse_100 ( id )
<
if ( cs_get_user_team ( id ) == CS_TEAM_T )
return PLUGIN_HANDLED
public player_spawn ( id )
<
static CsTeams : team
if (! is_user_connected ( id ))
return HAM_IGNORED
set_pdata_float ( id , m_fNextHudTextArgsGameTime , get_gametime () + 999999.0 )
player_strip_weapons ( id )
if ( g_RoundEnd )
<
g_RoundEnd = 0
g_JailDay ++
>
set_user_rendering ( id , kRenderFxNone , 0 , 0 , 0 , kRenderNormal , 0 )
clear_bit ( g_PlayerCrowbar , id )
clear_bit ( g_PlayerWanted , id )
team = cs_get_user_team ( id )
switch ( team )
<
case ( CS_TEAM_T ):
<
g_PlayerLast = 0
if (! g_PlayerReason [ id ])
g_PlayerReason [ id ] = random_num ( 1 , 6 )
player_hudmessage ( id , 0 , 5.0 , < 255 , 0 , 255 >, «%L %L» , LANG_SERVER , «JBE_PRISONER_REASON» ,
LANG_SERVER , g_Reasons [ g_PlayerReason [ id ]])
set_user_info ( id , «model» , «jail_ssss» )
entity_set_int ( id , EV_INT_body , 2 )
if ( is_freeday () || get_bit ( g_FreedayAuto , id ))
<
freeday_set ( 0 , id )
clear_bit ( g_FreedayAuto , id )
>
else
<
entity_set_int ( id , EV_INT_skin , random_num ( 0 , 5 ))
>
if ( g_CrowbarCount get_pcvar_num ( gp_CrowbarMax ))
<
if ( random_num ( 0 , g_MaxClients ) > ( g_MaxClients / 2 ))
<
g_CrowbarCount ++
set_bit ( g_PlayerCrowbar , id )
>
>
cs_set_user_armor ( id , 0 , CS_ARMOR_NONE )
>
case ( CS_TEAM_CT ):
<
g_PlayerSimon [ id ]++
set_user_info ( id , «model» , «jail_ssss» )
entity_set_int ( id , EV_INT_body , 3 )
cs_set_user_armor ( id , 100 , CS_ARMOR_VESTHELM )
>
>
first_join ( id )
return HAM_IGNORED
>
public player_damage ( victim , ent , attacker , Float : damage , bits )
<
if (! is_user_connected ( victim ) || ! is_user_connected ( attacker ) || victim == attacker )
return HAM_IGNORED
switch ( g_Duel )
<
case ( 0 ):
<
if ( attacker == ent && get_user_weapon ( attacker ) == CSW_KNIFE && get_bit ( g_PlayerCrowbar , attacker ) && cs_get_user_team ( victim ) != CS_TEAM_T )
<
SetHamParamFloat ( 4 , damage * gc_CrowbarMul )
return HAM_OVERRIDE
>
>
case ( 2 ):
<
if ( attacker != g_PlayerLast )
return HAM_SUPERCEDE
>
default :
<
if (( victim == g_DuelA && attacker == g_DuelB ) || ( victim == g_DuelB && attacker == g_DuelA ))
return HAM_IGNORED
public player_attack ( victim , attacker , Float : damage , Float : direction [ 3 ], tracehandle , damagebits )
<
static CsTeams : vteam , CsTeams : ateam
if (! is_user_connected ( victim ) || ! is_user_connected ( attacker ) || victim == attacker )
return HAM_IGNORED
vteam = cs_get_user_team ( victim )
ateam = cs_get_user_team ( attacker )
if ( ateam == CS_TEAM_CT && vteam == CS_TEAM_CT )
return HAM_SUPERCEDE
switch ( g_Duel )
<
case ( 0 ):
<
if ( ateam == CS_TEAM_CT && vteam == CS_TEAM_T )
<
if ( get_bit ( g_PlayerRevolt , victim ))
<
clear_bit ( g_PlayerRevolt , victim )
hud_status ( 0 )
>
return HAM_IGNORED
>
>
case ( 2 ):
<
if ( attacker != g_PlayerLast )
return HAM_SUPERCEDE
>
default :
<
if (( victim == g_DuelA && attacker == g_DuelB ) || ( victim == g_DuelB && attacker == g_DuelA ))
return HAM_IGNORED
if ( ateam == CS_TEAM_T && vteam == CS_TEAM_T && ! g_BoxStarted )
return HAM_SUPERCEDE
if ( ateam == CS_TEAM_T && vteam == CS_TEAM_CT )
<
if (! g_PlayerRevolt )
revolt_start ()
set_bit ( g_PlayerRevolt , attacker )
>
public button_attack ( button , id , Float : damage , Float : direction [ 3 ], tracehandle , damagebits )
<
if ( is_valid_ent ( button ) && gc_ButtonShoot )
<
ExecuteHamB ( Ham_Use , button , id , 0 , 2 , 1.0 )
entity_set_float ( button , EV_FL_frame , 0.0 )
>
public player_killed ( victim , attacker , shouldgib )
<
static CsTeams : vteam , CsTeams : kteam
if (!( 0 attacker g_MaxClients ) || ! is_user_connected ( attacker ))
kteam = CS_TEAM_UNASSIGNED
else
kteam = cs_get_user_team ( attacker )
vteam = cs_get_user_team ( victim )
if ( g_Simon == victim )
<
g_Simon = 0
ClearSyncHud ( 0 , g_HudSync [ 2 ][ _hudsync ])
player_hudmessage ( 0 , 2 , 5.0 , _ , «%L» , LANG_SERVER , «JBE_SIMON_KILLED» )
>
switch ( g_Duel )
<
case ( 0 ):
<
switch ( vteam )
<
case ( CS_TEAM_CT ):
<
if ( kteam == CS_TEAM_T && ! get_bit ( g_PlayerWanted , attacker ))
<
set_bit ( g_PlayerWanted , attacker )
entity_set_int ( attacker , EV_INT_skin , 7 )
if ( get_pcvar_num ( gp_GlowModels ))
player_glow ( attacker , g_Colors [ 3 ])
>
>
case ( CS_TEAM_T ):
<
clear_bit ( g_PlayerRevolt , victim )
clear_bit ( g_PlayerWanted , victim )
>
>
>
default :
<
if ( g_Duel != 2 && ( attacker == g_DuelA || attacker == g_DuelB ))
<
set_user_rendering ( victim , kRenderFxNone , 0 , 0 , 0 , kRenderNormal , 0 )
set_user_rendering ( attacker , kRenderFxNone , 0 , 0 , 0 , kRenderNormal , 0 )
g_Duel = 0
g_LastDenied = 0
g_BlockWeapons = 0
g_PlayerLast = 0
team_count ()
>
>
>
hud_status ( 0 )
return HAM_IGNORED
>
public player_touchweapon ( id , ent )
<
static model [ 32 ], class [ 32 ]
if ( g_BlockWeapons )
return HAM_SUPERCEDE
if ( is_valid_ent ( id ) && g_Duel != 6 && is_user_alive ( ent ) && cs_get_user_team ( ent ) == CS_TEAM_CT )
<
entity_get_string ( id , EV_SZ_model , model , charsmax ( model ))
if ( model [ 7 ] == ‘w’ && model [ 9 ] == ‘h’ && model [ 10 ] == ‘e’ && model [ 11 ] == ‘g’ )
<
entity_get_string ( id , EV_SZ_classname , class , charsmax (class))
if ( equal (class, «weapon_hegrenade» ))
remove_entity ( id )
public set_client_kv ( id , const info [], const key [])
<
if ( equal ( key , «model» ))
return FMRES_SUPERCEDE
public sound_emit ( id , channel , sample [])
<
if ( is_user_alive ( id ) && equal ( sample , «weapons/knife_» , 14 ))
<
switch ( sample [ 17 ])
<
case ( ‘b’ ):
<
emit_sound ( id , CHAN_WEAPON , «weapons/cbar_hitbod2.wav» , 1.0 , ATTN_NORM , 0 , PITCH_NORM )
>
case ( ‘w’ ):
<
emit_sound ( id , CHAN_WEAPON , «weapons/cbar_hitbod1.wav» , 1.0 , ATTN_NORM , 0 , PITCH_LOW )
>
case ( ‘1’ , ‘2’ ):
<
emit_sound ( id , CHAN_WEAPON , «weapons/bullet_hit2.wav» , random_float ( 0.5 , 1.0 ), ATTN_NORM , 0 , PITCH_NORM )
>
>
return FMRES_SUPERCEDE
>
return FMRES_IGNORED
>
public voice_listening ( receiver , sender , bool : listen )
<
if (( receiver == sender ))
return FMRES_IGNORED
if ( is_user_admin ( sender ))
<
engfunc ( EngFunc_SetClientListening , receiver , sender , true )
return FMRES_SUPERCEDE
>
switch ( gc_VoiceBlock )
<
case ( 2 ):
<
if (( sender != g_Simon ) && (! get_bit ( g_SimonVoice , sender ) && gc_VoiceBlock ))
<
engfunc ( EngFunc_SetClientListening , receiver , sender , false )
return FMRES_SUPERCEDE
>
>
case ( 1 ):
<
if (! get_bit ( g_SimonVoice , sender ) && gc_VoiceBlock )
<
engfunc ( EngFunc_SetClientListening , receiver , sender , false )
return FMRES_SUPERCEDE
>
>
>
if (! is_user_alive ( sender ))
<
engfunc ( EngFunc_SetClientListening , receiver , sender , false )
return FMRES_SUPERCEDE
>
if ( sender == g_Simon )
<
engfunc ( EngFunc_SetClientListening , receiver , sender , true )
return FMRES_SUPERCEDE
>
if ( g_SimonTalking && ( sender != g_Simon ))
<
listen = false
>
else
<
static CsTeams : steam
steam = cs_get_user_team ( sender )
switch ( gc_TalkMode )
<
case ( 2 ):
<
listen = ( steam == CS_TEAM_CT )
>
case ( 1 ):
<
listen = ( steam == CS_TEAM_CT || steam == CS_TEAM_T )
>
>
>
engfunc ( EngFunc_SetClientListening , receiver , sender , listen )
return FMRES_SUPERCEDE
>
public player_cmdstart ( id , uc , random )
<
if ( is_user_alive ( id ) && g_Duel > 3 )
<
cs_set_user_bpammo ( id , _Duel [ g_Duel — 4 ][ _csw ], 1 )
>
>
public round_first ()
<
g_JailDay = 0
for ( new i = 1 ; i g_MaxClients ; i ++)
g_PlayerSimon [ i ] = 0
set_cvar_num ( «sv_alltalk» , 1 )
set_cvar_num ( «mp_roundtime» , 5 )
set_cvar_num ( «mp_limitteams» , 0 )
set_cvar_num ( «mp_autoteambalance» , 0 )
set_cvar_num ( «mp_tkpunish» , 0 )
set_cvar_num ( «mp_friendlyfire» , 1 )
round_end ()
>
public round_end ()
<
static CsTeams : team
static maxnosimon , spectrounds
g_SafeTime = 0
g_PlayerRevolt = 0
g_PlayerFreeday = 0
g_PlayerLast = 0
g_BoxStarted = 0
g_CrowbarCount = 0
g_Simon = 0
g_SimonAllowed = 0
g_RoundStarted = 0
g_LastDenied = 0
g_BlockWeapons = 0
g_TeamCount [ CS_TEAM_T ] = 0
g_TeamCount [ CS_TEAM_CT ] = 0
g_Freeday = 0
g_FreedayNext = ( random_num ( 0 , 99 ) >= 95 )
g_RoundEnd = 1
g_Duel = 0
remove_task ( TASK_STATUS )
remove_task ( TASK_FREEDAY )
remove_task ( TASK_FREEEND )
remove_task ( TASK_ROUND )
maxnosimon = get_pcvar_num ( gp_NosimonRounds )
spectrounds = get_pcvar_num ( gp_SpectRounds )
for ( new i = 1 ; i g_MaxClients ; i ++)
<
if (! is_user_connected ( i ))
continue
menu_cancel ( i )
team = cs_get_user_team ( i )
player_strip_weapons ( i )
switch ( team )
<
case ( CS_TEAM_CT ):
<
if ( g_PlayerSimon [ i ] > maxnosimon )
<
cmd_nomic ( i )
>
>
case ( CS_TEAM_SPECTATOR , CS_TEAM_UNASSIGNED ):
<
g_PlayerSpect [ i ]++
if ( g_PlayerSpect [ i ] > spectrounds )
<
client_cmd ( i , «disconnect» )
server_print ( «[ssss] Razyedeni za afk v spectorah #%i» , i )
>
else
<
show_menu ( i , 51 , TEAM_MENU , — 1 )
>
>
>
>
for ( new i = 0 ; i sizeof ( g_HudSync ); i ++)
ClearSyncHud ( 0 , g_HudSync [ i ][ _hudsync ])
public round_start ()
<
if ( g_RoundEnd )
return
team_count ()
if (! g_Simon && is_freeday ())
<
g_Freeday = 1
emit_sound ( 0 , CHAN_AUTO , «jailB_ssss/brass_bell_C.wav» , 1.0 , ATTN_NORM , 0 , PITCH_NORM )
check_freeday ( TASK_FREEDAY )
>
else
<
set_task ( 60.0 , «check_freeday» , TASK_FREEDAY )
>
set_task ( HUD_DELAY , «hud_status» , TASK_STATUS , _ , _ , «b» )
set_task ( get_pcvar_float ( gp_RetryTime ) + 1.0 , «safe_time» , TASK_SAFETIME )
set_task ( 300.0 , «freeday_end» , TASK_FREEDAY )
g_SimonRandom = get_pcvar_num ( gp_SimonRandom ) ? random_float ( 15.0 , 45.0 ) : 0.0
g_SimonAllowed = 1
g_FreedayNext = 0
>
public cmd_jointeam ( id )
<
return PLUGIN_HANDLED
>
public cmd_joinclass ( id )
<
return PLUGIN_HANDLED
>
public cmd_voiceon ( id )
<
client_cmd ( id , «+voicerecord» )
set_bit ( g_SimonVoice , id )
if ( g_Simon == id || is_user_admin ( id ))
set_bit ( g_SimonTalking , id )
public cmd_voiceoff ( id )
<
client_cmd ( id , «-voicerecord» )
clear_bit ( g_SimonVoice , id )
if ( g_Simon == id || is_user_admin ( id ))
clear_bit ( g_SimonTalking , id )
public cmd_simon ( id )
<
static CsTeams : team , name [ 32 ]
if (! is_user_connected ( id ))
return PLUGIN_HANDLED
team = cs_get_user_team ( id )
if ( g_SimonAllowed && ! g_Freeday && is_user_alive ( id ) && team == CS_TEAM_CT && ! g_Simon )
<
g_Simon = id
get_user_name ( id , name , charsmax ( name ))
entity_set_int ( id , EV_INT_body , 1 )
g_PlayerSimon [ id ]—
hud_status ( 0 )
>
return PLUGIN_HANDLED
>
public cmd_open ( id )
<
if ( id == g_Simon )
jail_open ()
public cmd_nomic ( id )
<
static CsTeams : team
team = cs_get_user_team ( id )
if ( team == CS_TEAM_CT )
<
server_print ( «JBE Transfered guard to prisoners team client #%i» , id )
if ( g_Simon == id )
<
g_Simon = 0
player_hudmessage ( 0 , 2 , 5.0 , _ , «%L» , LANG_SERVER , «JBE_SIMON_TRANSFERED» )
>
if (! is_user_admin ( id ))
set_bit ( g_PlayerNomic , id )
user_silentkill ( id )
cs_set_user_team ( id , CS_TEAM_T )
>
return PLUGIN_HANDLED
>
public cmd_box ( id )
<
static i
if (( id 0 ) || ( is_user_alive ( id ) && g_Simon == id ))
<
if ( g_TeamAlive [ CS_TEAM_T ] get_pcvar_num ( gp_BoxMax ) && g_TeamAlive [ CS_TEAM_T ] > 1 )
<
for ( i = 1 ; i g_MaxClients ; i ++)
if ( is_user_alive ( i ) && cs_get_user_team ( i ) == CS_TEAM_T )
set_user_health ( i , 100 )
set_cvar_num ( «mp_tkpunish» , 0 )
set_cvar_num ( «mp_friendlyfire» , 1 )
g_BoxStarted = 1
player_hudmessage ( 0 , 1 , 3.0 , _ , «%L» , LANG_SERVER , «JBE_GUARD_BOX» )
>
else
<
player_hudmessage ( id , 1 , 3.0 , _ , «%L» , LANG_SERVER , «JBE_GUARD_CANTBOX» )
>
>
return PLUGIN_HANDLED
>
public cmd_help ( id )
<
if ( id > g_MaxClients )
id -= TASK_HELP
remove_task ( TASK_HELP + id )
switch ( get_bit ( g_PlayerHelp , id ))
<
case ( 0 ):
<
set_bit ( g_PlayerHelp , id )
player_hudmessage ( id , 7 , 15.0 , < 230 , 100 , 10 >, «%s» , g_HelpText )
set_task ( 15.0 , «cmd_help» , TASK_HELP + id )
>
default :
<
clear_bit ( g_PlayerHelp , id )
ClearSyncHud ( id , g_HudSync [ 7 ][ _hudsync ])
>
>
>
public cmd_freeday ( id )
<
static menu , menuname [ 32 ], option [ 64 ]
if (! is_freeday () && (( is_user_alive ( id ) && g_Simon == id )))
<
formatex ( menuname , charsmax ( menuname ), «%L» , LANG_SERVER , «JBE_MENU_FREEDAY» )
menu = menu_create ( menuname , «freeday_choice» )
formatex ( option , charsmax ( option ), «%L» , LANG_SERVER , «JBE_MENU_FREEDAY_PLAYER» )
menu_additem ( menu , option , «1» , 0 )
formatex ( option , charsmax ( option ), «%L» , LANG_SERVER , «JBE_MENU_FREEDAY_ALL» )
menu_additem ( menu , option , «2» , 0 )
menu_display ( id , menu )
>
else <
client_print ( id , print_chat , «Р’С‹ РЅРµ Саймон!» )
>
return PLUGIN_HANDLED
>
public cmd_freeday_player ( id )
<
if (( is_user_alive ( id ) && g_Simon == id ))
menu_players ( id , CS_TEAM_T , id , 1 , «freeday_select» , «%L» , LANG_SERVER , «JBE_MENU_FREEDAY» )
public cmd_lastrequest ( id )
<
static i , num [ 5 ], menu , menuname [ 32 ], option [ 64 ]
if (! get_pcvar_num ( gp_LastRequest ) || g_LastDenied || id != g_PlayerLast || g_RoundEnd || ! is_user_alive ( id ))
return PLUGIN_CONTINUE
formatex ( menuname , charsmax ( menuname ), «%L» , LANG_SERVER , «JBE_MENU_LASTREQ» )
menu = menu_create ( menuname , «lastrequest_select» )
formatex ( option , charsmax ( option ), «%L» , LANG_SERVER , «JBE_MENU_LASTREQ_OPT1» )
menu_additem ( menu , option , «1» , 0 )
formatex ( option , charsmax ( option ), «%L» , LANG_SERVER , «JBE_MENU_LASTREQ_OPT2» )
menu_additem ( menu , option , «2» , 0 )
formatex ( option , charsmax ( option ), «%L» , LANG_SERVER , «JBE_MENU_LASTREQ_OPT3» )
menu_additem ( menu , option , «3» , 0 )
for ( i = 0 ; i sizeof ( _Duel ); i ++)
<
num_to_str ( i + 4 , num , charsmax ( num ))
formatex ( option , charsmax ( option ), «%L» , LANG_SERVER , _Duel [ i ][ _opt ])
menu_additem ( menu , option , num , 0 )
>
menu_display ( id , menu )
return PLUGIN_CONTINUE
>
public adm_freeday ( id )
<
static player , user [ 32 ]
if (! is_user_admin ( id ))
return PLUGIN_CONTINUE
read_argv ( 1 , user , charsmax ( user ))
player = cmd_target ( id , user , 2 )
if ( is_user_connected ( player ) && cs_get_user_team ( player ) == CS_TEAM_T )
<
freeday_set ( id , player )
>
return PLUGIN_HANDLED
>
public team_select ( id , key )
<
static CsTeams : team , roundloop , admin
roundloop = get_pcvar_num ( gp_RetryTime ) / 2
team = cs_get_user_team ( id )
admin = is_user_admin ( id )
team_count ()
if (! admin && ( team == CS_TEAM_UNASSIGNED ) && ( g_RoundStarted >= roundloop ) && g_TeamCount [ CS_TEAM_CT ] && g_TeamCount [ CS_TEAM_T ] && ! is_user_alive ( id ))
<
team_join ( id , CS_TEAM_SPECTATOR )
client_print ( id , print_center , «%L» , LANG_SERVER , «JBE_TEAM_CANTJOIN» )
return PLUGIN_HANDLED
>
switch ( key )
<
case ( 0 ):
<
if ( team == CS_TEAM_T )
return PLUGIN_HANDLED
g_PlayerReason [ id ] = random_num ( 1 , 6 )
team_join ( id , CS_TEAM_T )
>
case ( 1 ):
<
if ( team == CS_TEAM_CT || (! admin && get_bit ( g_PlayerNomic , id )))
return PLUGIN_HANDLED
if ( g_TeamCount [ CS_TEAM_CT ] ctcount_allowed () || admin )
team_join ( id , CS_TEAM_CT )
else
client_print ( id , print_center , «%L» , LANG_SERVER , «JBE_TEAM_CTFULL» )
>
case ( 5 ):
<
user_silentkill ( id )
team_join ( id , CS_TEAM_SPECTATOR )
>
>
return PLUGIN_HANDLED
>
public team_join ( id , CsTeams : team )
<
static restore , vgui , msgblock
restore = get_pdata_int ( id , m_iVGUI )
vgui = restore & ( 1 0 )
if ( vgui )
set_pdata_int ( id , m_iVGUI , restore &
switch ( team )
<
case CS_TEAM_SPECTATOR :
<
msgblock = get_msg_block ( g_MsgShowMenu )
set_msg_block ( g_MsgShowMenu , BLOCK_ONCE )
dllfunc ( DLLFunc_ClientPutInServer , id )
set_msg_block ( g_MsgShowMenu , msgblock )
set_pdata_int ( id , m_fGameHUDInitialized , 1 )
engclient_cmd ( id , «jointeam» , «6» )
>
case CS_TEAM_T , CS_TEAM_CT :
<
msgblock = get_msg_block ( g_MsgShowMenu )
set_msg_block ( g_MsgShowMenu , BLOCK_ONCE )
engclient_cmd ( id , «jointeam» , ( team == CS_TEAM_CT ) ? «2» : «1» )
engclient_cmd ( id , «joinclass» , «1» )
set_msg_block ( g_MsgShowMenu , msgblock )
g_PlayerSpect [ id ] = 0
>
>
if ( vgui )
set_pdata_int ( id , m_iVGUI , restore )
>
public team_count ()
<
static CsTeams : team , last
g_TeamCount [ CS_TEAM_UNASSIGNED ] = 0
g_TeamCount [ CS_TEAM_T ] = 0
g_TeamCount [ CS_TEAM_CT ] = 0
g_TeamCount [ CS_TEAM_SPECTATOR ] = 0
g_TeamAlive [ CS_TEAM_UNASSIGNED ] = 0
g_TeamAlive [ CS_TEAM_T ] = 0
g_TeamAlive [ CS_TEAM_CT ] = 0
g_TeamAlive [ CS_TEAM_SPECTATOR ] = 0
for ( new i = 1 ; i g_MaxClients ; i ++)
<
if ( is_user_connected ( i ))
<
team = cs_get_user_team ( i )
g_TeamCount [ team ]++
g_PlayerTeam [ i ] = team
if ( is_user_alive ( i ))
<
g_TeamAlive [ team ]++
if ( team == CS_TEAM_T )
last = i
>
>
else
<
g_PlayerTeam [ i ] = CS_TEAM_UNASSIGNED
>
>
if ( g_TeamAlive [ CS_TEAM_T ] == 1 )
<
if ( last != g_PlayerLast && g_SafeTime )
<
prisoner_last ( last )
>
>
else
<
if ( g_Duel || g_DuelA || g_DuelB )
<
if ( is_user_alive ( g_DuelA ))
<
set_user_rendering ( g_DuelA , kRenderFxNone , 0 , 0 , 0 , kRenderNormal , 0 )
player_strip_weapons ( g_DuelA )
>
if ( is_user_alive ( g_DuelB ))
<
set_user_rendering ( g_DuelB , kRenderFxNone , 0 , 0 , 0 , kRenderNormal , 0 )
player_strip_weapons ( g_DuelB )
>
>
g_PlayerLast = 0
g_DuelA = 0
g_DuelB = 0
g_Duel = 0
>
>
public revolt_start ()
<
client_cmd ( 0 , «speak ambience/siren» )
set_task ( 8.0 , «stop_sound» )
hud_status ( 0 )
>
public stop_sound ( task )
<
client_cmd ( 0 , «stopsound» )
>
public hud_status ( task )
<
static i , n
new name [ 32 ], szStatus [ 64 ], wanted [ 1024 ]
if ( g_RoundStarted ( get_pcvar_num ( gp_RetryTime ) / 2 ))
g_RoundStarted ++
if (! g_Freeday && ! g_Simon && g_SimonAllowed && ( 0.0 g_SimonRandom get_gametime ()))
<
cmd_simon ( random_num ( 1 , g_MaxClients ))
>
n = 0
formatex ( wanted , charsmax ( wanted ), «%L» , LANG_SERVER , «JBE_PRISONER_WANTED» )
n = strlen ( wanted )
for ( i = 0 ; i g_MaxClients ; i ++)
<
if ( get_bit ( g_PlayerWanted , i ) && is_user_alive ( i ) && n charsmax ( wanted ))
<
get_user_name ( i , name , charsmax ( name ))
n += copy ( wanted [ n ], charsmax ( wanted ) — n , «^n^t» )
n += copy ( wanted [ n ], charsmax ( wanted ) — n , name )
>
>
team_count ()
formatex ( szStatus , charsmax ( szStatus ), «%L» , LANG_SERVER , «JBE_STATUS» , g_TeamAlive [ CS_TEAM_T ], g_TeamCount [ CS_TEAM_T ])
message_begin ( MSG_BROADCAST , get_user_msgid ( «StatusText» ), < 0 , 0 , 0 >, 0 )
write_byte ( 0 )
write_string ( szStatus )
message_end ()
if ( g_Simon )
<
get_user_name ( g_Simon , name , charsmax ( name ))
player_hudmessage ( 0 , 2 , HUD_DELAY + 1.0 , < 0 , 255 , 0 >, «%L» , LANG_SERVER , «JBE_SIMON_FOLLOW» , name )
>
else if ( g_Freeday )
<
player_hudmessage ( 0 , 2 , HUD_DELAY + 1.0 , < 0 , 255 , 0 >, «%L» , LANG_SERVER , «JBE_STATUS_FREEDAY» )
>
if ( g_PlayerWanted )
player_hudmessage ( 0 , 3 , HUD_DELAY + 1.0 , < 255 , 25 , 50 >, «%s» , wanted )
else if ( g_PlayerRevolt )
player_hudmessage ( 0 , 3 , HUD_DELAY + 1.0 , < 255 , 25 , 50 >, «%L» , LANG_SERVER , «JBE_PRISONER_REVOLT» )
player_hudmessage ( 0 , 5 , HUD_DELAY + 1.0 , < 0 , 255 , 0 >, «%L» , LANG_SERVER , «JBE_STATUS_DAY» , g_JailDay )
gc_TalkMode = get_pcvar_num ( gp_TalkMode )
gc_VoiceBlock = get_pcvar_num ( gp_VoiceBlock )
gc_SimonSteps = get_pcvar_num ( gp_SimonSteps )
gc_ButtonShoot = get_pcvar_num ( gp_ButtonShoot )
gc_CrowbarMul = get_pcvar_float ( gp_CrowbarMul )
public safe_time ( task )
<
g_SafeTime = 1
>
public check_freeday ( task )
<
static Float : roundmax , i
if (! g_Simon && ! g_PlayerLast )
<
g_Freeday = 1
hud_status ( 0 )
roundmax = get_pcvar_float ( gp_RoundMax )
if ( roundmax > 0.0 )
<
for ( i = 1 ; i g_MaxClients ; i ++)
<
if ( is_user_alive ( i ) && cs_get_user_team ( i ) == CS_TEAM_T )
freeday_set ( 0 , i )
>
emit_sound ( 0 , CHAN_AUTO , «jailB_ssss/brass_bell_C.wav» , 1.0 , ATTN_NORM , 0 , PITCH_NORM )
player_hudmessage ( 0 , 8 , 3.0 , < 0 , 255 , 0 >, «%L» , LANG_SERVER , «JBE_STATUS_ENDTIMER» , floatround ( roundmax — 60.0 ))
remove_task ( TASK_ROUND )
set_task ( roundmax — 60.0 , «check_end» , TASK_ROUND )
>
>
if ( get_pcvar_num ( gp_AutoOpen ))
jail_open ()
>
public freeday_end ( task )
<
if ( g_Freeday || g_PlayerFreeday )
<
emit_sound ( 0 , CHAN_AUTO , «jailB_ssss/brass_bell_C.wav» , 1.0 , ATTN_NORM , 0 , PITCH_NORM )
player_hudmessage ( 0 , 8 , 3.0 , < 0 , 255 , 0 >, «%L» , LANG_SERVER , «JBE_STATUS_ENDFREEDAY» )
>
>
public check_end ( task )
<
team_count ()
for ( new i = 1 ; i g_MaxClients ; i ++)
<
if ( g_PlayerTeam [ i ] == CS_TEAM_T && is_user_alive ( i ))
<
user_silentkill ( i )
cs_set_user_deaths ( i , get_user_deaths ( i ) — 1 )
>
>
for ( new i = 1 ; i g_MaxClients ; i ++)
<
if ( g_PlayerTeam [ i ] == CS_TEAM_CT && is_user_alive ( i ))
<
user_silentkill ( i )
cs_set_user_deaths ( i , get_user_deaths ( i ) — 1 )
>
>
player_hudmessage ( 0 , 6 , 3.0 , < 0 , 255 , 0 >, «%L» , LANG_SERVER , «JBE_STATUS_ROUNDEND» )
>
public prisoner_last ( id )
<
static name [ 32 ], Float : roundmax
if ( is_user_alive ( id ) && cs_get_user_team ( id ) == CS_TEAM_T )
<
roundmax = get_pcvar_float ( gp_RoundMax )
get_user_name ( id , name , charsmax ( name ))
g_PlayerLast = id
player_hudmessage ( 0 , 6 , 5.0 , < 0 , 255 , 0 >, «%L» , LANG_SERVER , «JBE_PRISONER_LAST» , name )
remove_task ( TASK_ROUND )
if ( roundmax > 0.0 )
<
player_hudmessage ( 0 , 8 , 3.0 , < 0 , 255 , 0 >, «%L» , LANG_SERVER , «JBE_STATUS_ENDTIMER» , floatround ( roundmax — 60.0 ))
set_task ( roundmax — 60.0 , «check_end» , TASK_ROUND )
>
if (( g_TeamAlive [ CS_TEAM_CT ] > 0 ) && get_pcvar_num ( gp_AutoLastresquest ))
cmd_lastrequest ( id )
>
>
public freeday_select ( id , menu , item )
<
if ( item == MENU_EXIT )
<
menu_destroy ( menu )
return PLUGIN_HANDLED
>
static dst [ 32 ], data [ 5 ], player , access , callback
menu_item_getinfo ( menu , item , access , data , charsmax ( data ), dst , charsmax ( dst ), callback )
player = str_to_num ( data )
freeday_set ( id , player )
return PLUGIN_HANDLED
>
public duel_knives ( id , menu , item )
<
if ( item == MENU_EXIT )
<
menu_destroy ( menu )
g_LastDenied = 0
return PLUGIN_HANDLED
>
static dst [ 32 ], data [ 5 ], access , callback , option [ 128 ], player , src [ 32 ]
menu_item_getinfo ( menu , item , access , data , charsmax ( data ), dst , charsmax ( dst ), callback )
get_user_name ( id , src , charsmax ( src ))
player = str_to_num ( data )
formatex ( option , charsmax ( option ), «%L^n%L» , LANG_SERVER , «JBE_MENU_LASTREQ_SEL3» , src , LANG_SERVER , «JBE_MENU_DUEL_SEL» , src , dst )
player_hudmessage ( 0 , 6 , 3.0 , < 0 , 255 , 0 >, option )
g_DuelA = id
clear_bit ( g_PlayerCrowbar , id )
player_strip_weapons ( id )
player_glow ( id , g_Colors [ 3 ])
set_user_health ( id , 100 )
g_DuelB = player
player_strip_weapons ( player )
player_glow ( player , g_Colors [ 2 ])
set_user_health ( player , 100 )
g_BlockWeapons = 1
return PLUGIN_HANDLED
>
public duel_guns ( id , menu , item )
<
if (!( 4 g_Duel 7 ))
return PLUGIN_HANDLED
if ( item == MENU_EXIT )
<
menu_destroy ( menu )
g_LastDenied = 0
g_Duel = 0
return PLUGIN_HANDLED
>
static gun , dst [ 32 ], data [ 5 ], access , callback , option [ 128 ], player , src [ 32 ]
menu_item_getinfo ( menu , item , access , data , charsmax ( data ), dst , charsmax ( dst ), callback )
get_user_name ( id , src , charsmax ( src ))
player = str_to_num ( data )
formatex ( option , charsmax ( option ), «%L^n%L» , LANG_SERVER , _Duel [ g_Duel — 4 ][ _sel ], src , LANG_SERVER , «JBE_MENU_DUEL_SEL» , src , dst )
emit_sound ( 0 , CHAN_AUTO , «jailB_ssss/duelka.wav» , 1.0 , ATTN_NORM , 0 , PITCH_NORM )
player_hudmessage ( 0 , 6 , 3.0 , < 0 , 255 , 0 >, option )
g_DuelA = id
clear_bit ( g_PlayerCrowbar , id )
player_strip_weapons ( id )
gun = give_item ( id , _Duel [ g_Duel — 4 ][ _entname ])
cs_set_weapon_ammo ( gun , 1 )
set_user_health ( id , 100 )
player_glow ( id , g_Colors [ 3 ])
g_DuelB = player
player_strip_weapons ( player )
gun = give_item ( player , _Duel [ g_Duel — 4 ][ _entname ])
cs_set_weapon_ammo ( gun , 1 )
set_user_health ( player , 100 )
player_glow ( player , g_Colors [ 2 ])
g_BlockWeapons = 1
return PLUGIN_HANDLED
>
public freeday_choice ( id , menu , item )
<
if ( item == MENU_EXIT )
<
menu_destroy ( menu )
return PLUGIN_HANDLED
>
static dst [ 32 ], data [ 5 ], access , callback
menu_item_getinfo ( menu , item , access , data , charsmax ( data ), dst , charsmax ( dst ), callback )
menu_destroy ( menu )
get_user_name ( id , dst , charsmax ( dst ))
switch ( data [ 0 ])
<
case ( ‘1’ ):
<
cmd_freeday_player ( id )
>
case ( ‘2’ ):
<
if (( id == g_Simon ) || is_user_admin ( id ))
<
g_Simon = 0
get_user_name ( id , dst , charsmax ( dst ))
client_print ( 0 , print_chat , «%s дал всем свободный день! гуляем. » , dst )
server_print ( «JBE Client %i gives freeday for everyone» , id )
check_freeday ( TASK_FREEDAY )
>
>
>
return PLUGIN_HANDLED
>
public lastrequest_select ( id , menu , item )
<
if ( item == MENU_EXIT )
<
menu_destroy ( menu )
return PLUGIN_HANDLED
>
static i , dst [ 32 ], data [ 5 ], access , callback , option [ 64 ]
menu_item_getinfo ( menu , item , access , data , charsmax ( data ), dst , charsmax ( dst ), callback )
get_user_name ( id , dst , charsmax ( dst ))
switch ( data [ 0 ])
<
case ( ‘1’ ):
<
formatex ( option , charsmax ( option ), «%L» , LANG_SERVER , «JBE_MENU_LASTREQ_SEL1» , dst )
player_hudmessage ( 0 , 6 , 3.0 , < 0 , 255 , 0 >, option )
set_bit ( g_FreedayAuto , id )
user_silentkill ( id )
>
case ( ‘2’ ):
<
formatex ( option , charsmax ( option ), «%L» , LANG_SERVER , «JBE_MENU_LASTREQ_SEL2» , dst )
player_hudmessage ( 0 , 6 , 3.0 , < 0 , 255 , 0 >, option )
g_Duel = 2
player_strip_weapons_all ()
i = random_num ( 0 , sizeof ( _WeaponsFree ) — 1 )
give_item ( id , _WeaponsFree [ i ])
g_BlockWeapons = 1
cs_set_user_bpammo ( id , _WeaponsFreeCSW [ i ], _WeaponsFreeAmmo [ i ])
>
case ( ‘3’ ):
<
g_Duel = 3
menu_players ( id , CS_TEAM_CT , 0 , 1 , «duel_knives» , «%L» , LANG_SERVER , «JBE_MENU_DUEL» )
>
default :
<
g_Duel = str_to_num ( data )
menu_players ( id , CS_TEAM_CT , 0 , 1 , «duel_guns» , «%L» , LANG_SERVER , «JBE_MENU_DUEL» )
>
>
g_LastDenied = 1
menu_destroy ( menu )
return PLUGIN_HANDLED
>
public setup_buttons ()
<
new ent [ 3 ]
new Float : origin [ 3 ]
new info [ 32 ]
new pos
while (( pos sizeof ( g_Buttons )) && ( ent [ 0 ] = engfunc ( EngFunc_FindEntityByString , ent [ 0 ], «classname» , «info_player_deathmatch» )))
<
pev ( ent [ 0 ], pev_origin , origin )
while (( ent [ 1 ] = engfunc ( EngFunc_FindEntityInSphere , ent [ 1 ], origin , CELL_RADIUS )))
<
if (! is_valid_ent ( ent [ 1 ]))
continue
entity_get_string ( ent [ 1 ], EV_SZ_classname , info , charsmax ( info ))
if (! equal ( info , «func_door» ))
continue
entity_get_string ( ent [ 1 ], EV_SZ_targetname , info , charsmax ( info ))
if (! info [ 0 ])
continue
if ( TrieKeyExists ( g_CellManagers , info ))
<
TrieGetCell ( g_CellManagers , info , ent [ 2 ])
>
else
<
ent [ 2 ] = engfunc ( EngFunc_FindEntityByString , 0 , «target» , info )
>
if ( is_valid_ent ( ent [ 2 ]) && ( in_array ( ent [ 2 ], g_Buttons , sizeof ( g_Buttons )) 0 ))
<
g_Buttons [ pos ] = ent [ 2 ]
pos ++
break
>
>
>
TrieDestroy ( g_CellManagers )
>
stock in_array ( needle , data [], size )
<
for ( new i = 0 ; i size ; i ++)
<
if ( data [ i ] == needle )
return i
>
return — 1
>
stock freeday_set ( id , player )
<
static src [ 32 ], dst [ 32 ]
get_user_name ( player , dst , charsmax ( dst ))
if ( is_user_alive ( player ) && ! get_bit ( g_PlayerWanted , player ))
<
set_bit ( g_PlayerFreeday , player )
entity_set_int ( player , EV_INT_skin , 6 )
if ( get_pcvar_num ( gp_GlowModels ))
player_glow ( player , g_Colors [ 1 ])
if ( 0 id g_MaxClients )
<
get_user_name ( id , src , charsmax ( src ))
player_hudmessage ( 0 , 6 , 3.0 , < 0 , 255 , 0 >, «%L» , LANG_SERVER , «JBE_GUARD_FREEDAYGIVE» , src , dst )
>
else if (! is_freeday ())
<
player_hudmessage ( 0 , 6 , 3.0 , < 0 , 255 , 0 >, «%L» , LANG_SERVER , «JBE_PRISONER_HASFREEDAY» , dst )
>
>
>
stock first_join ( id )
<
if (! get_bit ( g_PlayerJoin , id ))
<
set_bit ( g_PlayerJoin , id )
clear_bit ( g_PlayerHelp , id )
set_task ( 5.0 , «cmd_help» , TASK_HELP + id )
>
>
stock ctcount_allowed ()
<
static count
count = (( g_TeamCount [ CS_TEAM_T ] + g_TeamCount [ CS_TEAM_CT ]) / get_pcvar_num ( gp_TeamRatio ))
if ( count 2 )
count = 2
else if ( count > get_pcvar_num ( gp_CtMax ))
count = get_pcvar_num ( gp_CtMax )
stock player_hudmessage ( id , hudid , Float : time = 0.0 , color [ 3 ] = < 0 , 255 , 0 >, msg [], any . )
<
static text [ 512 ], Float : x , Float : y
x = g_HudSync [ hudid ][ _x ]
y = g_HudSync [ hudid ][ _y ]
if ( time > 0 )
set_hudmessage ( color [ 0 ], color [ 1 ], color [ 2 ], x , y , 0 , 0.00 , time , 0.00 , 0.00 )
else
set_hudmessage ( color [ 0 ], color [ 1 ], color [ 2 ], x , y , 0 , 0.00 , g_HudSync [ hudid ][ _time ], 0.00 , 0.00 )
vformat ( text , charsmax ( text ), msg , 6 )
ShowSyncHudMsg ( id , g_HudSync [ hudid ][ _hudsync ], text )
>
stock menu_players ( id , CsTeams : team , skip , alive , callback [], title [], any . )
<
static i , name [ 32 ], num [ 5 ], menu , menuname [ 32 ]
vformat ( menuname , charsmax ( menuname ), title , 7 )
menu = menu_create ( menuname , callback )
for ( i = 1 ; i g_MaxClients ; i ++)
<
if (! is_user_connected ( i ) || ( alive && ! is_user_alive ( i )) || ( skip == i ))
continue
if (!( team == CS_TEAM_T || team == CS_TEAM_CT ) || (( team == CS_TEAM_T || team == CS_TEAM_CT ) && ( cs_get_user_team ( i ) == team )))
<
get_user_name ( i , name , charsmax ( name ))
num_to_str ( i , num , charsmax ( num ))
menu_additem ( menu , name , num , 0 )
>
>
menu_display ( id , menu )
>
stock player_glow ( id , color [ 3 ], amount = 40 )
<
set_user_rendering ( id , kRenderFxGlowShell , color [ 0 ], color [ 1 ], color [ 2 ], kRenderNormal , amount )
>
stock player_strip_weapons ( id )
<
strip_user_weapons ( id )
give_item ( id , «weapon_knife» )
set_pdata_int ( id , m_iPrimaryWeapon , 0 )
>
stock player_strip_weapons_all ()
<
for ( new i = 1 ; i g_MaxClients ; i ++)
<
if ( is_user_alive ( i ))
<
player_strip_weapons ( i )
>
>
>
stock is_freeday ()
<
return ( g_FreedayNext || g_Freeday || ( g_JailDay == 1 ))
>
public jail_open ()
<
static i
for ( i = 0 ; i sizeof ( g_Buttons ); i ++)
<
if ( g_Buttons [ i ])
<
ExecuteHamB ( Ham_Use , g_Buttons [ i ], 0 , 0 , 1 , 1.0 )
entity_set_float ( g_Buttons [ i ], EV_FL_frame , 0.0 )
>
>
>
Код: Выделить всё L 01/01/2012 — 17:15:59: [FUN] Invalid player 8
L 01/01/2012 — 17:15:59: [AMXX] Displaying debug trace (plugin «jbextreme.amxx»)
L 01/01/2012 — 17:15:59: [AMXX] Run time error 10: native error (native «strip_user_weapons»)
L 01/01/2012 — 17:15:59: [AMXX] [0] jbextreme.sma::player_strip_weapons (line 1790)
L 01/01/2012 — 17:15:59: [AMXX] [1] jbextreme.sma::duel_guns (line 1557)
[L 01/02/2012 — 03:36:56: [FUN] Player out of range (0)
L 01/02/2012 — 03:36:56: [AMXX] Displaying debug trace (plugin «jbextreme.amxx»)
L 01/02/2012 — 03:36:56: [AMXX] Run time error 10: native error (native «set_user_rendering»)
L 01/02/2012 — 03:36:56: [AMXX] [0] jbextreme.sma::player_killed (line 737)
L 01/04/2012 — 21:30:22: [CSTRIKE] Invalid player 32
L 01/04/2012 — 21:30:22: [AMXX] Displaying debug trace (plugin «jbextreme.amxx»)
L 01/04/2012 — 21:30:22: [AMXX] Run time error 10: native error (native «cs_get_user_team»)
L 01/04/2012 — 21:30:22: [AMXX] [0] jbextreme.sma::player_status (line 508)
L 01/06/2012 — 00:22:37: [CSTRIKE] Non-player entity -1 out of range
L 01/06/2012 — 00:22:37: [AMXX] Displaying debug trace (plugin «jbextreme.amxx»)
L 01/06/2012 — 00:22:37: [AMXX] Run time error 10: native error (native «cs_set_weapon_ammo»)
L 01/06/2012 — 00:22:37: [AMXX] [0] jbextreme.sma::duel_guns (line 1559)
L 01/09/2012 — 00:51:47: [CSTRIKE] Non-player entity -1 out of range
L 01/09/2012 — 00:51:47: [AMXX] Displaying debug trace (plugin «jbextreme.amxx»)
L 01/09/2012 — 00:51:47: [AMXX] Run time error 10: native error (native «cs_set_weapon_ammo»)
L 01/09/2012 — 00:51:47: [AMXX] [0] jbextreme.sma::duel_guns (line 1552)
код большой(
ниже буду ошибки выкладывать!
Источник
JailBreak Extreme : [AMXX] Run time error 10: native error
Модератор: liFe iS GoOD
- Список форумов ‹ AMX Mod X ‹ Вопросы по AMXX и его плагинам
Правила форума
1. Запрещено материться и оскорблять других участников форума.
2. Запрещен флуд, оффтоп, дабл постинг во всех разделах форума, кроме раздела «Болтовня».
3. Запрещено взламывать сайт/форум или наносить любой вред проекту.
4. Запрещено рекламировать другие ресурсы.
5. Запрещено создавать темы без информативного названия. Название темы должно отображать ее смысл.
В данном разделе форума разрешено создавать темы, касающие только вопросов по AMX Mod X и его плагинам.
- Ответить с цитатой
JailBreak Extreme : [AMXX] Run time error 10: native error
- Код: Выделить всё
#include <amxmodx>
#include <amxmisc>
#include <engine>
#include <fakemeta>
#include <hamsandwich>
#include <fun>
#include <cstrike>
#define PLUGIN_NAME "JailBreak Extreme"
#define PLUGIN_AUTHOR "ssss"
#define PLUGIN_VERSION "2.0"
#define PLUGIN_CVAR "jbextreme"#define TASK_STATUS 2487000
#define TASK_FREEDAY 2487100
#define TASK_ROUND 2487200
#define TASK_HELP 2487300
#define TASK_SAFETIME 2487400
#define TASK_FREEEND 2487500
#define TEAM_MENU "#Team_Select_Spect"
#define TEAM_MENU2 "#Team_Select_Spect"
#define HUD_DELAY Float:4.0
#define CELL_RADIUS Float:200.0#define get_bit(%1,%2) ( %1 & 1 << ( %2 & 31 ) )
#define set_bit(%1,%2) %1 |= ( 1 << ( %2 & 31 ) )
#define clear_bit(%1,%2) %1 &= ~( 1 << ( %2 & 31 ) )#define vec_len(%1) floatsqroot(%1[0] * %1[0] + %1[1] * %1[1] + %1[2] * %1[2])
#define vec_mul(%1,%2) ( %1[0] *= %2, %1[1] *= %2, %1[2] *= %2)
#define vec_copy(%1,%2) ( %2[0] = %1[0], %2[1] = %1[1],%2[2] = %1[2])// Offsets
#define m_iPrimaryWeapon 116
#define m_iVGUI 510
#define m_fGameHUDInitialized 349
#define m_fNextHudTextArgsGameTime 198
enum _hud { _hudsync, Float:_x, Float:_y, Float:_time }
enum _lastrequest { _knife, _deagle, _freeday, _weapon }
enum _duel { _name[16], _csw, _entname[32], _opt[32], _sel[32] }new gp_PrecacheSpawn
new gp_PrecacheKeyValuenew gp_CrowbarMax
new gp_CrowbarMul
new gp_TeamRatio
new gp_CtMax
new gp_BoxMax
new gp_TalkMode
new gp_VoiceBlock
new gp_RetryTime
new gp_RoundMax
new gp_ButtonShoot
new gp_SimonSteps
new gp_SimonRandom
new gp_GlowModels
new gp_AutoLastresquest
new gp_LastRequest
new gp_Motd
new gp_SpectRounds
new gp_NosimonRounds
new gp_AutoOpen
new gp_TeamChangenew g_MaxClients
new g_MsgStatusText
new g_MsgStatusIcon
new g_MsgVGUIMenu
new g_MsgShowMenu
new g_MsgClCorpse
new g_MsgMOTDnew gc_TalkMode
:gc_CrowbarMul// Precache
new gc_VoiceBlock
new gc_SimonSteps
new gc_ButtonShoot
new Float
new const _FistModels[][] = { "models/p_bknuckles.mdl", "models/v_by_ssss.mdl" }
new const _CrowbarModels[][] = { "models/p_crowbar.mdl", "models/v_crowbar.mdl" }
new const _FistSounds[][] = { "weapons/cbar_hitbod2.wav", "weapons/cbar_hitbod1.wav", "weapons/bullet_hit1.wav", "weapons/bullet_hit2.wav" }
new const _RemoveEntities[][] = {
"func_hostage_rescue", "info_hostage_rescue", "func_bomb_target", "info_bomb_target",
"hostage_entity", "info_vip_start", "func_vip_safetyzone", "func_escapezone"
}new const _WeaponsFree[][] = { "weapon_scout", "weapon_deagle", "weapon_mac10", "weapon_elite", "weapon_ak47", "weapon_m4a1", "weapon_mp5navy" }
new const _WeaponsFreeCSW[] = { CSW_SCOUT, CSW_DEAGLE, CSW_MAC10, CSW_ELITE, CSW_AK47, CSW_M4A1, CSW_MP5NAVY }
new const _WeaponsFreeAmmo[] = { 90, 35, 100, 120, 90, 90, 120 }new const _Duel[][_duel] =
{
{ "Deagle", CSW_DEAGLE, "weapon_deagle", "JBE_MENU_LASTREQ_OPT4", "JBE_MENU_LASTREQ_SEL4" },
{ "Scout", CSW_SCOUT, "weapon_scout", "JBE_MENU_LASTREQ_OPT5", "JBE_MENU_LASTREQ_SEL5" },
{ "Grenades", CSW_HEGRENADE, "weapon_hegrenade", "JBE_MENU_LASTREQ_OPT6", "JBE_MENU_LASTREQ_SEL6" },
{ "Awp", CSW_AWP, "weapon_awp", "JBE_MENU_LASTREQ_OPT7", "JBE_MENU_LASTREQ_SEL7" }
}// Reasons
new const g_Reasons[][] = {
"",
"JBE_PRISONER_REASON_1",
"JBE_PRISONER_REASON_2",
"JBE_PRISONER_REASON_3",
"JBE_PRISONER_REASON_4",
"JBE_PRISONER_REASON_5",
"JBE_PRISONER_REASON_6"
}// HudSync: 0=ttinfo / 1=info / 2=simon / 3=ctinfo / 4=player / 5=day / 6=center / 7=help / 8=timer
new const g_HudSync[][_hud] =
{
{0, 0.6, 0.2, 2.0},
{0, -1.0, 0.7, 5.0},
{0, 0.1, 0.2, 2.0},
{0, 0.1, 0.3, 2.0},
{0, -1.0, 0.9, 3.0},
{0, 0.6, 0.1, 3.0},
{0, -1.0, 0.6, 3.0},
{0, 0.8, 0.3, 20.0},
{0, -1.0, 0.4, 3.0}
}// Colors: 0:Simon / 1:Freeday / 2:CT Duel / 3:TT Duel
new const g_Colors[][3] = { {0, 255, 255}, {0, 255, 0}, {0, 0, 255}, {255, 42, 0} }new CsTeams:g_PlayerTeam[33]
new Float:g_SimonRandom
new Trie:g_CellManagers
new g_HelpText[512]
new g_JailDay
new g_PlayerJoin
new g_PlayerReason[33]
new g_PlayerSpect[33]
new g_PlayerSimon[33]
new g_PlayerNomic
new g_PlayerWanted
new g_PlayerCrowbar
new g_PlayerRevolt
new g_PlayerHelp
new g_PlayerFreeday
new g_PlayerLast
new g_FreedayAuto
new g_FreedayNext
new g_TeamCount[CsTeams]
new g_TeamAlive[CsTeams]
new g_BoxStarted
new g_CrowbarCount
new g_Simon
new g_SimonAllowed
new g_SimonTalking
new g_SimonVoice
new g_RoundStarted
new g_LastDenied
new g_Freeday
new g_BlockWeapons
new g_RoundEnd
new g_Duel
new g_DuelA
new g_DuelB
new g_SafeTime
new g_Buttons[10]
public plugin_init()
{
unregister_forward(FM_Spawn, gp_PrecacheSpawn)
unregister_forward(FM_KeyValue, gp_PrecacheKeyValue)
register_plugin(PLUGIN_NAME, PLUGIN_VERSION, PLUGIN_AUTHOR)
register_cvar(PLUGIN_CVAR, PLUGIN_VERSION, FCVAR_SERVER|FCVAR_SPONLY)
register_dictionary("jbextreme.txt") g_MsgStatusText = get_user_msgid("StatusText")
g_MsgStatusIcon = get_user_msgid("StatusIcon")
g_MsgVGUIMenu = get_user_msgid("VGUIMenu")
g_MsgShowMenu = get_user_msgid("ShowMenu")
g_MsgMOTD = get_user_msgid("MOTD")
g_MsgClCorpse = get_user_msgid("ClCorpse") register_message(g_MsgStatusText, "msg_statustext")
register_message(g_MsgStatusIcon, "msg_statusicon")
register_message(g_MsgVGUIMenu, "msg_vguimenu")
register_message(g_MsgShowMenu, "msg_showmenu")
register_message(g_MsgMOTD, "msg_motd")
register_message(g_MsgClCorpse, "msg_clcorpse") register_event("CurWeapon", "current_weapon", "be", "1=1", "2=29")
register_event("StatusValue", "player_status", "be", "1=2", "2!0")
register_event("StatusValue", "player_status", "be", "1=1", "2=0") register_impulse(100, "impulse_100") RegisterHam(Ham_Spawn, "player", "player_spawn", 1)
RegisterHam(Ham_TakeDamage, "player", "player_damage")
RegisterHam(Ham_TraceAttack, "player", "player_attack")
RegisterHam(Ham_TraceAttack, "func_button", "button_attack")
RegisterHam(Ham_Killed, "player", "player_killed", 1)
RegisterHam(Ham_Touch, "weapon_hegrenade", "player_touchweapon")
RegisterHam(Ham_Touch, "weaponbox", "player_touchweapon")
RegisterHam(Ham_Touch, "armoury_entity", "player_touchweapon") register_forward(FM_SetClientKeyValue, "set_client_kv")
register_forward(FM_EmitSound, "sound_emit")
register_forward(FM_Voice_SetClientListening, "voice_listening")
register_forward(FM_CmdStart, "player_cmdstart", 1) register_logevent("round_end", 2, "1=Round_End")
register_logevent("round_first", 2, "0=World triggered", "1&Restart_Round_")
register_logevent("round_first", 2, "0=World triggered", "1=Game_Commencing")
register_logevent("round_start", 2, "0=World triggered", "1=Round_Start") register_menucmd(register_menuid(TEAM_MENU), 51, "team_select")
register_menucmd(register_menuid(TEAM_MENU2), 51, "team_select")register_clcmd
("jointeam", "cmd_jointeam")
register_clcmd("joinclass", "cmd_joinclass")
register_clcmd("+simonvoice", "cmd_voiceon")
register_clcmd("-simonvoice", "cmd_voiceoff") register_clcmd("say /fd", "cmd_freeday")
register_clcmd("say /freeday", "cmd_freeday")
register_clcmd("say /day", "cmd_freeday")
register_clcmd("say /lr", "cmd_lastrequest")
register_clcmd("say /lastrequest", "cmd_lastrequest")
register_clcmd("say /duel", "cmd_lastrequest")
register_clcmd("say /simon", "cmd_simon")
register_clcmd("say /open", "cmd_open")
register_clcmd("say /nomic", "cmd_nomic")
register_clcmd("say /box", "cmd_box")
register_clcmd("say /help", "cmd_help") register_clcmd("jbe_freeday", "adm_freeday", ADMIN_RESERVATION)
gp_GlowModels = register_cvar("jbe_glowmodels", "1")
gp_SimonSteps = register_cvar("jbe_simonsteps", "0")
gp_CrowbarMul = register_cvar("jbe_crowbarmultiplier", "25.0")
gp_CrowbarMax = register_cvar("jbe_maxcrowbar", "0")
gp_TeamRatio = register_cvar("jbe_teamratio", "3")
gp_TeamChange = register_cvar("jbe_teamchange", "0") // 0-disable team change for tt / 1-enable team change
gp_CtMax = register_cvar("jbe_maxct", "5")
gp_BoxMax = register_cvar("jbe_boxmax", "12")
gp_RetryTime = register_cvar("jbe_retrytime", "17.0")
gp_RoundMax = register_cvar("jbe_freedayround", "360.0")
gp_AutoLastresquest = register_cvar("jbe_autolastrequest", "1")
gp_LastRequest = register_cvar("jbe_lastrequest", "1")
gp_Motd = register_cvar("jbe_motd", "1")
gp_SpectRounds = register_cvar("jbe_spectrounds", "3")
gp_NosimonRounds = register_cvar("jbe_nosimonrounds", "7")
gp_SimonRandom = register_cvar("jbe_randomsimon", "0")
gp_AutoOpen = register_cvar("jbe_autoopen", "1")
gp_TalkMode = register_cvar("jbe_talkmode", "2") // 0-alltak / 1-tt talk / 2-tt no talk
gp_VoiceBlock = register_cvar("jbe_blockvoice", "0") // 0-dont block / 1-block voicerecord / 2-block voicerecord except simon
gp_ButtonShoot = register_cvar("jbe_buttonshoot", "0") // 0-standard / 1-func_button shoots!
g_MaxClients = get_global_int(GL_maxClients)
for(new i = 0; i < sizeof(g_HudSync); i++)
g_HudSync[i][_hudsync] = CreateHudSyncObj() formatex(g_HelpText, charsmax(g_HelpText), "%L^n^n%L^n^n%L^n^n%L",
LANG_SERVER, "JBE_HELP_TITLE",
LANG_SERVER, "JBE_HELP_BINDS",
LANG_SERVER, "JBE_HELP_GUARD_CMDS",
LANG_SERVER, "JBE_HELP_PRISONER_CMDS") setup_buttons()
}
public plugin_precache()
{
static i
precache_model("models/player/jail_ssss/jail_ssss.mdl")
precache_model("models/player/jail_ssss_/jail_ssssT.mdl")
for(i = 0; i < sizeof(_FistModels); i++)
precache_model(_FistModels[i])
for(i = 0; i < sizeof(_CrowbarModels); i++)
precache_model(_CrowbarModels[i])
for(i = 0; i < sizeof(_FistSounds); i++)
precache_sound(_FistSounds[i]) precache_sound("jailB_ssss/duelka.wav")
precache_sound("jailB_ssss/brass_bell_C.wav")
g_CellManagers = TrieCreate()
gp_PrecacheSpawn = register_forward(FM_Spawn, "precache_spawn", 1)
gp_PrecacheKeyValue = register_forward(FM_KeyValue, "precache_keyvalue", 1)
}public precache_spawn(ent)
{
if(is_valid_ent(ent))
{
static szClass[33]
entity_get_string(ent, EV_SZ_classname, szClass, sizeof(szClass))
for(new i = 0; i < sizeof(_RemoveEntities); i++)
if(equal(szClass, _RemoveEntities[i]))
remove_entity(ent)
}
}public precache_keyvalue(ent, kvd_handle)
{
static info[32]
if(!is_valid_ent(ent))
return FMRES_IGNOREDget_kvd
(kvd_handle, KV_ClassName, info, charsmax(info))
if(!equal(info, "multi_manager"))
return FMRES_IGNOREDget_kvd
(kvd_handle, KV_KeyName, info, charsmax(info))
TrieSetCell(g_CellManagers, info, ent)
return FMRES_IGNORED
}public client_putinserver(id)
{
clear_bit(g_PlayerJoin, id)
clear_bit(g_PlayerHelp, id)
clear_bit(g_PlayerCrowbar, id)
clear_bit(g_PlayerNomic, id)
clear_bit(g_PlayerWanted, id)
clear_bit(g_SimonTalking, id)
clear_bit(g_SimonVoice, id)
g_PlayerSpect[id] = 0
g_PlayerSimon[id] = 0
}public client_disconnect(id)
{
if(g_Simon == id)
{
g_Simon = 0
ClearSyncHud(0, g_HudSync[2][_hudsync])
player_hudmessage(0, 2, 5.0, _, "%L", LANG_SERVER, "JBE_SIMON_HASGONE")
}
else if(g_PlayerLast == id || (g_Duel && (id == g_DuelA || id == g_DuelB)))
{
g_Duel = 0
g_DuelA = 0
g_DuelB = 0
g_LastDenied = 0
g_BlockWeapons = 0
g_PlayerLast = 0
}
team_count()
}public client_PostThink(id)
{
if(id != g_Simon || !gc_SimonSteps || !is_user_alive(id) ||
!(entity_get_int(id, EV_INT_flags) & FL_ONGROUND) || entity_get_int(id, EV_ENT_groundentity))
return PLUGIN_CONTINUEstatic Float
:origin[3]
static Float:last[3] entity_get_vector(id, EV_VEC_origin, origin)
if(get_distance_f(origin, last) < 32.0)
{
return PLUGIN_CONTINUE
} vec_copy(origin, last)
if(entity_get_int(id, EV_INT_bInDuck))
origin[2] -= 18.0
else
origin[2] -= 36.0message_begin
(MSG_BROADCAST, SVC_TEMPENTITY, {0,0,0}, 0)
write_byte(TE_WORLDDECAL)
write_coord(floatround(origin[0]))
write_coord(floatround(origin[1]))
write_coord(floatround(origin[2]))
write_byte(105)
message_end() return PLUGIN_CONTINUE
}
public msg_statustext(msgid, dest, id)
{
return PLUGIN_HANDLED
}public msg_statusicon(msgid, dest, id)
{
static icon[5]
get_msg_arg_string(2, icon, charsmax(icon))
if(icon[0] == 'b' && icon[2] == 'y' && icon[3] == 'z')
{
set_pdata_int(id, 235, get_pdata_int(id, 235) & ~(1<<0))
return PLUGIN_HANDLED
} return PLUGIN_CONTINUE
}public msg_vguimenu(msgid, dest, id)
{
static msgarg1
static CsTeams:teammsgarg1
= get_msg_arg_int(1)
if(msgarg1 == 2)
{
team = cs_get_user_team(id)
if((team == CS_TEAM_T) && !is_user_admin(id) && (is_user_alive(id) || !get_pcvar_num(gp_TeamChange)))
{
client_print(id, print_center, "%L", LANG_SERVER, "JBE_TEAM_CANTCHANGE")
return PLUGIN_HANDLED
}
show_menu(id, 51, TEAM_MENU, -1)
return PLUGIN_HANDLED
} return PLUGIN_CONTINUE
}public msg_showmenu(msgid, dest, id)
{
static msgarg1, roundloop
static CsTeams:team
msgarg1 = get_msg_arg_int(1) if(msgarg1 != 531 && msgarg1 != 563)
return PLUGIN_CONTINUEroundloop
= floatround(get_pcvar_float(gp_RetryTime) / 2)
team = cs_get_user_team(id) if(team == CS_TEAM_T)
{
if(!is_user_admin(id) && (is_user_alive(id) || (g_RoundStarted >= roundloop) || !get_pcvar_num(gp_TeamChange)))
{
client_print(id, print_center, "%L", LANG_SERVER, "JBE_TEAM_CANTCHANGE")
return PLUGIN_HANDLED
}
else
{
show_menu(id, 51, TEAM_MENU, -1)
return PLUGIN_HANDLED
}
}
else
{
show_menu(id, 51, TEAM_MENU, -1)
return PLUGIN_HANDLED
} return PLUGIN_CONTINUE
}public msg_motd(msgid, dest, id)
{
if(get_pcvar_num(gp_Motd))
return PLUGIN_HANDLEDreturn PLUGIN_CONTINUE
}public msg_clcorpse(msgid, dest, id)
{
return PLUGIN_HANDLED
}public current_weapon(id)
{
if(!is_user_alive(id))
return PLUGIN_CONTINUEif
(get_bit(g_PlayerCrowbar, id))
{
set_pev(id, pev_viewmodel2, _CrowbarModels[1])
set_pev(id, pev_weaponmodel2, _CrowbarModels[0])
}
else
{
set_pev(id, pev_viewmodel2, _FistModels[1])
set_pev(id, pev_weaponmodel2, _FistModels[0])
}
return PLUGIN_CONTINUE
}public player_status(id)
{
static type, player, CsTeams:team, name[32], health
type = read_data(1)
player = read_data(2)
switch(type)
{
case(1):
{
ClearSyncHud(id, g_HudSync[1][_hudsync])
}
case(2):
{
team = cs_get_user_team(player)
if((team != CS_TEAM_T) && (team != CS_TEAM_CT))
return PLUGIN_HANDLEDhealth
= get_user_health(player)
get_user_name(player, name, charsmax(name))
player_hudmessage(id, 4, 2.0, {0, 255, 0}, "%L", LANG_SERVER,
(team == CS_TEAM_T) ? "JBE_PRISONER_STATUS" : "JBE_GUARD_STATUS", name, health)
}
}
return PLUGIN_HANDLED
}public impulse_100(id)
{
if(cs_get_user_team(id) == CS_TEAM_T)
return PLUGIN_HANDLEDreturn PLUGIN_CONTINUE
}public player_spawn(id)
{
static CsTeams:teamif
(!is_user_connected(id))
return HAM_IGNOREDset_pdata_float
(id, m_fNextHudTextArgsGameTime, get_gametime() + 999999.0)
player_strip_weapons(id)
if(g_RoundEnd)
{
g_RoundEnd = 0
g_JailDay++
} set_user_rendering(id, kRenderFxNone, 0, 0, 0, kRenderNormal, 0) clear_bit(g_PlayerCrowbar, id)
clear_bit(g_PlayerWanted, id)
team = cs_get_user_team(id) switch(team)
{
case(CS_TEAM_T):
{
g_PlayerLast = 0
if(!g_PlayerReason[id])
g_PlayerReason[id] = random_num(1, 6) player_hudmessage(id, 0, 5.0, {255, 0, 255}, "%L %L", LANG_SERVER, "JBE_PRISONER_REASON",
LANG_SERVER, g_Reasons[g_PlayerReason[id]]) set_user_info(id, "model", "jail_ssss")
entity_set_int(id, EV_INT_body, 2)
if(is_freeday() || get_bit(g_FreedayAuto, id))
{
freeday_set(0, id)
clear_bit(g_FreedayAuto, id)
}
else
{
entity_set_int(id, EV_INT_skin, random_num(0, 5))
} if(g_CrowbarCount < get_pcvar_num(gp_CrowbarMax))
{
if(random_num(0, g_MaxClients) > (g_MaxClients / 2))
{
g_CrowbarCount++
set_bit(g_PlayerCrowbar, id)
}
}
cs_set_user_armor(id, 0, CS_ARMOR_NONE)
}
case(CS_TEAM_CT):
{
g_PlayerSimon[id]++
set_user_info(id, "model", "jail_ssss")
entity_set_int(id, EV_INT_body, 3)
cs_set_user_armor(id, 100, CS_ARMOR_VESTHELM)
}
}
first_join(id)
return HAM_IGNORED
}public player_damage(victim, ent, attacker, Float:damage, bits)
{
if(!is_user_connected(victim) || !is_user_connected(attacker) || victim == attacker)
return HAM_IGNOREDswitch
(g_Duel)
{
case(0):
{
if(attacker == ent && get_user_weapon(attacker) == CSW_KNIFE && get_bit(g_PlayerCrowbar, attacker) && cs_get_user_team(victim) != CS_TEAM_T)
{
SetHamParamFloat(4, damage * gc_CrowbarMul)
return HAM_OVERRIDE
}
}
case(2):
{
if(attacker != g_PlayerLast)
return HAM_SUPERCEDE
}
default:
{
if((victim == g_DuelA && attacker == g_DuelB) || (victim == g_DuelB && attacker == g_DuelA))
return HAM_IGNOREDreturn HAM_SUPERCEDE
}
} return HAM_IGNORED
}public player_attack(victim, attacker, Float:damage, Float:direction[3], tracehandle, damagebits)
{
static CsTeams:vteam, CsTeams:ateam
if(!is_user_connected(victim) || !is_user_connected(attacker) || victim == attacker)
return HAM_IGNOREDvteam
= cs_get_user_team(victim)
ateam = cs_get_user_team(attacker) if(ateam == CS_TEAM_CT && vteam == CS_TEAM_CT)
return HAM_SUPERCEDEswitch
(g_Duel)
{
case(0):
{
if(ateam == CS_TEAM_CT && vteam == CS_TEAM_T)
{
if(get_bit(g_PlayerRevolt, victim))
{
clear_bit(g_PlayerRevolt, victim)
hud_status(0)
}
return HAM_IGNORED
}
}
case(2):
{
if(attacker != g_PlayerLast)
return HAM_SUPERCEDE
}
default:
{
if((victim == g_DuelA && attacker == g_DuelB) || (victim == g_DuelB && attacker == g_DuelA))
return HAM_IGNOREDreturn HAM_SUPERCEDE
}
} if(ateam == CS_TEAM_T && vteam == CS_TEAM_T && !g_BoxStarted)
return HAM_SUPERCEDEif
(ateam == CS_TEAM_T && vteam == CS_TEAM_CT)
{
if(!g_PlayerRevolt)
revolt_start() set_bit(g_PlayerRevolt, attacker)
} return HAM_IGNORED
}public button_attack(button, id, Float:damage, Float:direction[3], tracehandle, damagebits)
{
if(is_valid_ent(button) && gc_ButtonShoot)
{
ExecuteHamB(Ham_Use, button, id, 0, 2, 1.0)
entity_set_float(button, EV_FL_frame, 0.0)
} return HAM_IGNORED
}public player_killed(victim, attacker, shouldgib)
{
static CsTeams:vteam, CsTeams:kteam
if(!(0 < attacker <= g_MaxClients) || !is_user_connected(attacker))
kteam = CS_TEAM_UNASSIGNED
else
kteam = cs_get_user_team(attacker) vteam = cs_get_user_team(victim)
if(g_Simon == victim)
{
g_Simon = 0
ClearSyncHud(0, g_HudSync[2][_hudsync])
player_hudmessage(0, 2, 5.0, _, "%L", LANG_SERVER, "JBE_SIMON_KILLED")
} switch(g_Duel)
{
case(0):
{
switch(vteam)
{
case(CS_TEAM_CT):
{
if(kteam == CS_TEAM_T && !get_bit(g_PlayerWanted, attacker))
{
set_bit(g_PlayerWanted, attacker)
entity_set_int(attacker, EV_INT_skin, 7)
if(get_pcvar_num(gp_GlowModels))
player_glow(attacker, g_Colors[3])
}
}
case(CS_TEAM_T):
{
clear_bit(g_PlayerRevolt, victim)
clear_bit(g_PlayerWanted, victim)
}
}
}
default:
{
if(g_Duel != 2 && (attacker == g_DuelA || attacker == g_DuelB))
{
set_user_rendering(victim, kRenderFxNone, 0, 0, 0, kRenderNormal, 0)
set_user_rendering(attacker, kRenderFxNone, 0, 0, 0, kRenderNormal, 0)
g_Duel = 0
g_LastDenied = 0
g_BlockWeapons = 0
g_PlayerLast = 0
team_count()
}
}
}
hud_status(0)
return HAM_IGNORED
}public player_touchweapon(id, ent)
{
static model[32], class[32]
if(g_BlockWeapons)
return HAM_SUPERCEDEif
(is_valid_ent(id) && g_Duel != 6 && is_user_alive(ent) && cs_get_user_team(ent) == CS_TEAM_CT)
{
entity_get_string(id, EV_SZ_model, model, charsmax(model))
if(model[7] == 'w' && model[9] == 'h' && model[10] == 'e' && model[11] == 'g')
{
entity_get_string(id, EV_SZ_classname, class, charsmax(class))
if(equal(class, "weapon_hegrenade"))
remove_entity(id) return HAM_SUPERCEDE
} } return HAM_IGNORED
}public set_client_kv(id, const info[], const key[])
{
if(equal(key, "model"))
return FMRES_SUPERCEDEreturn FMRES_IGNORED
}public sound_emit(id, channel, sample[])
{
if(is_user_alive(id) && equal(sample, "weapons/knife_", 14))
{
switch(sample[17])
{
case('b'):
{
emit_sound(id, CHAN_WEAPON, "weapons/cbar_hitbod2.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)
}
case('w'):
{
emit_sound(id, CHAN_WEAPON, "weapons/cbar_hitbod1.wav", 1.0, ATTN_NORM, 0, PITCH_LOW)
}
case('1', '2'):
{
emit_sound(id, CHAN_WEAPON, "weapons/bullet_hit2.wav", random_float(0.5, 1.0), ATTN_NORM, 0, PITCH_NORM)
}
}
return FMRES_SUPERCEDE
}
return FMRES_IGNORED
}public voice_listening(receiver, sender, bool:listen)
{
if((receiver == sender))
return FMRES_IGNOREDif
(is_user_admin(sender))
{
engfunc(EngFunc_SetClientListening, receiver, sender, true)
return FMRES_SUPERCEDE
} switch(gc_VoiceBlock)
{
case(2):
{
if((sender != g_Simon) && (!get_bit(g_SimonVoice, sender) && gc_VoiceBlock))
{
engfunc(EngFunc_SetClientListening, receiver, sender, false)
return FMRES_SUPERCEDE
}
}
case(1):
{
if(!get_bit(g_SimonVoice, sender) && gc_VoiceBlock)
{
engfunc(EngFunc_SetClientListening, receiver, sender, false)
return FMRES_SUPERCEDE
}
}
}
if(!is_user_alive(sender))
{
engfunc(EngFunc_SetClientListening, receiver, sender, false)
return FMRES_SUPERCEDE
} if(sender == g_Simon)
{
engfunc(EngFunc_SetClientListening, receiver, sender, true)
return FMRES_SUPERCEDE
} listen = trueif
(g_SimonTalking && (sender != g_Simon))
{
listen = false
}
else
{
static CsTeams:steam
steam = cs_get_user_team(sender)
switch(gc_TalkMode)
{
case(2):
{
listen = (steam == CS_TEAM_CT)
}
case(1):
{
listen = (steam == CS_TEAM_CT || steam == CS_TEAM_T)
}
}
} engfunc(EngFunc_SetClientListening, receiver, sender, listen)
return FMRES_SUPERCEDE
}public player_cmdstart(id, uc, random)
{
if(is_user_alive(id) && g_Duel > 3)
{
cs_set_user_bpammo(id, _Duel[g_Duel - 4][_csw], 1)
}
}public round_first()
{
g_JailDay = 0
for(new i = 1; i <= g_MaxClients; i++)
g_PlayerSimon[i] = 0set_cvar_num
("sv_alltalk", 1)
set_cvar_num("mp_roundtime", 5)
set_cvar_num("mp_limitteams", 0)
set_cvar_num("mp_autoteambalance", 0)
set_cvar_num("mp_tkpunish", 0)
set_cvar_num("mp_friendlyfire", 1)
round_end()
}public round_end()
{
static CsTeams:team
static maxnosimon, spectrounds
g_SafeTime = 0
g_PlayerRevolt = 0
g_PlayerFreeday = 0
g_PlayerLast = 0
g_BoxStarted = 0
g_CrowbarCount = 0
g_Simon = 0
g_SimonAllowed = 0
g_RoundStarted = 0
g_LastDenied = 0
g_BlockWeapons = 0
g_TeamCount[CS_TEAM_T] = 0
g_TeamCount[CS_TEAM_CT] = 0
g_Freeday = 0
g_FreedayNext = (random_num(0,99) >= 95)
g_RoundEnd = 1
g_Duel = 0remove_task
(TASK_STATUS)
remove_task(TASK_FREEDAY)
remove_task(TASK_FREEEND)
remove_task(TASK_ROUND)
maxnosimon = get_pcvar_num(gp_NosimonRounds)
spectrounds = get_pcvar_num(gp_SpectRounds)
for(new i = 1; i <= g_MaxClients; i++)
{
if(!is_user_connected(i))
continuemenu_cancel
(i)
team = cs_get_user_team(i)
player_strip_weapons(i)
switch(team)
{
case(CS_TEAM_CT):
{
if(g_PlayerSimon[i] > maxnosimon)
{
cmd_nomic(i)
}
}
case(CS_TEAM_SPECTATOR,CS_TEAM_UNASSIGNED):
{
g_PlayerSpect[i]++
if(g_PlayerSpect[i] > spectrounds)
{
client_cmd(i, "disconnect")
server_print("[ssss] Razyedeni za afk v spectorah #%i", i)
}
else
{
show_menu(i, 51, TEAM_MENU, -1)
}
}
}
}
for(new i = 0; i < sizeof(g_HudSync); i++)
ClearSyncHud(0, g_HudSync[i][_hudsync])}
public round_start()
{
if(g_RoundEnd)
returnteam_count
()
if(!g_Simon && is_freeday())
{
g_Freeday = 1
emit_sound(0, CHAN_AUTO, "jailB_ssss/brass_bell_C.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)
check_freeday(TASK_FREEDAY)
}
else
{
set_task(60.0, "check_freeday", TASK_FREEDAY)
}
set_task(HUD_DELAY, "hud_status", TASK_STATUS, _, _, "b")
set_task(get_pcvar_float(gp_RetryTime) + 1.0, "safe_time", TASK_SAFETIME)
set_task(300.0, "freeday_end", TASK_FREEDAY)
g_SimonRandom = get_pcvar_num(gp_SimonRandom) ? random_float(15.0, 45.0) : 0.0
g_SimonAllowed = 1
g_FreedayNext = 0
}public cmd_jointeam(id)
{
return PLUGIN_HANDLED
}public cmd_joinclass(id)
{
return PLUGIN_HANDLED
}public cmd_voiceon(id)
{
client_cmd(id, "+voicerecord")
set_bit(g_SimonVoice, id)
if(g_Simon == id || is_user_admin(id))
set_bit(g_SimonTalking, id) return PLUGIN_HANDLED
}public cmd_voiceoff(id)
{
client_cmd(id, "-voicerecord")
clear_bit(g_SimonVoice, id)
if(g_Simon == id || is_user_admin(id))
clear_bit(g_SimonTalking, id) return PLUGIN_HANDLED
}public cmd_simon(id)
{
static CsTeams:team, name[32]
if(!is_user_connected(id))
return PLUGIN_HANDLEDteam
= cs_get_user_team(id)
if(g_SimonAllowed && !g_Freeday && is_user_alive(id) && team == CS_TEAM_CT && !g_Simon)
{
g_Simon = id
get_user_name(id, name, charsmax(name))
entity_set_int(id, EV_INT_body, 1)
g_PlayerSimon[id]-- hud_status(0)
}
return PLUGIN_HANDLED
}public cmd_open(id)
{
if(id == g_Simon)
jail_open() return PLUGIN_HANDLED
}public cmd_nomic(id)
{
static CsTeams:team
team = cs_get_user_team(id)
if(team == CS_TEAM_CT)
{
server_print("JBE Transfered guard to prisoners team client #%i", id)
if(g_Simon == id)
{
g_Simon = 0
player_hudmessage(0, 2, 5.0, _, "%L", LANG_SERVER, "JBE_SIMON_TRANSFERED")
}
if(!is_user_admin(id))
set_bit(g_PlayerNomic, id) user_silentkill(id)
cs_set_user_team(id, CS_TEAM_T)
}
return PLUGIN_HANDLED
}public cmd_box(id)
{
static i
if((id < 0) || (is_user_alive(id) && g_Simon == id))
{
if(g_TeamAlive[CS_TEAM_T] <= get_pcvar_num(gp_BoxMax) && g_TeamAlive[CS_TEAM_T] > 1)
{
for(i = 1; i <= g_MaxClients; i++)
if(is_user_alive(i) && cs_get_user_team(i) == CS_TEAM_T)
set_user_health(i, 100) set_cvar_num("mp_tkpunish", 0)
set_cvar_num("mp_friendlyfire", 1)
g_BoxStarted = 1
player_hudmessage(0, 1, 3.0, _, "%L", LANG_SERVER, "JBE_GUARD_BOX")
}
else
{
player_hudmessage(id, 1, 3.0, _, "%L", LANG_SERVER, "JBE_GUARD_CANTBOX")
}
}
return PLUGIN_HANDLED
}public cmd_help(id)
{
if(id > g_MaxClients)
id -= TASK_HELPremove_task
(TASK_HELP + id)
switch(get_bit(g_PlayerHelp, id))
{
case(0):
{
set_bit(g_PlayerHelp, id)
player_hudmessage(id, 7, 15.0, {230, 100, 10}, "%s", g_HelpText)
set_task(15.0, "cmd_help", TASK_HELP + id)
}
default:
{
clear_bit(g_PlayerHelp, id)
ClearSyncHud(id, g_HudSync[7][_hudsync])
}
}
}public cmd_freeday(id)
{
static menu, menuname[32], option[64]
if(!is_freeday() && ((is_user_alive(id) && g_Simon == id)))
{
formatex(menuname, charsmax(menuname), "%L", LANG_SERVER, "JBE_MENU_FREEDAY")
menu = menu_create(menuname, "freeday_choice") formatex(option, charsmax(option), "%L", LANG_SERVER, "JBE_MENU_FREEDAY_PLAYER")
menu_additem(menu, option, "1", 0) formatex(option, charsmax(option), "%L", LANG_SERVER, "JBE_MENU_FREEDAY_ALL")
menu_additem(menu, option, "2", 0) menu_display(id, menu)
}
else {
client_print(id, print_chat, "Вы не Саймон!")
}
return PLUGIN_HANDLED
}public cmd_freeday_player(id)
{
if((is_user_alive(id) && g_Simon == id))
menu_players(id, CS_TEAM_T, id, 1, "freeday_select", "%L", LANG_SERVER, "JBE_MENU_FREEDAY") return PLUGIN_CONTINUE
}public cmd_lastrequest(id)
{
static i, num[5], menu, menuname[32], option[64]
if(!get_pcvar_num(gp_LastRequest) || g_LastDenied || id != g_PlayerLast || g_RoundEnd || !is_user_alive(id))
return PLUGIN_CONTINUEformatex
(menuname, charsmax(menuname), "%L", LANG_SERVER, "JBE_MENU_LASTREQ")
menu = menu_create(menuname, "lastrequest_select") formatex(option, charsmax(option), "%L", LANG_SERVER, "JBE_MENU_LASTREQ_OPT1")
menu_additem(menu, option, "1", 0) formatex(option, charsmax(option), "%L", LANG_SERVER, "JBE_MENU_LASTREQ_OPT2")
menu_additem(menu, option, "2", 0) formatex(option, charsmax(option), "%L", LANG_SERVER, "JBE_MENU_LASTREQ_OPT3")
menu_additem(menu, option, "3", 0) for(i = 0; i < sizeof(_Duel); i++)
{
num_to_str(i + 4, num, charsmax(num))
formatex(option, charsmax(option), "%L", LANG_SERVER, _Duel[i][_opt])
menu_additem(menu, option, num, 0)
} menu_display(id, menu)
return PLUGIN_CONTINUE
}public adm_freeday(id)
{
static player, user[32]
if(!is_user_admin(id))
return PLUGIN_CONTINUEread_argv
(1, user, charsmax(user))
player = cmd_target(id, user, 2)
if(is_user_connected(player) && cs_get_user_team(player) == CS_TEAM_T)
{
freeday_set(id, player)
}
return PLUGIN_HANDLED
}public team_select(id, key)
{
static CsTeams:team, roundloop, adminroundloop
= get_pcvar_num(gp_RetryTime) / 2
team = cs_get_user_team(id)
admin = is_user_admin(id)
team_count() if(!admin && (team == CS_TEAM_UNASSIGNED) && (g_RoundStarted >= roundloop) && g_TeamCount[CS_TEAM_CT] && g_TeamCount[CS_TEAM_T] && !is_user_alive(id))
{
team_join(id, CS_TEAM_SPECTATOR)
client_print(id, print_center, "%L", LANG_SERVER, "JBE_TEAM_CANTJOIN")
return PLUGIN_HANDLED
} switch(key)
{
case(0):
{
if(team == CS_TEAM_T)
return PLUGIN_HANDLEDg_PlayerReason
[id] = random_num(1, 6) team_join(id, CS_TEAM_T)
}
case(1):
{
if(team == CS_TEAM_CT || (!admin && get_bit(g_PlayerNomic, id)))
return PLUGIN_HANDLEDif
(g_TeamCount[CS_TEAM_CT] < ctcount_allowed() || admin)
team_join(id, CS_TEAM_CT)
else
client_print(id, print_center, "%L", LANG_SERVER, "JBE_TEAM_CTFULL")
}
case(5):
{
user_silentkill(id)
team_join(id, CS_TEAM_SPECTATOR)
}
}
return PLUGIN_HANDLED
}public team_join(id, CsTeams:team)
{
static restore, vgui, msgblockrestore
= get_pdata_int(id, m_iVGUI)
vgui = restore & (1<<0)
if(vgui)
set_pdata_int(id, m_iVGUI, restore & ~(1<<0)) switch(team)
{
case CS_TEAM_SPECTATOR:
{
msgblock = get_msg_block(g_MsgShowMenu)
set_msg_block(g_MsgShowMenu, BLOCK_ONCE)
dllfunc(DLLFunc_ClientPutInServer, id)
set_msg_block(g_MsgShowMenu, msgblock)
set_pdata_int(id, m_fGameHUDInitialized, 1)
engclient_cmd(id, "jointeam", "6")
}
case CS_TEAM_T, CS_TEAM_CT:
{
msgblock = get_msg_block(g_MsgShowMenu)
set_msg_block(g_MsgShowMenu, BLOCK_ONCE)
engclient_cmd(id, "jointeam", (team == CS_TEAM_CT) ? "2" : "1")
engclient_cmd(id, "joinclass", "1")
set_msg_block(g_MsgShowMenu, msgblock)
g_PlayerSpect[id] = 0
}
}
if(vgui)
set_pdata_int(id, m_iVGUI, restore)
}public team_count()
{
static CsTeams:team, last
g_TeamCount[CS_TEAM_UNASSIGNED] = 0
g_TeamCount[CS_TEAM_T] = 0
g_TeamCount[CS_TEAM_CT] = 0
g_TeamCount[CS_TEAM_SPECTATOR] = 0
g_TeamAlive[CS_TEAM_UNASSIGNED] = 0
g_TeamAlive[CS_TEAM_T] = 0
g_TeamAlive[CS_TEAM_CT] = 0
g_TeamAlive[CS_TEAM_SPECTATOR] = 0
for(new i = 1; i <= g_MaxClients; i++)
{
if(is_user_connected(i))
{
team = cs_get_user_team(i)
g_TeamCount[team]++
g_PlayerTeam[i] = team
if(is_user_alive(i))
{
g_TeamAlive[team]++
if(team == CS_TEAM_T)
last = i
}
}
else
{
g_PlayerTeam[i] = CS_TEAM_UNASSIGNED
}
}
if(g_TeamAlive[CS_TEAM_T] == 1)
{
if(last != g_PlayerLast && g_SafeTime)
{
prisoner_last(last)
}
}
else
{
if(g_Duel || g_DuelA || g_DuelB)
{
if(is_user_alive(g_DuelA))
{
set_user_rendering(g_DuelA, kRenderFxNone, 0, 0, 0, kRenderNormal, 0)
player_strip_weapons(g_DuelA)
} if(is_user_alive(g_DuelB))
{
set_user_rendering(g_DuelB, kRenderFxNone, 0, 0, 0, kRenderNormal, 0)
player_strip_weapons(g_DuelB)
} }
g_PlayerLast = 0
g_DuelA = 0
g_DuelB = 0
g_Duel = 0
}
}public revolt_start()
{
client_cmd(0,"speak ambience/siren")
set_task(8.0, "stop_sound")
hud_status(0)
}public stop_sound(task)
{
client_cmd(0, "stopsound")
}public hud_status(task)
{
static i, n
new name[32], szStatus[64], wanted[1024]
if(g_RoundStarted < (get_pcvar_num(gp_RetryTime) / 2))
g_RoundStarted++ if(!g_Freeday && !g_Simon && g_SimonAllowed && (0.0 < g_SimonRandom < get_gametime()))
{
cmd_simon(random_num(1, g_MaxClients))
} n = 0
formatex(wanted, charsmax(wanted), "%L", LANG_SERVER, "JBE_PRISONER_WANTED")
n = strlen(wanted)
for(i = 0; i < g_MaxClients; i++)
{
if(get_bit(g_PlayerWanted, i) && is_user_alive(i) && n < charsmax(wanted))
{
get_user_name(i, name, charsmax(name))
n += copy(wanted[n], charsmax(wanted) - n, "^n^t")
n += copy(wanted[n], charsmax(wanted) - n, name)
}
} team_count()
formatex(szStatus, charsmax(szStatus), "%L", LANG_SERVER, "JBE_STATUS", g_TeamAlive[CS_TEAM_T], g_TeamCount[CS_TEAM_T])
message_begin(MSG_BROADCAST, get_user_msgid("StatusText"), {0,0,0}, 0)
write_byte(0)
write_string(szStatus)
message_end() if(g_Simon)
{
get_user_name(g_Simon, name, charsmax(name))
player_hudmessage(0, 2, HUD_DELAY + 1.0, {0, 255, 0}, "%L", LANG_SERVER, "JBE_SIMON_FOLLOW", name)
}
else if(g_Freeday)
{
player_hudmessage(0, 2, HUD_DELAY + 1.0, {0, 255, 0}, "%L", LANG_SERVER, "JBE_STATUS_FREEDAY")
} if(g_PlayerWanted)
player_hudmessage(0, 3, HUD_DELAY + 1.0, {255, 25, 50}, "%s", wanted)
else if(g_PlayerRevolt)
player_hudmessage(0, 3, HUD_DELAY + 1.0, {255, 25, 50}, "%L", LANG_SERVER, "JBE_PRISONER_REVOLT") player_hudmessage(0, 5, HUD_DELAY + 1.0, {0, 255, 0}, "%L", LANG_SERVER, "JBE_STATUS_DAY", g_JailDay) gc_TalkMode = get_pcvar_num(gp_TalkMode)
gc_VoiceBlock = get_pcvar_num(gp_VoiceBlock)
gc_SimonSteps = get_pcvar_num(gp_SimonSteps)
gc_ButtonShoot = get_pcvar_num(gp_ButtonShoot)
gc_CrowbarMul = get_pcvar_float(gp_CrowbarMul)}
public safe_time(task)
{
g_SafeTime = 1
}public check_freeday(task)
{
static Float:roundmax, i
if(!g_Simon && !g_PlayerLast)
{
g_Freeday = 1
hud_status(0)
roundmax = get_pcvar_float(gp_RoundMax)
if(roundmax > 0.0)
{
for(i = 1; i <= g_MaxClients; i++)
{
if(is_user_alive(i) && cs_get_user_team(i) == CS_TEAM_T)
freeday_set(0, i)
}
emit_sound(0, CHAN_AUTO, "jailB_ssss/brass_bell_C.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)
player_hudmessage(0, 8, 3.0, {0, 255, 0}, "%L", LANG_SERVER, "JBE_STATUS_ENDTIMER", floatround(roundmax - 60.0))
remove_task(TASK_ROUND)
set_task(roundmax - 60.0, "check_end", TASK_ROUND)
}
} if(get_pcvar_num(gp_AutoOpen))
jail_open()
}public freeday_end(task)
{
if(g_Freeday || g_PlayerFreeday)
{
emit_sound(0, CHAN_AUTO, "jailB_ssss/brass_bell_C.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)
player_hudmessage(0, 8, 3.0, {0, 255, 0}, "%L", LANG_SERVER, "JBE_STATUS_ENDFREEDAY")
}
}public check_end(task)
{
team_count()
for(new i = 1; i <= g_MaxClients; i++)
{
if(g_PlayerTeam[i] == CS_TEAM_T && is_user_alive(i))
{
user_silentkill(i)
cs_set_user_deaths(i, get_user_deaths(i) - 1)
}
}
for(new i = 1; i <= g_MaxClients; i++)
{
if(g_PlayerTeam[i] == CS_TEAM_CT && is_user_alive(i))
{
user_silentkill(i)
cs_set_user_deaths(i, get_user_deaths(i) - 1)
}
}
player_hudmessage(0, 6, 3.0, {0, 255, 0}, "%L", LANG_SERVER, "JBE_STATUS_ROUNDEND")
}public prisoner_last(id)
{
static name[32], Float:roundmax
if(is_user_alive(id) && cs_get_user_team(id) == CS_TEAM_T)
{
roundmax = get_pcvar_float(gp_RoundMax)
get_user_name(id, name, charsmax(name))
g_PlayerLast = id
player_hudmessage(0, 6, 5.0, {0, 255, 0}, "%L", LANG_SERVER, "JBE_PRISONER_LAST", name)
remove_task(TASK_ROUND)
if(roundmax > 0.0)
{
player_hudmessage(0, 8, 3.0, {0, 255, 0}, "%L", LANG_SERVER, "JBE_STATUS_ENDTIMER", floatround(roundmax - 60.0))
set_task(roundmax - 60.0, "check_end", TASK_ROUND)
}
if((g_TeamAlive[CS_TEAM_CT] > 0) && get_pcvar_num(gp_AutoLastresquest))
cmd_lastrequest(id)
}
}public freeday_select(id, menu, item)
{
if(item == MENU_EXIT)
{
menu_destroy(menu)
return PLUGIN_HANDLED
} static dst[32], data[5], player, access, callbackmenu_item_getinfo
(menu, item, access, data, charsmax(data), dst, charsmax(dst), callback)
player = str_to_num(data)
freeday_set(id, player)
return PLUGIN_HANDLED
}public duel_knives(id, menu, item)
{
if(item == MENU_EXIT)
{
menu_destroy(menu)
g_LastDenied = 0
return PLUGIN_HANDLED
} static dst[32], data[5], access, callback, option[128], player, src[32] menu_item_getinfo(menu, item, access, data, charsmax(data), dst, charsmax(dst), callback)
get_user_name(id, src, charsmax(src))
player = str_to_num(data)
formatex(option, charsmax(option), "%L^n%L", LANG_SERVER, "JBE_MENU_LASTREQ_SEL3", src, LANG_SERVER, "JBE_MENU_DUEL_SEL", src, dst)
player_hudmessage(0, 6, 3.0, {0, 255, 0}, option) g_DuelA = id
clear_bit(g_PlayerCrowbar, id)
player_strip_weapons(id)
player_glow(id, g_Colors[3])
set_user_health(id, 100) g_DuelB = player
player_strip_weapons(player)
player_glow(player, g_Colors[2])
set_user_health(player, 100)
g_BlockWeapons = 1
return PLUGIN_HANDLED
}public duel_guns(id, menu, item)
{
if (!(4 <= g_Duel <= 7))
return PLUGIN_HANDLEDif
(item == MENU_EXIT)
{
menu_destroy(menu)
g_LastDenied = 0
g_Duel = 0
return PLUGIN_HANDLED
} static gun, dst[32], data[5], access, callback, option[128], player, src[32] menu_item_getinfo(menu, item, access, data, charsmax(data), dst, charsmax(dst), callback)
get_user_name(id, src, charsmax(src))
player = str_to_num(data)
formatex(option, charsmax(option), "%L^n%L", LANG_SERVER, _Duel[g_Duel - 4][_sel], src, LANG_SERVER, "JBE_MENU_DUEL_SEL", src, dst)
emit_sound(0, CHAN_AUTO, "jailB_ssss/duelka.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)
player_hudmessage(0, 6, 3.0, {0, 255, 0}, option) g_DuelA = id
clear_bit(g_PlayerCrowbar, id)
player_strip_weapons(id)
gun = give_item(id, _Duel[g_Duel - 4][_entname])
cs_set_weapon_ammo(gun, 1)
set_user_health(id, 100)
player_glow(id, g_Colors[3]) g_DuelB = player
player_strip_weapons(player)
gun = give_item(player, _Duel[g_Duel - 4][_entname])
cs_set_weapon_ammo(gun, 1)
set_user_health(player, 100)
player_glow(player, g_Colors[2]) g_BlockWeapons = 1
return PLUGIN_HANDLED
}public freeday_choice(id, menu, item)
{
if(item == MENU_EXIT)
{
menu_destroy(menu)
return PLUGIN_HANDLED
} static dst[32], data[5], access, callbackmenu_item_getinfo
(menu, item, access, data, charsmax(data), dst, charsmax(dst), callback)
menu_destroy(menu)
get_user_name(id, dst, charsmax(dst))
switch(data[0])
{
case('1'):
{
cmd_freeday_player(id)
}
case('2'):
{
if((id == g_Simon) || is_user_admin(id))
{
g_Simon = 0
get_user_name(id, dst, charsmax(dst))
client_print(0, print_chat, "%s дал всем свободный день! гуляем...", dst)
server_print("JBE Client %i gives freeday for everyone", id)
check_freeday(TASK_FREEDAY)
}
}
}
return PLUGIN_HANDLED
}public lastrequest_select(id, menu, item)
{
if(item == MENU_EXIT)
{
menu_destroy(menu)
return PLUGIN_HANDLED
} static i, dst[32], data[5], access, callback, option[64] menu_item_getinfo(menu, item, access, data, charsmax(data), dst, charsmax(dst), callback)
get_user_name(id, dst, charsmax(dst))
switch(data[0])
{
case('1'):
{
formatex(option, charsmax(option), "%L", LANG_SERVER, "JBE_MENU_LASTREQ_SEL1", dst)
player_hudmessage(0, 6, 3.0, {0, 255, 0}, option)
set_bit(g_FreedayAuto, id)
user_silentkill(id)
}
case('2'):
{
formatex(option, charsmax(option), "%L", LANG_SERVER, "JBE_MENU_LASTREQ_SEL2", dst)
player_hudmessage(0, 6, 3.0, {0, 255, 0}, option)
g_Duel = 2
player_strip_weapons_all()
i = random_num(0, sizeof(_WeaponsFree) - 1)
give_item(id, _WeaponsFree[i])
g_BlockWeapons = 1
cs_set_user_bpammo(id, _WeaponsFreeCSW[i], _WeaponsFreeAmmo[i])
}
case('3'):
{
g_Duel = 3
menu_players(id, CS_TEAM_CT, 0, 1, "duel_knives", "%L", LANG_SERVER, "JBE_MENU_DUEL")
}
default:
{
g_Duel = str_to_num(data)
menu_players(id, CS_TEAM_CT, 0, 1, "duel_guns", "%L", LANG_SERVER, "JBE_MENU_DUEL")
}
}
g_LastDenied = 1
menu_destroy(menu)
return PLUGIN_HANDLED
}public setup_buttons()
{
new ent[3]
new Float:origin[3]
new info[32]
new poswhile
((pos <= sizeof(g_Buttons)) && (ent[0] = engfunc(EngFunc_FindEntityByString, ent[0], "classname", "info_player_deathmatch")))
{
pev(ent[0], pev_origin, origin)
while((ent[1] = engfunc(EngFunc_FindEntityInSphere, ent[1], origin, CELL_RADIUS)))
{
if(!is_valid_ent(ent[1]))
continueentity_get_string
(ent[1], EV_SZ_classname, info, charsmax(info))
if(!equal(info, "func_door"))
continueentity_get_string
(ent[1], EV_SZ_targetname, info, charsmax(info))
if(!info[0])
continueif
(TrieKeyExists(g_CellManagers, info))
{
TrieGetCell(g_CellManagers, info, ent[2])
}
else
{
ent[2] = engfunc(EngFunc_FindEntityByString, 0, "target", info)
} if(is_valid_ent(ent[2]) && (in_array(ent[2], g_Buttons, sizeof(g_Buttons)) < 0))
{
g_Buttons[pos] = ent[2]
pos++
break
}
}
}
TrieDestroy(g_CellManagers)
}stock in_array(needle, data[], size)
{
for(new i = 0; i < size; i++)
{
if(data[i] == needle)
return i
}
return -1
}stock freeday_set(id, player)
{
static src[32], dst[32]
get_user_name(player, dst, charsmax(dst)) if(is_user_alive(player) && !get_bit(g_PlayerWanted, player))
{
set_bit(g_PlayerFreeday, player)
entity_set_int(player, EV_INT_skin, 6)
if(get_pcvar_num(gp_GlowModels))
player_glow(player, g_Colors[1]) if(0 < id <= g_MaxClients)
{
get_user_name(id, src, charsmax(src))
player_hudmessage(0, 6, 3.0, {0, 255, 0}, "%L", LANG_SERVER, "JBE_GUARD_FREEDAYGIVE", src, dst)
}
else if(!is_freeday())
{
player_hudmessage(0, 6, 3.0, {0, 255, 0}, "%L", LANG_SERVER, "JBE_PRISONER_HASFREEDAY", dst)
}
}
}stock first_join(id)
{
if(!get_bit(g_PlayerJoin, id))
{
set_bit(g_PlayerJoin, id)
clear_bit(g_PlayerHelp, id)
set_task(5.0, "cmd_help", TASK_HELP + id)
}
}stock ctcount_allowed()
{
static count
count = ((g_TeamCount[CS_TEAM_T] + g_TeamCount[CS_TEAM_CT]) / get_pcvar_num(gp_TeamRatio))
if(count < 2)
count = 2
else if(count > get_pcvar_num(gp_CtMax))
count = get_pcvar_num(gp_CtMax) return count
}stock player_hudmessage(id, hudid, Float:time = 0.0, color[3] = {0, 255, 0}, msg[], any:...)
{
static text[512], Float:x, Float:y
x = g_HudSync[hudid][_x]
y = g_HudSync[hudid][_y]
if(time > 0)
set_hudmessage(color[0], color[1], color[2], x, y, 0, 0.00, time, 0.00, 0.00)
else
set_hudmessage(color[0], color[1], color[2], x, y, 0, 0.00, g_HudSync[hudid][_time], 0.00, 0.00) vformat(text, charsmax(text), msg, 6)
ShowSyncHudMsg(id, g_HudSync[hudid][_hudsync], text)
}stock menu_players(id, CsTeams:team, skip, alive, callback[], title[], any:...)
{
static i, name[32], num[5], menu, menuname[32]
vformat(menuname, charsmax(menuname), title, 7)
menu = menu_create(menuname, callback)
for(i = 1; i <= g_MaxClients; i++)
{
if(!is_user_connected(i) || (alive && !is_user_alive(i)) || (skip == i))
continueif
(!(team == CS_TEAM_T || team == CS_TEAM_CT) || ((team == CS_TEAM_T || team == CS_TEAM_CT) && (cs_get_user_team(i) == team)))
{
get_user_name(i, name, charsmax(name))
num_to_str(i, num, charsmax(num))
menu_additem(menu, name, num, 0)
}
}
menu_display(id, menu)
}stock player_glow(id, color[3], amount=40)
{
set_user_rendering(id, kRenderFxGlowShell, color[0], color[1], color[2], kRenderNormal, amount)
}stock player_strip_weapons(id)
{
strip_user_weapons(id)
give_item(id, "weapon_knife")
set_pdata_int(id, m_iPrimaryWeapon, 0)
}stock player_strip_weapons_all()
{
for(new i = 1; i <= g_MaxClients; i++)
{
if(is_user_alive(i))
{
player_strip_weapons(i)
}
}
}stock is_freeday()
{
return (g_FreedayNext || g_Freeday || (g_JailDay == 1))
}public jail_open()
{
static i
for(i = 0; i < sizeof(g_Buttons); i++)
{
if(g_Buttons[i])
{
ExecuteHamB(Ham_Use, g_Buttons[i], 0, 0, 1, 1.0)
entity_set_float(g_Buttons[i], EV_FL_frame, 0.0)
}
}
}
- Код: Выделить всё
L 01/01/2012 - 17:15:59: [FUN] Invalid player 8
L 01/01/2012 - 17:15:59: [AMXX] Displaying debug trace (plugin "jbextreme.amxx")
L 01/01/2012 - 17:15:59: [AMXX] Run time error 10: native error (native "strip_user_weapons")
L 01/01/2012 - 17:15:59: [AMXX] [0] jbextreme.sma::player_strip_weapons (line 1790)
L 01/01/2012 - 17:15:59: [AMXX] [1] jbextreme.sma::duel_guns (line 1557)[L 01/02/2012 - 03:36:56: [FUN] Player out of range (0)
L 01/02/2012 - 03:36:56: [AMXX] Displaying debug trace (plugin "jbextreme.amxx")
L 01/02/2012 - 03:36:56: [AMXX] Run time error 10: native error (native "set_user_rendering")
L 01/02/2012 - 03:36:56: [AMXX] [0] jbextreme.sma::player_killed (line 737)L 01/04/2012 - 21:30:22: [CSTRIKE] Invalid player 32
L 01/04/2012 - 21:30:22: [AMXX] Displaying debug trace (plugin "jbextreme.amxx")
L 01/04/2012 - 21:30:22: [AMXX] Run time error 10: native error (native "cs_get_user_team")
L 01/04/2012 - 21:30:22: [AMXX] [0] jbextreme.sma::player_status (line 508)L 01/06/2012 - 00:22:37: [CSTRIKE] Non-player entity -1 out of range
L 01/06/2012 - 00:22:37: [AMXX] Displaying debug trace (plugin "jbextreme.amxx")
L 01/06/2012 - 00:22:37: [AMXX] Run time error 10: native error (native "cs_set_weapon_ammo")
L 01/06/2012 - 00:22:37: [AMXX] [0] jbextreme.sma::duel_guns (line 1559)L 01/09/2012 - 00:51:47: [CSTRIKE] Non-player entity -1 out of range
L 01/09/2012 - 00:51:47: [AMXX] Displaying debug trace (plugin "jbextreme.amxx")
L 01/09/2012 - 00:51:47: [AMXX] Run time error 10: native error (native "cs_set_weapon_ammo")
L 01/09/2012 - 00:51:47: [AMXX] [0] jbextreme.sma::duel_guns (line 1552)
код большой(
ниже буду ошибки выкладывать!
Последний раз редактировалось data 10 янв 2012, 21:07, всего редактировалось 3 раз(а).
-
data
- Сообщения: 79
- Зарегистрирован: 09 ноя 2011, 01:12
- Благодарил (а): 28 раз.
- Поблагодарили: 3 раз.
- Языки программирования: Counter-Strike 1.6
- Ответить с цитатой
Re: JailBreak Extreme : [AMXX] Run time error 10: native err
data » 31 дек 2011, 00:31
рядом с функции я написал какая линия и ошибка, всем с наступающем!
-
data
- Сообщения: 79
- Зарегистрирован: 09 ноя 2011, 01:12
- Благодарил (а): 28 раз.
- Поблагодарили: 3 раз.
- Языки программирования: Counter-Strike 1.6
- Ответить с цитатой
Re: JailBreak Extreme : [AMXX] Run time error 10: native err
DJ_WEST » 11 янв 2012, 10:46
- Код: Выделить всё
L 01/01/2012 - 17:15:59: [FUN] Invalid player 8
L 01/01/2012 - 17:15:59: [AMXX] Displaying debug trace (plugin "jbextreme.amxx")
L 01/01/2012 - 17:15:59: [AMXX] Run time error 10: native error (native "strip_user_weapons")
L 01/01/2012 - 17:15:59: [AMXX] [0] jbextreme.sma::player_strip_weapons (line 1790)
L 01/01/2012 - 17:15:59: [AMXX] [1] jbextreme.sma::duel_guns (line 1557)
Здесь:
- Код: Выделить всё
player_strip_weapons(player)
Возможно игрока уже нет на сервере. Нужно добавить проверку:
- Код: Выделить всё
if (is_user_connected(player))
- Код: Выделить всё
[L 01/02/2012 - 03:36:56: [FUN] Player out of range (0)
L 01/02/2012 - 03:36:56: [AMXX] Displaying debug trace (plugin "jbextreme.amxx")
L 01/02/2012 - 03:36:56: [AMXX] Run time error 10: native error (native "set_user_rendering")
L 01/02/2012 - 03:36:56: [AMXX] [0] jbextreme.sma::player_killed (line 737)
Здесь:
- Код: Выделить всё
set_user_rendering(attacker, kRenderFxNone, 0, 0, 0, kRenderNormal, 0)
Добавить проверку:
- Код: Выделить всё
if (1 <= attacker <= 32)
- Код: Выделить всё
L 01/04/2012 - 21:30:22: [CSTRIKE] Invalid player 32
L 01/04/2012 - 21:30:22: [AMXX] Displaying debug trace (plugin "jbextreme.amxx")
L 01/04/2012 - 21:30:22: [AMXX] Run time error 10: native error (native "cs_get_user_team")
L 01/04/2012 - 21:30:22: [AMXX] [0] jbextreme.sma::player_status (line 508)
Здесь:
- Код: Выделить всё
team = cs_get_user_team(player)
Добавить проверку:
- Код: Выделить всё
if (is_user_connected(player))
- Код: Выделить всё
L 01/06/2012 - 00:22:37: [CSTRIKE] Non-player entity -1 out of range
L 01/06/2012 - 00:22:37: [AMXX] Displaying debug trace (plugin "jbextreme.amxx")
L 01/06/2012 - 00:22:37: [AMXX] Run time error 10: native error (native "cs_set_weapon_ammo")
L 01/06/2012 - 00:22:37: [AMXX] [0] jbextreme.sma::duel_guns (line 1559)
Здесь:
- Код: Выделить всё
cs_set_weapon_ammo(gun, 1)
Добавить проверку:
- Код: Выделить всё
if (gun > 0)
- Код: Выделить всё
L 01/09/2012 - 00:51:47: [CSTRIKE] Non-player entity -1 out of range
L 01/09/2012 - 00:51:47: [AMXX] Displaying debug trace (plugin "jbextreme.amxx")
L 01/09/2012 - 00:51:47: [AMXX] Run time error 10: native error (native "cs_set_weapon_ammo")
L 01/09/2012 - 00:51:47: [AMXX] [0] jbextreme.sma::duel_guns (line 1552)
Тоже самое.
Не пишите мне в ЛС: если вам нужна помощь на бесплатной основе. Любые вопросы на форум.
-
DJ_WEST
- Сообщения: 3641
- Зарегистрирован: 22 авг 2009, 00:38
- Благодарил (а): 48 раз.
- Поблагодарили: 2208 раз.
- Опыт программирования: Больше трех лет
- Языки программирования: Counter-Strike 1.6
Counter-Strike: Source
Left 4 Dead
Left 4 Dead 2
- Ответить с цитатой
Re: Ошибки в плагине!
data » 11 янв 2012, 16:18
Спасибо сделал, хоть уже буду знать как проверку делать!
-
data
- Сообщения: 79
- Зарегистрирован: 09 ноя 2011, 01:12
- Благодарил (а): 28 раз.
- Поблагодарили: 3 раз.
- Языки программирования: Counter-Strike 1.6
Вернуться в Вопросы по AMXX и его плагинам
Кто сейчас на конференции
Сейчас этот форум просматривают: нет зарегистрированных пользователей и гости: 1
Наши новости: |
Правила форума
Этот раздел, как вы могли заметить по названию, предназначен для решения вопросов по поводу уже существующих модов и плагинов.
Пожалуйста, если у вас проблема с написанием плагина, не путайте этот раздел с разделом по скриптингу.
Для поиска плагинов и модов существует соответствующий раздел.
Название темы должно соответствовать содержанию. Темы с названием типа «Помогите», «Вопрос», «парни подскажите…» — будут удалены.
Все темы, не относящиеся к «Вопросам по модам и плагинам», будут удалены или перемещены в соответствующий раздел.
Правила оформления темы:
1. Помимо заголовка не забудьте верно сформулировать свой вопрос.
2. Выложите исходник (в тег кода + ) или ссылку на плагин который вызывает у вас вопросы.
3. Выложите лог с ошибками (если имеется) под спойлер
2 страниц |
, Ошибка в плагинах после компиляции
|
FOXSAN |
Сообщение
|
Стаж: 6 лет 9 месяцев Сообщений: 236 |
Добрый день. Код L 05/09/2016 — 11:35:05: [HAMSANDWICH] Failed to retrieve vtable for «player», h Заранее спасибо!! |
|
|
iShot |
Сообщение
|
Стаж: 8 лет 7 месяцев Сообщений: 1340 Меценат |
Отредактировал: iShot, — 9.5.2016, 11:11
улыбнись |
|
|
FOXSAN |
Сообщение
|
Стаж: 6 лет 9 месяцев Сообщений: 236 |
Цитата(iShot @ 9.5.2016, 12:11)
Код: meta list Exe build: 13:12:29 Aug 29 2013 (6153) |
|
|
iShot |
Сообщение
|
Стаж: 8 лет 7 месяцев Сообщений: 1340 Меценат |
улыбнись |
|
|
GOOD FELLOW |
Сообщение
|
|
исходник |
|
|
georgeml |
Сообщение
|
Стаж: 9 лет Сообщений: 1467 |
hamdata.ini не родной |
|
|
FOXSAN |
Сообщение
|
Стаж: 6 лет 9 месяцев Сообщений: 236 |
Цитата FOXSAN, покажите meta version, исходник плагина, возможно нужно перекомпилировать плагин под амх-х 1.8.2. Код: meta version Файлы не могу прикреплять. Брал от сюда: https://c-s.net.ua/forum/index.php?showtopic=55067 Отредактировал: FOXSAN, — 9.5.2016, 18:55 |
|
|
iShot |
Сообщение
|
Стаж: 8 лет 7 месяцев Сообщений: 1340 Меценат |
если проблема не решиться, перекомпилируйте плагин под AMX Mod X 1.8.2 — локально. Отредактировал: iShot, — 9.5.2016, 19:13
улыбнись |
|
Поблагодарили 1 раз
|
FOXSAN |
Сообщение
|
Стаж: 6 лет 9 месяцев Сообщений: 236 |
Цитата(iShot @ 9.5.2016, 20:11)
если проблема не решиться, перекомпилируйте плагин под AMX Mod X 1.8.2 — локально. Поменял hamdata.ini. Начал выдавать: L 05/09/2016 - 21:34:31: [AMXX] Plugin "afk_control.amxx" failed to load: Plugin |
|
|
iShot |
Сообщение
|
Стаж: 8 лет 7 месяцев Сообщений: 1340 Меценат |
Отредактировал: iShot, — 10.5.2016, 7:44
улыбнись |
|
|
FOXSAN |
Сообщение
|
Стаж: 6 лет 9 месяцев Сообщений: 236 |
Цитата(iShot @ 10.5.2016, 8:44)
hamdata.ini брал офф сайта http://www.amxmodx.org , а именно вот от сюда http://www.amxmodx.org/dl.php?filename=amx…se-linux.tar.gz . L 05/09/2016 - 11:35:05: [HAMSANDWICH] Failed to retrieve vtable for "player", h Стала: L 05/09/2016 - 21:34:31: [AMXX] Plugin "afk_control.amxx" failed to load: Plugin |
|
|
GOOD FELLOW |
Сообщение
|
Стаж: 10 лет Сообщений: 2294 |
В modules.ini хам включён? |
|
|
oxoTHuk. |
Сообщение
|
Стаж: 14 лет Сообщений: 879 |
Отредактировал: oxoTHuk., — 10.5.2016, 11:51 |
|
|
FOXSAN |
Сообщение
|
Стаж: 6 лет 9 месяцев Сообщений: 236 |
Отредактировал: FOXSAN, — 10.5.2016, 12:22 |
|
|
iShot |
Сообщение
|
Стаж: 8 лет 7 месяцев Сообщений: 1340 Меценат |
upd: в plugins.ini, afk_control.amxx debug
улыбнись |
|
|
FOXSAN |
Сообщение
|
Стаж: 6 лет 9 месяцев Сообщений: 236 |
[S_API FAIL] SteamAPI_Init() failed; SteamAPI_IsSteamRunning() failed. Единственная ошибка. |
|
|
oxoTHuk. |
Сообщение
|
Стаж: 14 лет Сообщений: 879 |
Цитата 1 Не ошибка Отредактировал: oxoTHuk., — 10.5.2016, 13:55 |
|
Поблагодарили 1 раз
|
FOXSAN |
Сообщение
|
Стаж: 6 лет 9 месяцев Сообщений: 236 |
|
|
|
oxoTHuk. |
Сообщение
|
Стаж: 14 лет Сообщений: 879 |
|
|
|
FOXSAN |
Сообщение
|
Стаж: 6 лет 9 месяцев Сообщений: 236 |
Граждане, отписываюсь по последней проверке. |
|
|
0 пользователей и 1 гостей читают эту тему:
-
#1
Всем привет
В общем суть такова, переезжал с хоста на другой хост и столкнулся с проблемой.
L 11/20/2017 — 20:58:48: [AMXX] Run time error 10 (plugin «zombie_plague_advance_v1-6-1.amxx») (native «get_pcvar_num») — debug not enabled!
L 11/20/2017 — 20:58:48: [AMXX] To enable debug mode, add «debug» after the plugin name in plugins.ini (without quotes).
L 11/20/2017 — 20:58:53: Invalid CVAR pointer
L 11/20/2017 — 22:55:49: [AMXX] Displaying debug trace (plugin «zombie_plague_advance_v1-6-1.amxx»)
L 11/20/2017 — 22:55:49: [AMXX] Run time error 10: native error (native «get_pcvar_num»)
L 11/20/2017 — 22:55:49: [AMXX] [0] zombie_plague_advance_v1-6-1.sma::cache_cvars (line 7840)
L 11/20/2017 — 22:55:49: Invalid CVAR pointer
L 11/20/2017 — 22:55:49: [AMXX] Displaying debug trace (plugin «zombie_plague_advance_v1-6-1.amxx»)
L 11/20/2017 — 22:55:49: [AMXX] Run time error 10: native error (native «get_pcvar_float»)
L 11/20/2017 — 22:55:49: [AMXX] [0] zombie_plague_advance_v1-6-1.sma::event_round_start (line 2035)
L 11/20/2017 — 22:55:50: Invalid CVAR pointer
L 11/20/2017 — 22:55:50: [AMXX] Displaying debug trace (plugin «zombie_plague_advance_v1-6-1.amxx»)
L 11/20/2017 — 22:55:50: [AMXX] Run time error 10: native error (native «get_pcvar_num»)
L 11/20/2017 — 22:55:50: [AMXX] [0] zombie_plague_advance_v1-6-1.sma::remove_stuff (line 10245)
L 11/20/2017 — 22:55:51: Invalid CVAR pointer
L 11/20/2017 — 22:55:51: [AMXX] Displaying debug trace (plugin «zombie_plague_advance_v1-6-1.amxx»)
L 11/20/2017 — 22:55:51: [AMXX] Run time error 10: native error (native «get_pcvar_num»)
L 11/20/2017 — 22:55:51: [AMXX] [0] zombie_plague_advance_v1-6-1.sma::welcome_msg (line 9412)
L 11/20/2017 — 22:55:54: Invalid CVAR pointer
L 11/20/2017 — 22:55:54: [AMXX] Displaying debug trace (plugin «zombie_plague_advance_v1-6-1.amxx»)
L 11/20/2017 — 22:55:54: [AMXX] Run time error 10: native error (native «get_pcvar_num»)
L 11/20/2017 — 22:55:54: [AMXX] [0] zombie_plague_advance_v1-6-1.sma::cache_cvars (line 7840)
L 11/20/2017 — 22:55:54: [AMXX] [1] zombie_plague_advance_v1-6-1.sma::lighting_effects (line 9548)
L 11/20/2017 — 22:55:59: Invalid CVAR pointer
L 11/20/2017 — 22:55:59: [AMXX] Displaying debug trace (plugin «zombie_plague_advance_v1-6-1.amxx»)
L 11/20/2017 — 22:55:59: [AMXX] Run time error 10: native error (native «get_pcvar_num»)
L 11/20/2017 — 22:55:59: [AMXX] [0] zombie_plague_advance_v1-6-1.sma::cache_cvars (line 7840)
L 11/20/2017 — 22:55:59: [AMXX] [1] zombie_plague_advance_v1-6-1.sma::lighting_effects (line 9548)
L 11/20/2017 — 22:56:04: Invalid CVAR pointer
L 11/20/2017 — 22:56:04: [AMXX] Displaying debug trace (plugin «zombie_plague_advance_v1-6-1.amxx»)
L 11/20/2017 — 22:56:04: [AMXX] Run time error 10: native error (native «get_pcvar_num»)
L 11/20/2017 — 22:56:04: [AMXX] [0] zombie_plague_advance_v1-6-1.sma::cache_cvars (line 7840)
L 11/20/2017 — 22:56:04: [AMXX] [1] zombie_plague_advance_v1-6-1.sma::lighting_effects (line 9548)
L 11/20/2017 — 22:56:09: Invalid CVAR pointer
L 11/20/2017 — 22:56:09: [AMXX] Displaying debug trace (plugin «zombie_plague_advance_v1-6-1.amxx»)
L 11/20/2017 — 22:56:09: [AMXX] Run time error 10: native error (native «get_pcvar_num»)
L 11/20/2017 — 22:56:09: [AMXX] [0] zombie_plague_advance_v1-6-1.sma::cache_cvars (line 7840)
L 11/20/2017 — 22:56:09: [AMXX] [1] zombie_plague_advance_v1-6-1.sma::lighting_effects (line 9548)
L 11/20/2017 — 22:56:14: Invalid CVAR pointer
L 11/20/2017 — 22:56:14: [AMXX] Displaying debug trace (plugin «zombie_plague_advance_v1-6-1.amxx»)
L 11/20/2017 — 22:56:14: [AMXX] Run time error 10: native error (native «get_pcvar_num»)
L 11/20/2017 — 22:56:14: [AMXX] [0] zombie_plague_advance_v1-6-1.sma::cache_cvars (line 7840)
L 11/20/2017 — 22:56:14: [AMXX] [1] zombie_plague_advance_v1-6-1.sma::lighting_effects (line 9548)
Исходник прикрепил.
-
418,1 KB
Просмотры: 4
Последнее редактирование: 20 Ноя 2017