Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- new playerCheckpoint[MAX_PLAYERS],
- playerCheckpointID[MAX_PLAYERS];
- enum checkpointInfoEnum {
- Float:Position[3],
- CheckpointText[126]
- };
- new const checkpointInfo[][checkpointInfoEnum] = {
- {-3961.1807, -1690.8093, 4.7548, "Tekstas ant pirmojo cp..."},
- {-3988.7224, -1690.4630, 4.7548, "Tekstas afsaf.."},
- {-4015.1846, -1706.1989, 4.7548, "Tekstas .fsaf."},
- {-3987.6333, -1754.9879, 4.7548, "Tekstas asfaf.."},
- {-4002.5193, -1728.8728, 4.7548, "Tekstas .."},
- {-4027.2124, -1755.3657, 4.7548, "Tekstassfaf .."},
- {-4037.5356, -1738.5569, 4.7548, "Tekstas .."},
- {-4044.6663, -1719.3889, 4.7548, "Tekstasfsa .."},
- {-4047.2515, -1706.6924, 4.7548, "Tekstas .."},
- {-4083.8899, -1748.0616, 4.7548, "Tekstas .."},
- {-3943.4216, -1767.1538, 4.7548, "Tekstas .."}
- };
- public OnPlayerEnterDynamicCP(playerid, checkpointid) {
- if (checkpointid == playerCheckpoint[playerid]) {
- if (playerCheckpointID[playerid] >= (sizeof(checkpointInfo) - 1)) {
- // Uzlipo ant paskutinio checkpointo
- } else {
- DisablePlayerCheckpoint(playerid);
- DestroyDynamicCP(playerCheckpoint[playerid]);
- playerCheckpoint[playerid]++;
- new const cpID = playerCheckpoint[playerid];
- playerCheckpoint[playerid] = CreateDynamicCP(checkpointInfo[cpID][Position][0], checkpointInfo[cpID][Position][1], checkpointInfo[cpID][Position][2], 1, -1, -1, playerid, 100);
- new dialogTitle[25];
- format(dialogTitle, sizeof dialogTitle, "%d / %d", playerCheckpoint[playerid], sizeof(checkpointInfo));
- ShowPlayerDialog(playerid, DIALOG_LOREMIPSUM, DIALOG_STYLE_MSGBOX, dialogTitle, checkpointInfo[cpID][CheckpointText], "Supratau", "");
- }
- return 1;
- }
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment