17.08.2010, 16:37
at the top of your script:
then for the command to start:
then to get the checkpoints and continue with the route:
You can continue with the "else if(state[playerid] == x)" as far as you want... just increase the number by 1 always and at your last checkpoint do this:
instead of the SetPlayerCheckpoint and the state[playerid]++, otherwise you won't be able to use the command again, later![Cheesy](images/smilies/biggrin.png)
oh.. and btw.. I don't need a mapper
..
if you have anymore questions related to this just send me a pm
Код:
new state[MAX_PLAYERS];
Код:
public OnPlayerCommandText(playerid, cmdtext[]) { if (strcmp("/startroute", cmdtext, true, 10) == 0) { if(state[playerid] = 0){ SetPlayerCheckpoint(playerid, x, y, z, 5.00); //replace x, y, z with the coordinates of the 1. route point state[playerid] = 1; return 1; } } return 0; }
Код:
public OnPlayerEnterCheckpoint(playerid) { if(state[playerid] == 1){ SetPlayerCheckpoint(playerid, x, y, z, 5.00); //replace x, y, z with the coordinates of the 2. route point state[playerid]++; }else if(state[playerid] == 2){ SetPlayerCheckpoint(playerid, x, y, z, 5.00); //replace x, y, z with the coordinates of the 3. route point state[playerid]++; }else if(state[playerid] == 3){ SetPlayerCheckpoint(playerid, x, y, z, 5.00); //replace x, y, z with the coordinates of the 4. route point state[playerid]++; } return 1; }
Код:
DisablePlayerCheckpoint(playerid); state[playerid] = 0;
![Cheesy](images/smilies/biggrin.png)
oh.. and btw.. I don't need a mapper
![Cheesy](images/smilies/biggrin.png)
if you have anymore questions related to this just send me a pm