Checkpoint isnt responding
#1

Hello
i made a few checkpoints and i made a command that is /robshop but
when i use it nothing happends and i setted it to the command too
and there is no errors in pawno

Here is my code:
pawn Код:
CMD:robshop(playerid,params[])
{
    if(IsPlayerInDynamicCP(playerid,2))
    {
       SendClientMessage(playerid,COLOR_BLUE,"You have robbed 24/7 shop your wanted level is increased!");
       GivePlayerMoney(playerid,2000);
       IncreaseWantedLevel(playerid,4);
       return 1;
    }
    return 1;
}
CheckPoints:
pawn Код:
public OnPlayerEnterDynamicCP(playerid, checkpointid)
{
    if(checkpointid == Checkpoint[0])
    {
        SendClientMessage(playerid, COLOR_ROYALBLUE, "Welcome to 24/7 Shop");
        SetPlayerInterior(playerid, 16);
        SetPlayerPos(playerid,-29.4883,-140.0293,1003.5469);
        SetPlayerFacingAngle(playerid,350.6350);
    }
    if(checkpointid == Checkpoint[1])
    {
       SetPlayerInterior(playerid, 0);
       SetPlayerPos(playerid,1932.4558,-1775.2700,13.3828);
       SetPlayerFacingAngle(playerid,274.7027);
    }
    if(checkpointid == Checkpoint[2])
    {
       SendClientMessage(playerid,COLOR_BLUE,"Type /robshop to start a robbery!");
    }
    return 1;
}
if i get it fixed i will rep for the helper
Reply
#2

Pretty obvious here look at this line...

if(IsPlayerInDynamicCP(playerid,2))

Your referencing 2 what is 2 certainly not your Checkpointid
Reply
#3

So how I fix it?
Reply
#4

Use the correct checkpoint reference id of course.
Reply
#5

Thanks rep for you
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)