AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Spray Reload Help (https://forums.alliedmods.net/showthread.php?t=113159)

Toastt 12-23-2009 23:43

Spray Reload Help
 
Okay so i have this code on last request, when you choose Spray Contest and you sprayed before choosing the event, you cant spray for the event, can someone fix this
CODE:
PHP Code:

 public menu6(id)
{
    new 
menu menu_create("\yChoose player to fight:""submenu6");
    
     new 
players[32], pnumtempid;
    new 
szName[32], szTempid[10];

    
get_players(playerspnum"a");

    for( new 
ii<pnumi++ )
    {
        
tempid players[i];
        
        if (
cs_get_user_team(tempid) != CS_TEAM_CT)
        {
            continue;
        }
        
        
get_user_name(tempidszName31);
        
num_to_str(tempidszTempid9);
        
menu_additem(menuszNameszTempid0);
    }
    
    
menu_display(idmenu);
    return 
PLUGIN_HANDLED;
}

public 
submenu6(idmenuitem)
{
    if( 
item == MENU_EXIT )
    {
        
menu_destroy(menu);
        return 
PLUGIN_HANDLED;
    }

    new 
data[6], iName[64];
    new 
accesscallback;
    
menu_item_getinfo(menuitemaccessdata,5iName63callback);

    new 
tempid str_to_num(data);
    
strip_user_weapons(tempid);
    
give_item(id"weapon_knife");
    
fm_set_rendering(tempidkRenderFxGlowShell02500kRenderNormal20)
    
    
strip_user_weapons(id)
    
set_user_health(id100)
    
give_item(id"weapon_knife");
    
fm_set_rendering(idkRenderFxGlowShell02500kRenderNormal20)
            
    new 
szName[32], szName2[32]
    
get_user_name(idszName31);
    
get_user_name(tempidszName231);
    
set_hudmessage02550, -1.00.4025.08.00.00.010)
    
show_hudmessage(0"%s vs %s^n Spray Contest",szNameszName2)   

    if( 
is_user_alive(tempid) )
        
set_user_health(tempid100);
    
    
menu_destroy(menu);
    return 
PLUGIN_HANDLED;




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

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