[HELP]How to stop the cases after player enter that checkpoint
#1

Hey , all i made a random mission with random cp's , i made a stock for the random checkpoints , and ,made cases there i made 8 case

can anyone say me how can i make like this , if a player enters the cp of case 7 , then he will not get that cp again , the different cp will come.. Please suggest me what to do
Reply
#2

Example:
pawn Код:
new bool:CPUsed[MAX_PLAYERS][8];

// Selecting a new checkpoint
new target = -1;
for(new i = 0; i < 8; i++)
{
    if(CPUsed[playerid][i]) continue; // CP has been used before
    target = i; // Assigns the first free CP
    break; // End the loop
}
if(target == -1) target = random(8); // If all CPs have been used, select a random one
And when you use a checkpoint, you set the variable to true. All variables should be reset to false when the player connects and/or disconnects.

Mind if I see your code for the random checkpoints? I might be able to make the job easier and implement the code myself.
Reply
#3

I sended you the code check it
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)