27.01.2018, 13:07
You can also create some kind of pickup where a player can go on and off duty.
When the player goes on duty, set an array to 1 for example.
You can then loop trough players and send a message to whoever is on fire fighter duty.
So whenever a player goes on fire duty, this is what you need to do with the value of the array.
And when the player turns off the duty
When the player goes on duty, set an array to 1 for example.
You can then loop trough players and send a message to whoever is on fire fighter duty.
PHP код:
new FireFighterDuty[MAX_PLAYERS];
for(new i=0; i<GetMaxPlayers(); i++)
{
if(FireFighterDuty[i] == 1)
{
SetPlayerCheckpoint(i, 0 ,0 ,0 , 1);
SendClientMessage(i, -1, "A fire has been reported! A waypoint has been set on your map.");
}
}
PHP код:
FireFighterDuty[playerid] = 1;
PHP код:
FireFighterDuty[playerid] = 0;