pls help me (chekpoint)
#1

hello here is it iam a new scripter lets say it a noob and i need ur help (detailed tutorial pls) for how to creat a chekpoint cuz i need to add a ammu nation and houses to my server , and pls if u can give a pic of the script too cuz iam not very good , finally if u need my msn ask me for , i will give it to u
Reply
#2

so no body can help me ?
Reply
#3

It seems that what you need is not to create a checkpoint, which you use SetPlayerCheckpoint for.
Well, to use these all you need is to create a new array at the beggining of your gamemode, just like:

pawn Код:
new CheckpointStatus[MAX_PLAYERS];
Then you use the function SetPlayerCheckpoint in whatever coordinates you want it to be:

[pawn]SetPlayerCheckpoint(playerid, X,Y,Z, size)
//CheckpointStatus[playerid]=1; Do this if you want this checkpoint to do some special action when you enter it such as teleporting your player,giving him money/guns, whatever you want to script later.
[/pawm]

Then you go under the callback OnPlayerEnterCheckpoint(playerid) and use it like this:

pawn Код:
OnPlayerEnterCheckpoint(playerid)
{
    switch(CheckpointStatus[playerid])
    {
        case 0: DisablePlayerCheckpoint(playerid); //Nothing happens and the checkpoint disappears.
        case 1:
        {
             //Write here whatever code you want. This is what will happen if the CheckpointStatus is 1 and the player enters a checkpoint.
        }
    }
    return 1;
}
About creating checkpoints for the entrance of shops and stuff, well for that you would need a streamer. I recommend Incognito's Streamer. After that you just add checkpoints in OnGameModeInit and use the callback given in the streamer
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)