SA-MP Forums Archive
Normal and dynamic chekpoints - 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: Normal and dynamic chekpoints (/showthread.php?tid=487082)



Normal and dynamic chekpoints - dusk - 11.01.2014

Hello, it seems that when I enter a dynamic CP(any one of them) code in the normal OnPlayerEnterCheckpoint is executed aswell. Why is that happening?

For example, this code:
pawn Код:
if(checkpointid == LumberDropSiteCP)
    {
        if(get.IsCarryingWood[playerid])
        {
            new str[40];
            ApplyAnimation(playerid,"CARRY","PUTDWN",4.1,0,1,1,0,1000,1);
            RemovePlayerAttachedObject(playerid,3);
            SetPlayerSpecialAction(playerid,SPECIAL_ACTION_NONE);
            set.IsCarryingWood[playerid]=false;
            new money = random(7)+5;
            GivePlayerMoneyB(playerid,money);
            format(str,sizeof(str),"Uћ medienos atgabenima gavote %d LT",money);
            SendClientMessage(playerid,INFO_COLOR, str);
            return 1;
        }
        else ErrorMessageForPlayer(playerid,RED,"Jūs turite turėti medienos rankose!");
    }
The text is sent and it return 1. But then I get some text from normal checkpoints(no normal checkpoints were set).


Re: Normal and dynamic chekpoints - Hansrutger - 11.01.2014

In programming, if everything works just fine, don't question it. Just smile and nod; smile and nod...

However, I do not really understand your problem. What text do you get from "normal checkpoints"?


Re: Normal and dynamic chekpoints - dusk - 11.01.2014

Well the text is "you found your car"...
But the point is that code is excecuted like if I picked up a normal checkpoint, although it was a dynamic one.