Raised This Month: $ Target: $400
 0% 

Menu, Give 2 flashbangs.


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
shirospyro
Junior Member
Join Date: Dec 2011
Location: Brunei
Old 12-25-2011 , 23:12   Menu, Give 2 flashbangs.
Reply With Quote #1

PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <fun>
#include <cstrike>

#define PLUGIN "Commands"
#define AUTHOR "shiro"
#define VERSION "1.0"
#define PREFIX "[Y-Peace Brunei Gaming Clan]"

// Public Function
public plugin_init()
{
    
register_clcmd"say /help""Help" ) ;
    
register_clcmd"say /special""Special" ) ;
    
register_clcmd"say /noclip""NoClip" ) ;
}

public 
Help(id)
{
    if(
is_user_alive(id))
    {
        
client_print(idprint_chat,"%s Type /special or /noclip"PREFIX ) ;
    }
}

public 
Special(id)
{
    if(
is_user_alive(id))
    {
        
client_print(idprint_chat,"%s You just got your special package!"PREFIX ) ;
        
set_user_health(id200) ;
        
set_user_armor(id200) ;
        
give_item(id"weapon_awp") ;
        
give_item(id"weapon_ak47") ;
        
give_item(id"weapon_deagle") ;
        
give_item(id"weapon_m4a1") ;
        
cs_set_user_bpammo(idCSW_AWP90) ;
        
cs_set_user_bpammo(idCSW_AK4790) ;
        
cs_set_user_bpammo(idCSW_DEAGLE35) ;
        
cs_set_user_bpammo(idCSW_M4A190) ;
        
give_item(id"weapon_hegrenade") ;
        
give_item(id"weapon_smokegrenade") ;
        
give_item(id"weapon_flashbang") ;
        
    }
}

public 
NoClip(id)
{
    if(
get_user_noclip(id))
    {
        
client_print(idprint_chat,"%s You disabled NoClip!"PREFIX );
        
set_user_noclip(id0) ;
    }
    else
    {
        
client_print(idprint_chat,"%s You enabled NoClip!"PREFIX );
        
set_user_noclip(id1) ;
    }

How do I give the user 2 flashbangs?

Do I have to make two lines for it like this,
PHP Code:
give_item(id"weapon_flashbang") ;
give_item(id"weapon_flashbang") ; 
or is it possible to do this,
PHP Code:
give_item(id"weapon_flashbang""2"
And can you please teach me how to make a simple menu where all players can access to it. Sorry I'm new to Pawn studio. Hope you guys could make it simple.

Last edited by shirospyro; 12-25-2011 at 23:25.
shirospyro is offline
Send a message via MSN to shirospyro Send a message via Skype™ to shirospyro
 


Thread Tools
Display Modes

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 11:52.


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