AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Help with an action (https://forums.alliedmods.net/showthread.php?t=172930)

Shadezz 11-27-2011 15:44

Help with an action
 
Hia guys, can someone tell me what i did wrong in this?;
PHP Code:

ActionAWP(ident)
{
    new 
Float:gametime get_gametime();
    if ( !( 
gametime >= g_gselection_next_use[id] ) && ( get_user_team id ) == ) )
    {
        if ( !
g_has_hud_text[id] )
        {
            
set_hudmessage(025500.010.1800.01.00.250.252);
            
show_hudmessage(id"%s %s^nawp Block^nNext Use: 1 round"PLUGIN_PREFIXPLUGIN_VERSION );
        }
        
        return 
PLUGIN_HANDLED;
    }
    
    if(
get_user_team(id) == 2
    {
        if ( !
g_has_hud_text[id] )
        {
            
set_hudmessage(025500.010.1800.01.00.250.252);
            
show_hudmessage(id"%s %s^nawp Block^nOnly Terrorists Can Use This Block"PLUGIN_PREFIXPLUGIN_VERSION );
        }
        
        return 
PLUGIN_HANDLED;
    }
    static 
property[5];
    if(
get_user_team(id) == 1)
    {
        
cs_set_weapon_ammo(give_item(id"weapon_awp"), 1);
        new 
awpname[42];
        
get_user_name(idawpname32);
        
set_hudmessage(255255255, -1.0, -1.006.04.0);
        
show_hudmessage(0"Be careful CTs! %s has a awp!"awpname);
    }
    
g_block_status[id] = true;
    
    
GetProperty(ent2property);
    
    
g_awp_next_use[id] = gametime str_to_float(property);
    
    return 
PLUGIN_HANDLED;


i've got no idea what i did wrong :P its loading up correctly but its not giving the awp :s its a long time since ive been coding, be nice :)

Shadezz 11-28-2011 13:01

Re: Help with an action
 
bump.. doesnt anyone know what i did wrong?, now it gives an awp, but with 32 ammo, and you can keep taking it? :S


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

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