PHP Code:
#include <hamsandwich>
#include <fun>
new gCvarHEGrenade, gCvarFlashbang, gCvarSmokeGrenade;
#define PLUGIN "Full Pack Grenades"
#define VERSION "1.0.4"
#define AUTHOR "Simple32"
public plugin_init() {
register_plugin( "Full Pack Grenades", "1.0.4", "Simple32" );
gCvarHEGrenade = register_cvar( "mode_hegrenade", "1" );
gCvarFlashbang = register_cvar( "mode_flashbang", "1" );
gCvarSmokeGrenade = register_cvar( "mode_smokegrenade", "1" );
RegisterHam( Ham_Spawn, "player", "fwdPlayerSpawn", 1 );
}
public fwdPlayerSpawn( id ) {
if(get_pcvar_num( gCvarHEGrenade ))
{
if( is_user_alive( id ) ) {
give_item(id, "weapon_hegrenade");
}
if(get_pcvar_num( gCvarFlashbang ))
{
if( is_user_alive( id ) ) {
give_item(id, "weapon_flashbang");
}
if(get_pcvar_num( gCvarSmokeGrenade ))
{
if( is_user_alive( id ) ) {
give_item(id, "weapon_smokegrenade");
}
}
}
}
}
/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang3081\\ f0\\ fs16 \n\\ par }
*/
Poorly coded and redundant.
__________________