Hello i download one plugin but he not have author how to set i try to set with define but not read in server , can you set in .sma
PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <hamsandwich>
#include <fakemeta>
#include <colorchat>
#define TIME 30.0
new Float:player_origin[33][3];
public plugin_init(){
RegisterHam(Ham_Spawn, "player", "e_Spawn", 1);
}
public e_Spawn(id)
{
remove_task(id)
if(is_user_alive(id))
{
set_task(0.8, "get_spawn", id);
}
return HAM_IGNORED;
}
public get_spawn(id)
{
pev(id, pev_origin, player_origin[id]);
set_task(TIME, "check_afk", id);
}
public check_afk(id)
{
if(is_user_alive(id))
{
if(same_origin(id))
{
user_kill(id);
new name[33];
get_user_name(id, name, 32);
ColorChat(0, GREEN, "^3[^4AFK Slay^3]^4: %s ^3eshte vrare per shkak te qendrimit ne ^4AFK.", name);
}
}
}
public same_origin(id)
{
new Float:origin[3];
pev(id, pev_origin, origin);
for(new i = 0; i < 3; i++)
if(origin[i] != player_origin[id][i])
return 0;
return 1;
}