Code:
#include <amxmodx>
#include <amxmisc>
#include <fun>
public plugin_init()
{
register_plugin("Telly to spawn", "0.1", "v3x");
register_clcmd("telly", "ClCmd_Teleport", ADMIN_KICK);
register_clcmd("fullupdate", "BlockCmd");
register_event("ResetHUD", "GetSpawnOrigin", "b");
}
new g_iOrigin[33][3];
public GetSpawnOrigin( id )
{
get_user_origin(id, g_iOrigin[id], 0);
}
public ClCmd_Teleport( id, lvl, cid )
{
if(!cmd_access(id, lvl, cid, 0))
return PLUGIN_HANDLED;
set_user_origin(id, g_iOrigin[id]);
client_print(id, 3, "If all went well, you should be where you spawned.");
return PLUGIN_HANDLED;
}
public BlockCmd( id )
{
return PLUGIN_HANDLED;
}
After you spawn, go somewhere else. Then type "telly" in console.