Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- new CPTimeVar[MAX_PLAYERS];
- new NextCPTimer[MAX_PLAYERS];
- forward NextCP(playerid);
- public NextCP(playerid)
- {
- new str[5];
- format(str, sizeof(str), "~r~%d", CPTimeVar[playerid]);
- GameTextForPlayer(playerid, str, 1000, 6);
- if(CPTimeVar == 30) SetPlayerCheckPoint//add the cp coords here
- if(CPTimeVar > 30)
- {
- KillTimer(NextCPTimer[playerid]);
- CPTimeVar[playerid] = 0;
- TogglePlayerControllable(playerid, 1);
- }
- return 1;
- }
- public OnPlayerEnterCheckpoint(playerid)
- {
- TogglePlayerControllable(playerid, 0);
- DisablePlayerCheckpoint(playerid);
- SetTimerEx("NextCP", 1000, true, "i", playerid);
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement