Mission System - 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: Mission System (
/showthread.php?tid=474252)
Mission System -
AnonScripter - 07.11.2013
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.
Re: Mission System -
Beckett - 07.11.2013
SetPlayerCheckpoint
OnPlayerEnterCheckpoint
IsPlayerInRangeOfPoint(optional)
For more information and knowledge read scripting basics.
Re: Mission System -
AnonScripter - 07.11.2013
i'm not that noob -.-
i know all these things, i just asked how to put random checkpoint.
Re: Mission System -
Zex Tan - 07.11.2013
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 -.-)
Re: Mission System -
AnonScripter - 07.11.2013
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..)
AW: Mission System -
Nero_3D - 07.11.2013
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
Re: Mission System -
Lajko1 - 07.11.2013
Coordinates of checkpoint