I did this code to spectate the attacker after the victim death, it works, but the victim can respawn juste after he get killed, is there a way to make the victim not able to respawn after something like 2 seconds ? I put code in init.lua in my gamemode
[CODE]function GM:PlayerDeath( victim, inflictor, attacker )
if ( victim == attacker ) then
PrintMessage( HUD_PRINTTALK, victim:Name() .. " committed suicide." )
else
PrintMessage( HUD_PRINTTALK, victim:Name() .. " get killed." )
victim:Spectate( OBS_MODE_CHASE )
end
end[/CODE]
[QUOTE=txike;52619001][img]http://wiki.garrysmod.com/favicon.ico[/img] [url=http://wiki.garrysmod.com/page/GM/PlayerDeathThink]GM:PlayerDeathThink[/url][/QUOTE]
Thanks for your help
Sorry, you need to Log In to post a reply to this thread.