CheckPoint
#1

hi to all, how can i do if i have a CheckPoint On to give a message like: You have already a checkpoint active , when i try to have another checkpoint like a have a sweeper job and place me checkpoints and if i type: /jobs taxi it place me a mark close to sweeper job and i get money like i did the mission.
Reply
#2

When you set the player's checkpoint make a global array.

pawn Код:
new bool:CP_Active[MAX_PLAYERS];

// When you set the checkpoint

CP_Active[playerid] = true;

// When you remove the checkpoint.

CP_Active[playerid] = false;

// When you want to check if player has an active checkpoint but tries to show another one
if(CP_Active[playerid] == true)
{
// code here
}

// Don't forget to reset it after disconnection
CP_Active[playerid] = false; // under OnPlayerDisconnect.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)