AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Help to fix this plugin (https://forums.alliedmods.net/showthread.php?t=99628)

vermillioN25 08-07-2009 19:42

Help to fix this plugin
 
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_Postid )
{
    if( 
is_user_aliveid ) )
    {
        
g_bRebel[id] = false
        g_iTKills
[id] = 0
    
}
}

public 
Event_DeathMsg()
{
    new 
iVictim read_data(2)
    if( 
cs_get_user_teamiVictim ) == CS_TEAM_T )
    {
        new 
iKiller read_data(1)
        if( 
IsPlayeriKiller ) && cs_get_user_teamiKiller ) == CS_TEAM_CT )
        {
            if( 
g_bRebel[iVictim] )
            {
            new 
szVName[32], szKName[32]
            
get_user_name(iVictimszVNamecharsmax(szVName))
            
get_user_name(iKillerszKNamecharsmax(szKName))
            
client_print(0print_chat"[JailBreak] O oficial "%s" matou o fugitivo "%s""szKNameszKName)
            }
            else if( ++
g_iTKills[iKiller] > )
            {
            new 
szKName[32]
            
get_user_name(iKillerszKNamecharsmax(szKName))
            
user_silentkilliKiller )
            
client_print(0print_chat"[JailBreak] O oficial "%s" foi morto apos ter matado mais de 2 prisioneiros"szKName)
            }
        }
    }
}

public 
Event_Damageid )
{
    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(iAttackerszNamecharsmax(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(0print_chat"[JailBreak] O oficial "%s" matou o fugitivo "%s""szKNameszKName


What's wrong?

jim_yang 08-07-2009 20:39

Re: Help to fix this plugin
 
^" to input a quote

vermillioN25 08-07-2009 20:43

Re: Help to fix this plugin
 
OMG! Thank you, I'm so idiot ¬¬. Really thanks :D


All times are GMT -4. The time now is 18:27.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.