Checkpoints twice
#1

So im making my own truck job from scratch and i`ve made 4 destinations.
a player can choose from a dialog one of the 4 destinations.
The problem is,when a player enters a checkpoint,i want him to be able to choose the other 3 destinations,so he can`t choose the same destination and go all over again the same checkpoints.
I was thinking about making a variable like PlayerData[playerid][TruckCPnumber] and set it to 1-2-3-4 and check at OnDialogResponse if he`s number is 1,he can`t choose the number 1 etc.

is there any more efficient way?
Reply
#2

I could make a variable systems for that with 2 different conditions, for example.
new TruckInfo[MAX_PLAYERS][4];
when the player selects one of these destinations, I could change the variable, for example TruckInfo[playerid][0] = 1 and when he reaches the destination, we have a another 3 variables left for action.
we'll simply check the TruckInfo[playerid][0] variable and i if it's 1, than player already been here.
than we'll simply change the next variable in next dialog, TruckInfo[playerid][1] = 1; and etc.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)