SA-MP Forums Archive
Checkpoints Help! - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Checkpoints Help! (/showthread.php?tid=67354)



Checkpoints Help! - StrickenKid - 28.02.2009

ok, so im making a rob script and i want to make it so you can rob when your in a certain checkpoint. IF i just do IsPlayerInAnyCheckpoint.... it will do it if the player is in any checkpoint, but i need somehow to have each checkpoint different, and also if the player leaves the checkpoint the rob cancels.

BTW im using CPS!

Thanks


Re: Checkpoints Help! - brett7 - 28.02.2009

new timer; at top
pawn Код:
public OnPlayerEnterCheckpoint(playerid)
{
    timer = SetTimer("rob", 1500, 0);

   
    return 1;
}
pawn Код:
public OnPlayerLeaveCheckpoint(playerid)
{
    KillTimer(rob);
    return 1;
}
pawn Код:
public rob(playerid)
{
    GivePlayerMoney(playerid, 1000);
    return 1;
}
im not sure how good that is because it hasnt been tested and im sure there is problems but that is the basic idea, you seem to be making alot of topics about cops and robbers scripts maybe we will make the whole thing for you?


Re: Checkpoints Help! - StrickenKid - 28.02.2009

but, anyone can go in another checkpoint i have set for something else and rob from there, what i want to do is like be able to make it so they can rob in ONLY THAT checkpoint...

like... do something like assign THAT checkpoint a an id or name for example:
"caligulasrob" or 1

then when they rob

it checks if the person is IN and ONLY in "caligulasrob" or 1
get what im saying.....


Re: Checkpoints Help! - brett7 - 28.02.2009

pawn Код:
if(streamid == caligulas)
{
   GivePlayerMoney(playerid, 1000);
}
or what ever you like