Raised This Month: $ Target: $400
 0% 

Change secondary weapon to a new one


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
leonardo_
Member
Join Date: Nov 2012
Location: Moscow, right now in Vic
Old 02-06-2013 , 13:49   Change secondary weapon to a new one
Reply With Quote #1

Hi guys!

I am beginner in programming plugins and that kind of stuff, so please don't judge me so much Thank you!

So I have that:

PHP Code:
public LogEvent_RoundStart2()
{
    
CurrentRound++;
    new 
players[32], playerpnum;
    
get_players(playerspnum"a");
    for(new 
0pnumi++)
    {
        
player players[i];
        if(
is_user_alive(player) && get_user_flags(player) & ADMIN_LEVEL_G)
        {
            
give_item(player"weapon_deagle")
            
give_item(player"ammo_50ae")
            
give_item(player"ammo_50ae")
            
give_item(player"ammo_50ae")
            
            if (!
get_pcvar_num(g_menu_active))
                return 
PLUGIN_CONTINUE
            
            
if(CurrentRound >= 3)
            {
                
Showrod(player);
            }
        }
    }
    return 
PLUGIN_HANDLED

And I need to make it like, If at the beginning of 1 round player has USP or Glock, script changes it into Deagle and player has only deagle... How can I do that? Thank you!

Last edited by leonardo_; 02-06-2013 at 13:51.
leonardo_ is offline
Send a message via ICQ to leonardo_ Send a message via Skype™ to leonardo_
 



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 20:31.


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