Normal and dynamic chekpoints
#1

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

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

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


Forum Jump:


Users browsing this thread: 1 Guest(s)