Mission System
#1

can anyone tell me how to do mission system ? somebody give me a tutorial please.
example:
/mission will set random checkpoint and when we go to it, it gives money.

if there is no tutorial, give me an idea how to make random checkpoints.
Reply
#2

SetPlayerCheckpoint
OnPlayerEnterCheckpoint
IsPlayerInRangeOfPoint(optional)
For more information and knowledge read scripting basics.
Reply
#3

i'm not that noob -.-
i know all these things, i just asked how to put random checkpoint.
Reply
#4

Gawd, if you're not a noob then why not create random checkpoints yourself?

First, find a tutorial with random spawns
Secord, the coordinates are also able to create random checkpoints.

(sorry for being rude, not in a mood today -.-)
Reply
#5

Quote:
Originally Posted by Zex Tan
Посмотреть сообщение
Gawd, if you're not a noob then why not create random checkpoints yourself?

First, find a tutorial with random spawns
Secord, the coordinates are also able to create random checkpoints.

(sorry for being rude, not in a mood today -.-)
i know how to script random checkpoints, but i don't know what to put in..
pawn Код:
SetPlayerCheckpoint(playerid, ..what to put here..)
Reply
#6

That would be one way using arrays
pawn Код:
CreateRandomMissionCheckpoint(playerid, Float: size) {
    static const
        Float: sData[][] = {
            {0.0, 1.0, 2.0},
            {3.0, 4.0, 5.0}
    };
    new
        rand = random(sizeof sData)
    ;
    if(SetPlayerCheckpoint(playerid, sData[rand][0], sData[rand][1], sData[rand][2], size)) {
        return rand;
    }
    return -1;
}
The other way would be using a switch statment and putting the cordinates in SetPlayerCheckpoint directly
Reply
#7

Coordinates of checkpoint
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)