how can i make checkpoint at the end of my bike parkour?
#1

i want to make a checkpoint at the end of my bike parkour map.. i want to create tht cheakpoint in world 5 and whenever player teleport at that checkpoint in world 0 so show them error like "you have cheated"

OnPlayerEnterCheckpoint give them $50000 + 5 score and set player world to 0


please help me!!

+rep for helping me
Reply
#2

No reply pls help me
Reply
#3

Checkpoints are only visible to the player therefor

You got two options

- Disable the teleport command if the player is in the parkour (player needs to finish the parkour)
- Cancel the parkour if he uses the teleport command (recommended - player can abort it anytime)

Checking inside the checkpoint if the world has changed isn't a good idea because the player could teleport anywhere and the checkpoint would stay

Some other things

- We are able to read normal letters fine, no need to use bigger bold letters or even colored ones
- If you add something with +rep, noone cares / you get ignored, just leave it away
- No Double Posting within at least 24 hours - Forum Rules
Reply
#4

sorry for that but now i can't understand this forum language .. and pls show me the codes .. it will be great for me
Reply
#5

Well you got an command or any event that triggers the bike parkour there you place your checkpoint

That is pretty much the idea, you will need to adjust / fit the code inside your mode
pawn Код:
// in your command / event code
SetPlayerVirtualWorld(playerid, 5); // set the virtual world of the player who starts the parkour to 5
SetPlayerCheckpoint(playerid, YOUR_X_COORD, YOUR_Y, YOUR_Z); // set the checkpoint
// and you already should have / need something to mark that the player is in the parkour
gIsPlayerInParkour[playerid] = true; // I don't know how your variable is called so I chose a pseudo name

// in OnPlayerEnterCheckpoint
if(gIsPlayerInParkour[playerid])
{
    DisablePlayerCheckpoint(playerid); // disables the checkpoint
    gIsPlayerInParkour[playerid] = false; // flags that the player isn't anymore in the parkour
    GivePlayerMoney(playerid, 50000); // gives the player 50000 dollar
    SetPlayerScore(playerid, GetPlayerScore(playerid) + 5); // add 5 score to the player
    SetPlayerVirtualWorld(playerid, 0); // set the world to 0 again
    SendClientMessage(playerid, -1, "You finished the parkour, + $50000 + 5 score!");
    return true;
}

// in the teleport command if the player wants to skip the race
if(gIsPlayerInParkour[playerid])
{
    DisablePlayerCheckpoint(playerid);
    gIsPlayerInParkour[playerid] = false;
    SetPlayerVirtualWorld(playerid, 0);
    SendClientMessage(playerid, -1, "You left the parkour, no refund!");
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)