Job help?
#1

Ok, So i made a job and when a player enters the first checkpoint then goes to the next it dosn't let him load the last. heres my pawno code.

pawn Код:
public OnPlayerEnterCheckpoint(playerid)
{
    if(PlayerInfo[playerid][pJob] == 3 && PlayerInfo[playerid][pCheckPoint] == 1)
    {
        DisablePlayerCheckpoint(playerid);
        SetPlayerCheckpoint(playerid, 1362.2135, -1658.5692, 13.4981 , 3.0);
        PlayerInfo[playerid][pCheckPoint] = 2;
    }
    if(PlayerInfo[playerid][pJob] == 3 && PlayerInfo[playerid][pCheckPoint] == 2 && IsPlayerInRangeOfPoint(playerid, 2.0, 1362.2135, -1658.5692, 13.4981))
    {
        DisablePlayerCheckpoint(playerid);
        SetPlayerCheckpoint(playerid, 2470.6523,-2089.7607,13.6471, 3.0);
        PlayerInfo[playerid][pCheckPoint] = 3;
    }
    if(PlayerInfo[playerid][pJob] == 3 && PlayerInfo[playerid][pCheckPoint] == 3 && IsPlayerInRangeOfPoint(playerid, 2.0, 2470.6523,-2089.7607,13.6471))
    {
        new string[128];
        DisablePlayerCheckpoint(playerid);
        PlayerInfo[playerid][pCheckPoint] = 0;
        PlayerInfo[playerid][pCheck] = PlayerInfo[playerid][pCheck] +500;
        format(string, sizeof(string), "You now have a total of %d in cheques. Go cash them at the bank.", PlayerInfo[playerid][pCheck]);
        SendClientMessage(playerid, COLOR_GREEN, string);
    }
    return 1;
}
Ok so this script works if ur using teleport hacks but if not it dosn't work.

When i use it with out isplayerinrangeofpoint it dosn't load it up it gives all the things under one.
Reply
#2

Any one?
Reply
#3

IsPlayerInRangeOfPoint(playerid, 2.0
It's inferior to your checkpoint size...

(sorry for my bad english)
Reply
#4

Remove the point check and just add returns or use else if.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)