Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <a_samp>
- new checkpoint[MAX_PLAYERS];
- new checkpointr[MAX_PLAYERS];
- forward OnPlayerEnterCheckpointEx(playerid, checkid);
- forward OnPlayerLeaveCheckpointEx(playerid, checkid);
- forward OnPlayerEnterRaceCheckpointEx(playerid, checkid);
- forward OnPlayerLeaveRaceCheckpointEx(playerid, checkid);
- public OnPlayerEnterCheckpoint(playerid)
- {
- CallLocalFunction("OnPlayerEnterCheckpointEx", "ii", playerid, checkpoint[playerid]);
- return 1;
- }
- public OnPlayerLeaveCheckpoint(playerid)
- {
- CallLocalFunction("OnPlayerLeaveCheckpointEx", "ii", playerid, checkpoint[playerid]);
- return 1;
- }
- public OnPlayerEnterRaceCheckpoint(playerid)
- {
- CallLocalFunction("OnPlayerEnterRaceCheckpointEx", "ii", playerid, checkpointr[playerid]);
- return 1;
- }
- public OnPlayerLeaveRaceCheckpoint(playerid)
- {
- CallLocalFunction("OnPlayerLeaveRaceCheckpointEx", "ii", playerid, checkpointr[playerid]);
- return 1;
- }
- //Ezek alatt az eljárások alatt dolgozol a CP-vel:
- public OnPlayerEnterCheckpointEx(playerid, checkid)
- {
- return 1;
- }
- public OnPlayerLeaveCheckpointEx(playerid, checkid)
- {
- return 1;
- }
- public OnPlayerEnterRaceCheckpointEx(playerid, checkid)
- {
- return 1;
- }
- public OnPlayerLeaveRaceCheckpointEx(playerid, checkid)
- {
- return 1;
- }
- //És Ezekkel a funkciókkal állítod be azokat és kapcsolod ki:
- stock SetPlayerCheckpointEx(playerid, Float:x, Float:y, Float:z, Float:size, id)
- {
- checkpoint[playerid] = id;
- SetPlayerCheckpoint(playerid, x, y, z, size);
- }
- stock SetPlayerRaceCheckpointEx(playerid, Float:x, Float:y, Float:z, Float:size, Float:nx, Float:ny, Float:nz, id)
- {
- checkpointr[playerid] = id;
- SetPlayerRaceCheckpoint(playerid, x, y, z, nx, ny, nz, size);
- }
- stock DiasblePlayerCheckpointEx(playerid)
- {
- checkpoint[playerid] = 0;
- DisablePlayerCheckpoint(playerid);
- }
- stock DiasblePlayerRaceCheckpointEx(playerid)
- {
- checkpoint[playerid] = 0;
- DisablePlayerRaceCheckpoint(playerid);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement