SA-MP Forums Archive
Mission Checkpoints spam :D ??? - 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: Mission Checkpoints spam :D ??? (/showthread.php?tid=245705)



Mission Checkpoints spam :D ??? - duckie - 01.04.2011

Hello,
i've got a little problem here.

pawn Код:
if (strcmp("/work", cmdtext, true, 10) == 0)
    {
        SetPlayerCheckpoint(playerid, 479.87573242188, 882.62823486328, -31.468822479248, 4.0);
        SendClientMessage(playerid,COLOR_YELLOW,"Go to the checkpoint to load.");
        return 1;
    }
and:

pawn Код:
public OnPlayerEnterCheckpoint(playerid)
{
    DisablePlayerCheckpoint(playerid);
    SetPlayerCheckpoint(playerid, 693.90051269531, 843.71759033203, -27.879653930664, 4.0);
    SendClientMessage(playerid,COLOR_BLUE,"Go to the next checkpoint to unload.");
    GivePlayerMoney(playerid, 1000);
    return 1;
}
so i wanna make that if someon types /work a checkpoint appear(works fine)
and if he rides into the checkpoint another checkpoint appears.
and then he get $1000 and the checkpoint disappears
But if he go into that other checkpoint it just appears again and again and again and it spams.

can someone help me? thanks


Re: Mission Checkpoints spam :D ??? - swieberdevos - 01.04.2011

It's pretty obvious.. Everytime he enters the checkpoint it sets the same checkpoint as his current checkpoint..


Re: Mission Checkpoints spam :D ??? - duckie - 01.04.2011

but how do i make it an other checkpoint then?


Re: Mission Checkpoints spam :D ??? - Jochemd - 01.04.2011

You have to use arrays, which you set to another value each time you set a checkpoint. Take a look at my filterscript (look my signature).


Re: Mission Checkpoints spam :D ??? - duckie - 01.04.2011

haha bedankt voor je filterscript.
Ik ben ook nederlands :P