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_IsPlayerInCehckpoint(playerid, cp1)) //s� mudar a var�vel do CP
- {
- //voce est� no cp1
- } else {
- //voc� n�o est� no cp 1, e n�o pode usar este comando
- }
- return 1;
- }
Add Comment
Please, Sign In to add comment