Quote:
|
Originally Posted by johnjg75
Code:
#include <amxmodx>
#include <amxmisc>
#include <fun>
public plugin_init()
{
register_plugin("Respawn","1.0","Johnjg75")
register_concmd("amx_respawn","dorespawn",ADMIN_SLAY," <player> - Respawns a player")
}
public dorespawn(id)
{
new pplayer[33]
read_argv(1,pplayer, 32)
new iindex = get_user_index( pplayer )
if(!is_user_alive( iindex ))
spawn(iindex)
return PLUGIN_HANDLED
}
Not sure if it works but you can try it
|
That will not work. You either have to do 2 set_tasks and each one use spawn and then give them their weapons and suit, or do cs_user_spawn(iindex).
A fixed version would look like this:
Code:
#include <amxmodx>
#include <amxmisc>
#include <cstrike>
public plugin_init()
{
register_plugin("Respawn","1.0","Johnjg75")
register_concmd("amx_respawn","dorespawn",ADMIN_SLAY," <player> - Respawns a player")
}
public dorespawn(id,level,cid)
{
if(!cmd_access(id,level,cid,2))
return PLUGIN_HANDLED
new pplayer[33]
read_argv(1,pplayer, 32)
new iindex = get_user_index( pplayer )
if(!is_user_alive( iindex ))
cs_user_spawn(iindex)
return PLUGIN_HANDLED
}
__________________