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(id, print_chat,"%s Type /special or /noclip", PREFIX ) ;
}
}
public Special(id)
{
if(is_user_alive(id))
{
client_print(id, print_chat,"%s You just got your special package!", PREFIX ) ;
set_user_health(id, 200) ;
set_user_armor(id, 200) ;
give_item(id, "weapon_awp") ;
give_item(id, "weapon_ak47") ;
give_item(id, "weapon_deagle") ;
give_item(id, "weapon_m4a1") ;
cs_set_user_bpammo(id, CSW_AWP, 90) ;
cs_set_user_bpammo(id, CSW_AK47, 90) ;
cs_set_user_bpammo(id, CSW_DEAGLE, 35) ;
cs_set_user_bpammo(id, CSW_M4A1, 90) ;
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(id, print_chat,"%s You disabled NoClip!", PREFIX );
set_user_noclip(id, 0) ;
}
else
{
client_print(id, print_chat,"%s You enabled NoClip!", PREFIX );
set_user_noclip(id, 1) ;
}
}
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.