Well, I edited original Jail Rebel from ConnorMcLeod
It's looking like this:
PHP Code:
#include <amxmodx>
#include <cstrike>
#include <hamsandwich>
#define VERSION "0.0.1"
#define MAX_PLAYERS 32
#define IsPlayer(%1) ( 1 <= %1 <= g_iMaxPlayers )
new g_iTKills[MAX_PLAYERS+1]
new g_bRebel[MAX_PLAYERS+1]
new g_iMaxPlayers
new gmsgSayText
public plugin_init()
{
register_plugin("Jail Rebel", VERSION, "ConnorMcLeod")
RegisterHam(Ham_Killed, "player", "Player_Killed_Post", 1)
register_event("DeathMsg", "Event_DeathMsg", "a")
register_event("Damage", "Event_Damage", "b", "2>0", "3=0")
g_iMaxPlayers = get_maxplayers()
gmsgSayText = get_user_msgid("SayText")
}
public client_putinserver(id)
{
g_bRebel[id] = false
g_iTKills[id] = 0
}
public Player_Killed_Post( id )
{
if( is_user_alive( id ) )
{
g_bRebel[id] = false
g_iTKills[id] = 0
}
}
public Event_DeathMsg()
{
new iVictim = read_data(2)
if( cs_get_user_team( iVictim ) == CS_TEAM_T )
{
new iKiller = read_data(1)
if( IsPlayer( iKiller ) && cs_get_user_team( iKiller ) == CS_TEAM_CT )
{
if( g_bRebel[iVictim] )
{
new szVName[32], szKName[32]
get_user_name(iVictim, szVName, charsmax(szVName))
get_user_name(iKiller, szKName, charsmax(szKName))
client_print(0, print_chat, "[JailBreak] O oficial "%s" matou o fugitivo "%s"", szKName, szKName)
}
else if( ++g_iTKills[iKiller] > 2 )
{
new szKName[32]
get_user_name(iKiller, szKName, charsmax(szKName))
user_silentkill( iKiller )
client_print(0, print_chat, "[JailBreak] O oficial "%s" foi morto apos ter matado mais de 2 prisioneiros", szKName)
}
}
}
}
public Event_Damage( id )
{
if( (read_data(4) || read_data(5) || read_data(6)) && cs_get_user_team(id) == CS_TEAM_CT )
{
new iAttacker = get_user_attacker(id)
if( IsPlayer(iAttacker)
&& !g_bRebel[iAttacker]
&& is_user_alive(iAttacker)
&& cs_get_user_team(iAttacker) == CS_TEAM_T )
{
new szName[32]
get_user_name(iAttacker, szName, charsmax(szName))
g_bRebel[iAttacker] = true
client_print_c(0, "[JailBreak] O prisioneiro "%s" agora e um fugitivo!", szName)
}
}
And I'm getting this errors:
Quote:
//AMXXPC compile.exe
// by the AMX Mod X Dev Team
//// jail_rebel.sma
// C:\Program Files\Valve\HLServer\cstrike\addons\amxmodx\s cripting\jail_rebel.s
ma(74) : error 017: undefined symbol "s"
// C:\Program Files\Valve\HLServer\cstrike\addons\amxmodx\s cripting\jail_rebel.s
ma(74) : error 017: undefined symbol "s"
// C:\Program Files\Valve\HLServer\cstrike\addons\amxmodx\s cripting\jail_rebel.s
ma(74) : warning 215: expression has no effect
// C:\Program Files\Valve\HLServer\cstrike\addons\amxmodx\s cripting\jail_rebel.s
ma(74) : warning 215: expression has no effect
// C:\Program Files\Valve\HLServer\cstrike\addons\amxmodx\s cripting\jail_rebel.s
ma(74) : warning 215: expression has no effect
// C:\Program Files\Valve\HLServer\cstrike\addons\amxmodx\s cripting\jail_rebel.s
ma(74) : error 001: expected token: ";", but found ")"
// C:\Program Files\Valve\HLServer\cstrike\addons\amxmodx\s cripting\jail_rebel.s
ma(74) : fatal error 107: too many error messages on one line
//
// Compilation aborted.
// 4 Errors.
// Could not locate output file compiled\jail_rebel.amx (compile failed).
//
// Compilation Time: 0,11 sec
// ----------------------------------------
Press enter to exit ...
|
Line 74 is:
PHP Code:
client_print(0, print_chat, "[JailBreak] O oficial "%s" matou o fugitivo "%s"", szKName, szKName)
What's wrong?
__________________