SA-MP Forums Archive
Random Point A to Point B missions - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Random Point A to Point B missions (/showthread.php?tid=279972)



Random Point A to Point B missions - Zonoya - 29.08.2011

hello guys as the topic says i need some help making Random Point A to Point B Missions i have no idea how to do this so i need someone to point me in the right direction not make it or anything just make a example please so i can learn from it thanks if u help me

(P.S. I Will Give Rep To The Person Who helps)

Regards

[Nuclear]Phoebe


Re: Random Point A to Point B missions - PrawkC - 29.08.2011

pawn Код:
stock RandomMission(playerid)
{
    new mission = random(1);
    switch(mission)
    {
        case 0:
        case 1:
    }
}



Re: Random Point A to Point B missions - Zonoya - 29.08.2011

hmm how would i make lots of mission locations for point a to point b like one goes from GFAB to A69 then one goes from LVAP to LS?


Re: Random Point A to Point B missions - =WoR=Varth - 30.08.2011

do /save inside samp. The cooddinate saved in your samp user file.
https://sampwiki.blast.hk/wiki/Function:SetPlayerCheckpoint


Re: Random Point A to Point B missions - Zonoya - 30.08.2011

Didn't u read i need RANDOM not one mission


Re: Random Point A to Point B missions - Michael@Belgium - 30.08.2011

Lol i don't fully understand but about what PrawC said:

pawn Код:
stock RandomMission(playerid)
{
    new mission = random(x); //x = how many missions ?
    switch(mission)
    {
        case 0:
        case 1:
        case 2:
        //untill case x-1
    }
}
You need something like that ?


Re: Random Point A to Point B missions - Zonoya - 30.08.2011

i dont get u how would it work tho i need random point a to point b that is not the same Cord


Re: Random Point A to Point B missions - =WoR=Varth - 30.08.2011

You are the most brilliant.
pawn Код:
switch(random(3))
{
    case 0: SetPlayerCheckpoint(..........
    case 1: blahblahblah
    case 2: and so on
}



Re: Random Point A to Point B missions - Zonoya - 30.08.2011

but wouldn't that give the chance of the point being the same?

edit: and if it did work how would i get the checkpoints to work? like another spawns once u enter one and how would i set them up


Re: Random Point A to Point B missions - =WoR=Varth - 30.08.2011

It's random. You know random?
Checkpoint:https://sampwiki.blast.hk/wiki/Function:SetPlayerCheckpoint