From 82b53ca356a37b541893ee18a6341b9b9e7e51c7 Mon Sep 17 00:00:00 2001 From: Cloudy <36423427+meCloudy@users.noreply.github.com> Date: Sat, 1 Jun 2019 19:08:09 +0300 Subject: [PATCH] Auto respawn people in event after death People now won't bother /join'ing every time they're killed in the event, they'll spawn in the event till they leave using /leave --- gamemodes/sf-cnr.pwn | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/gamemodes/sf-cnr.pwn b/gamemodes/sf-cnr.pwn index 693b46c..3de72d3 100644 --- a/gamemodes/sf-cnr.pwn +++ b/gamemodes/sf-cnr.pwn @@ -727,7 +727,19 @@ public OnPlayerSpawn( playerid ) SpawnToPaintball( playerid, p_PaintBallArena{ playerid } ); return 1; } - + + #if defined __cloudy_event_system + else if ( IsPlayerInEvent( playerid ) ) + { + if( ! EventSettingAllow( 0 ) && g_eventData[ EV_STARTED ] ) + { + SetPlayerInEvent( playerid ); // respawns player in event. + return 1; + } + else RemovePlayerFromEvent( playerid, true ); // changes the InEvent variable to false. + } + #endif + if ( p_Class[ playerid ] == CLASS_CIVILIAN ) { if ( !p_JobSet{ playerid } )