Which part is un-understandable here ?
Code:
#include < amxmodx >
#define TIME_BUY 10.0
new bool:g_bHasBought[ 33 ] ;
public plugin_init( ) {
register_clcmd( "say /test", "BuyWeapon" ) ;
}
public BuyWeapon( id ) {
if( g_bHasBought[ id ] )
return PLUGIN_HANDLED ;
give_item( id, "weapon_m4a1" ) ;
g_bHasBought[ id ] = true ;
set_task( TIME_BUY, "ResetBool", id ) ;
}
public ResetBool( id ) {
g_bHasBought[ id ] = false ;
remove_task( id ) ;
}
__________________