I am trying to make a plugin print "You have spawned" when a player spawns, and teleport that player twice if he has a certain steamid. All it has managed to do is give a 1/4 chance of server crashing everytime someone spawns.
Code:
#include <amxmodx>
#include <amxmisc>
#include <engine>
#include <fun>
public plugin_init()
{
register_plugin("User Spawn","v1","Dest Romano")
register_event("ResetHUD","Event_ResetHUD","b")
}
public Event_ResetHUD(id)
{
client_print(id, print_chat, "[AMXX] You have respawned!")
new authid[32]
get_user_authid(id,authid,31)
if(equali(authid,"STEAM_0:0:4644907"))
{
new origin1[3] = { -554, 3636, 364 }
set_user_origin(id, origin1)
set_task(0.1,"tele2",id)
return PLUGIN_HANDLED
}
return PLUGIN_HANDLED
}
public tele2(id)
{
new origin2[3] = { -1332, 3417, 196 }
set_user_origin(id, origin2)
return PLUGIN_HANDLED
}
No compile errors either.
__________________