Raised This Month: $ Target: $400
 0% 

change code


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Toastt
BANNED
Join Date: Nov 2009
Old 12-29-2009 , 02:26   change code
Reply With Quote #1

can some one make/change this code below into a shot for shot event?
Shot for shot: people get to shoot at each other 1 shot at a time, after each shot they have to reload to shoot again.

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");
    
give_item(tempid"weapon_deagle");
    
cs_set_user_bpammo(tempid,CSW_DEAGLE,35)
    
fm_set_rendering(tempidkRenderFxGlowShell02500kRenderNormal20)
    
    
strip_user_weapons(id)
    
set_user_health(id100)
    
give_item(id"weapon_knife");
    
give_item(id"weapon_deagle")
    
cs_set_user_bpammo(id,CSW_DEAGLE,35)
    
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 Shot for Shot",szNameszName2)   

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

Toastt is offline
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


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


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