Checkpoints Help!
#1

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
Reply
#2

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?
Reply
#3

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.....
Reply
#4

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


Forum Jump:


Users browsing this thread: 2 Guest(s)