PHP Code:
#include <amxmodx> // AMXX lmao
#include <fun> //give_item
#include <hamsandwich> // To hook Ham_Spawn
#define PLUGIN "Free Grenades"
#define VERSION "1.0"
#define AUTHOR "deprale" // CHANGE IT AS YOU LIKE, IDC, 1 min work.
public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR)
RegisterHam(Ham_Spawn, "player", "player_spawn", 1) // THE HAM_SPAWN HOOK.
}
public player_spawn(id) // THE FUNCTION I'M HOOKING.
{
if( !is_user_connected( id ) ) // CHECK IF THE USER IS CONNECTED.
return PLUGIN_HANDLED;
give_item( id, "weapon_hegrenade" ) // HE
give_item( id, "weapon_smokegrenade" ) // SMOKE
give_item( id, "weapon_flashbang" ) // FLASH
give_item( id, "weapon_flashbang" ) // FLASH
return PLUGIN_HANDLED;
}
__________________