SA-MP Forums Archive
Start a mission near a player - 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: Start a mission near a player (/showthread.php?tid=353836)



Start a mission near a player - tyler12 - 24.06.2012

How can i start a players mission from the nearest load point to him

pawn Код:
x = ArticTrailer[MisRand][LoadX];
            y = ArticTrailer[MisRand][LoadY];
            z = ArticTrailer[MisRand][L[REMOVEDoadZ];
I really dont know where to start :S Any help would be appreciated.


Re: Start a mission near a player - TheArcher - 24.06.2012

Take a look here

Btw e.g

pawn Код:
// under a callback or somewhere to call it
    if(IsPlayerInRangeOfPoint(playerid, 5.0, x,y,z)) // playerid - player which calls it, 5.0 - range point to activate in your case the mission, x,y,z floats saved as variable from you which gives the coordinates to execute the function.
    {
        //code
    }