AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Jail break shop (https://forums.alliedmods.net/showthread.php?t=132178)

Tonda 07-12-2010 16:59

Jail break shop
 
Hi, i like jail break shop plugin : http://forums.alliedmods.net/showthr...ight=jail+shop

but i need crate script: Admin with flag H get special points (40) and admin with acces flag get 50 points if kill enemy. I try this, but compile error, can you help me?

Code:

#include <amxmodx>
#include <hamsandwich>
#define ACCESS_FLAG ADMIN_LEVEL_H
new
g_jbpacks[33]
public plugin_init()
{
register_plugin("Ammo Pack", "1.2", "Tonda")
RegisterHam(Ham_Killed,  "player", "fw_player_killed")
}
public fw_player_killed(victim, attacker, shouldgib) {
   
    new iFlags = is_user_admin( attacker );
    new iPacks = g_jbpacks( attacker );
   
    if( iFlags & ACCESS_FLAG ) {
        if( iFlags & ADMIN_LEVEL_H ) {
            iPacks += 50;
           
            if( iPacks > 200 )
                iPacks = 200;
        } else {
            iPacks += 40;
           
            if( iPacks > 160 )
                iPacks = 160;
        }
       
        g_jbpacks( Attacker, iPacks );
    }
    else {
        if( iPacks > 40 )
            g_jbpacks( attacker, 40 );
    }
}


NzGamers 07-12-2010 21:41

Re: Jail break shop
 
does that jb allow you to interact with it? ( PLUGIN API )


All times are GMT -4. The time now is 07:10.

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