View Single Post
bhunji
AlliedModders Donor
Join Date: Aug 2005
Old 11-14-2013 , 13:05   Re: [NMRiH] Everyone Respawns
Reply With Quote #6

Here is some limit cvar about respawn with cheat flag.
tested v1.07

sm_cvar mp_disable_respawn_times 0
//: 0 : , "sv", "nf", "rep" :
sm_cvar mp_enableroundwaittime 1
//: 1 : , "sv", "rep" : Enable timers to wait between rounds.
sm_cvar mp_forcerespawn 1
//: 1 : , "sv", "nf" :
//mp_forcerespawnplayers : cmd : : Force all players to respawn. this need sv_cheats 1.......
sm_cvar mp_waitingforplayers_restart 0
//: 0 : , "sv" : Set to 1 to start or restart the WaitingForPlayers period.
sm_cvar mp_waitingforplayers_time 1
//: 0 : , "sv" : WaitingForPlayers time length in seconds
sm_cvar sv_spawn_grace 1
//: 180 : , "sv", "rep" : Time after a round starts in which players are allowed to spawn
sm_cvar sv_spawn_grace_objectivecount 999
//: 2 : , "sv", "cheat", "rep" : Number of objectives completed after which players cannot respawn.
sm_cvar sv_first_aid_heal_amt 100
//: 30 : , "sv", "cheat", "rep" : Amount of health a first aid kit heals.
sm_cvar sv_kills_per_token 1
//: 20 : , "sv", "rep" : Number of zombie kills per respawn token (extinction mode)

use sm_cvar to force value change , no necessary sv_cheats 1.
it's a way to get revive working on NMO map.
but still need to reconnect........
if want a advanced respawn,may create some respawn point and connect to objective.
because i can't find respawn function to revive immediately by now.


Edited....
Other way is find entity classname of info_player_nmrih and using AcceptEntityInput , Like this (Some code from SMLIB)
Code:
new entity = -1
if((entity = Entity_FindByClassName(entity, "info_player_nmrih")) != INVALID_ENT_REFERENCE){
        AcceptEntityInput(entity, "RespawnPlayers", -1, -1, 0);
}
As long as an info_player_nmrih enable (InputEnable) ,people almost revive immediately ,but sometimes not.
when there is no enabled info_player_nmrih to revive , it's closed by objective (InputDisable)
i got that input name from decompile nmo maps.
RespawnPlayers is always repawn everyone,change player team to 1 (SDK Spectator) will avoid respawn.

Last edited by bhunji; 11-17-2013 at 22:16.
bhunji is offline