Guest User

Untitled

a guest
Dec 31st, 2018
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.66 KB | None | 0 0
  1. new playerCheckpoint[MAX_PLAYERS],
  2. playerCheckpointID[MAX_PLAYERS];
  3.  
  4. enum checkpointInfoEnum {
  5. Float:Position[3],
  6. CheckpointText[126]
  7. };
  8.  
  9. new const checkpointInfo[][checkpointInfoEnum] = {
  10. {-3961.1807, -1690.8093, 4.7548, "Tekstas ant pirmojo cp..."},
  11. {-3988.7224, -1690.4630, 4.7548, "Tekstas afsaf.."},
  12. {-4015.1846, -1706.1989, 4.7548, "Tekstas .fsaf."},
  13. {-3987.6333, -1754.9879, 4.7548, "Tekstas asfaf.."},
  14. {-4002.5193, -1728.8728, 4.7548, "Tekstas .."},
  15. {-4027.2124, -1755.3657, 4.7548, "Tekstassfaf .."},
  16. {-4037.5356, -1738.5569, 4.7548, "Tekstas .."},
  17. {-4044.6663, -1719.3889, 4.7548, "Tekstasfsa .."},
  18. {-4047.2515, -1706.6924, 4.7548, "Tekstas .."},
  19. {-4083.8899, -1748.0616, 4.7548, "Tekstas .."},
  20. {-3943.4216, -1767.1538, 4.7548, "Tekstas .."}
  21. };
  22.  
  23. public OnPlayerEnterDynamicCP(playerid, checkpointid) {
  24. if (checkpointid == playerCheckpoint[playerid]) {
  25. if (playerCheckpointID[playerid] >= (sizeof(checkpointInfo) - 1)) {
  26. // Uzlipo ant paskutinio checkpointo
  27. } else {
  28. DisablePlayerCheckpoint(playerid);
  29. DestroyDynamicCP(playerCheckpoint[playerid]);
  30. playerCheckpoint[playerid]++;
  31.  
  32. new const cpID = playerCheckpoint[playerid];
  33. playerCheckpoint[playerid] = CreateDynamicCP(checkpointInfo[cpID][Position][0], checkpointInfo[cpID][Position][1], checkpointInfo[cpID][Position][2], 1, -1, -1, playerid, 100);
  34.  
  35. new dialogTitle[25];
  36. format(dialogTitle, sizeof dialogTitle, "%d / %d", playerCheckpoint[playerid], sizeof(checkpointInfo));
  37. ShowPlayerDialog(playerid, DIALOG_LOREMIPSUM, DIALOG_STYLE_MSGBOX, dialogTitle, checkpointInfo[cpID][CheckpointText], "Supratau", "");
  38. }
  39. return 1;
  40. }
  41. return 1;
  42. }
Advertisement
Add Comment
Please, Sign In to add comment