Posts: 39
Threads: 3
Joined: Aug 2007
Reputation:
0
I need help cos on wiki it only said on player spawn but what i wants:
- if playertopoint they can do /race (at arena or simila)
- setcheckpoint an when they get there anoter chekpoint another and so on
- plese help
thanks you.
Posts: 39
Threads: 3
Joined: Aug 2007
Reputation:
0
Yes but how i do onplayerenter how i make new chekpoin?
Posts: 64
Threads: 3
Joined: Nov 2007
Reputation:
0
new CheckPoint[5]; // 5 checkpoints, can change to more / less
Then, when ever you want to set first check point, do
CheckPoint[0] = SetPlayerCheckPoint(...); // or set race check point
Then,
public OnPlayerEnterCheckpoint(playerid) // or enter race check point
{
if(IsPlayerInCheckPoint(playerid) == CheckPoint[0])
{
CheckPoint[1] = SetPlayerCheckPoint(...);
}
if(IsPlayerInCheckPoint(playerid == CheckPoint[1)
{
Check point 2 = set check point number 3
}
and so on..
}
Posts: 1,938
Threads: 16
Joined: Feb 2007
Reputation:
0
If you want to LEARN it, you should look up 'cases' (from the switch) and Arrays.
if you just want to copy it, you can modify Seif's code to your likings.