PHP Code:
public Cmd_Respawn( id )
{
if( !get_pcvar_num( p_On ) )
{
client_print( id, print_chat, "Manual Respawn is off!" );
return PLUGIN_HANDLED;
}
new limit;
if( ++g_iRespawnCount[ id ] > ( limit = get_pcvar_num( p_Limit ) ) )
{
client_print( id, print_chat, "You have respawned yourself too much. Wait to new round." );
return PLUGIN_HANDLED;
}
if( !is_user_alive( id ) )
{
new name[32]
get_user_name(id,name,31)
ExecuteHamB( Ham_CS_RoundRespawn, id );
client_print( id, print_chat, "%s use Manual Respawn.%d respawn left.", ( name,limit - g_iRespawnCount[ id ] ) );
give_item(id,"weapon_mp5navy")
give_item(id,"ammo_9mm")
give_item(id,"ammo_9mm")
return PLUGIN_CONTINUE;
} else {
client_print( id, print_chat, "You must be dead to acces Manual Respawn." );
return PLUGIN_CONTINUE;
}
return PLUGIN_CONTINUE;
}
__________________