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
This commit is contained in:
Cloudy 2019-06-01 19:08:09 +03:00 committed by GitHub
parent 3d28606771
commit 82b53ca356
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -728,6 +728,18 @@ public OnPlayerSpawn( 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 } )