How would i go about writing a function that will cause an explosion around x radious killing the index and those around.
This is all i have found so far
PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <fakemeta>
#include <hamsandwich>
public plugin_init() {
register_plugin("Suicide Bomber", "1.0", "Shadow Warrior")
//register_logevent("random_player", 2, "1=Round_Start")
RegisterHam(Ham_Spawn, "player", "random_player", 1)
}
public random_player(id)
{
new players[32], totalplayers, randplayer, pass;
get_players(players, totalplayers)
if (!randplayer)
randplayer = random_num(1, totalplayers)
if(!is_user_connected(randplayer) || !is_user_alive(randplayer))
{
set_task(0.1, "random_player")
return PLUGIN_HANDLED
}
if(pass == 1)
return PLUGIN_HANDLED
pass = 1
suicide_bomb(id);
return PLUGIN_HANDLED
}
public suicide_bomb(id){
//BOOM CODE lol
}