Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //no topo:
- new cp1;
- new cp2;
- //no OnGameModeInit:
- cp1 = CPS_AddCheckpoint(x, y, z, 3.0, 40);
- cp2 = CPS_AddCheckpoint(x, y, z, 3.0, 40);
- //no OnPlayerEnterCheckpoint:
- new checkpointid = CPS_GetPlayerCheckpoint(playerid);
- if(checkpointid == cp1)
- {
- //vc entrou on CP 1...
- }
- if(checkpointid == cp2)
- {
- //vc entrou no CP 2...
- }
- //só isso...
- //ai pra comando:
- if(!strcmp(cmdtext, "/comando", true))
- {
- if(CPS_IsPlayerInCheckpoint(playerid, cp1)) //só mudar a variavel do CP
- {
- //voce está no cp1
- } else {
- //você não está no cp 1, e não pode usar este comando
- }
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment