LS Bank Escourt Job
#1

So i have job when you need deliver money from LS Bank to ATM or Other banks.

But some players got error. It works for me, but for other players it doesnt work. Gives this error "* You are not in a bank car or at the loading zone."

CMD to Load Banks Car
PHP код:
CMD:loadcar(playerid, params[])
{
    if(
PlayerInfo[playerid][pJob] == 26 || PlayerInfo[playerid][pJob2] == 26) {
        new 
vehicleid = GetPlayerVehicleID(playerid);
        if(
IsABankCar(vehicleid) && IsPlayerInRangeOfPoint(playerid, 10, 2520.6016,2447.6489,10.9427) && gPlayerCheckpointStatus[playerid] == CHECKPOINT_NONE) {
            
SetPVarInt(playerid, "OriginalSkin", GetPlayerSkin(playerid));
            
SetPVarInt(playerid, "BankCarID", vehicleid);
            
SendClientMessageEx(playerid, COLOR_WHITE, "You have been given a Security uniform!");
            
PlayerInfo[playerid][pChar] = 71;
            
PlayerInfo[playerid][pModel] = 71;
            
SetPlayerSkin(playerid, 71);
            
gPlayerCheckpointStatus[playerid] = ROUTE;
            
GameTextForPlayer(playerid, "~w~Route Set", 5000, 1);
            
SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "* Follow the route to collect your payment! (see checkpoint on radar).");
            
SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "* The less damage your vehicle takes the more money you will earn.");
            new 
RAND = random(sizeof(BankDelivery));
            
BankDelivery_X = BankDelivery[RAND][0];
            
BankDelivery_Y = BankDelivery[RAND][1];
            
BankDelivery_Z = BankDelivery[RAND][2];
            
SetPlayerCheckpoint(playerid,BankDelivery_X,BankDelivery_Y,BankDelivery_Z, 4);
            
SetPVarInt(playerid, "tpSTruckRunTimer", 30);
            
            if(
PlayerInfo[playerid][pLevel] >= 2)
            {
                new 
wep, ammo, count;
                for(new 
w=0; w<13; w++)
                {
                    
GetPlayerWeaponData(playerid, w, wep, ammo);
                    if(
wep == 22 || wep == 23 || wep == 24) count ++;
                }
                if(
count == 0)
                {
                    
GivePlayerValidWeapon(playerid, 22, 45);
                    
SendClientMessageEx(playerid, COLOR_YELLOW, "You have been given a 9mm to defend yourself!");
                }
                else
                {
                    
SendClientMessageEx(playerid, COLOR_GRAD2, "You already have a weapon for defense, therefore you did not receive a 9mm.");
                }
            }
            return 
1;
        }
        else if(
IsABankCar(vehicleid) && IsPlayerInRangeOfPoint(playerid, 15, 1433.0181,-962.2107,36.3097) && gPlayerCheckpointStatus[playerid] == CHECKPOINT_NONE) {
            
SetPVarInt(playerid, "OriginalSkin", GetPlayerSkin(playerid));
            
SetPVarInt(playerid, "BankCarID", vehicleid);
            
SendClientMessageEx(playerid, COLOR_WHITE, "You have been given a Security uniform!");
            
PlayerInfo[playerid][pChar] = 71;
            
PlayerInfo[playerid][pModel] = 71;
            
SetPlayerSkin(playerid, 71);
            
gPlayerCheckpointStatus[playerid] = LAROUTE;
            
GameTextForPlayer(playerid, "~w~Route Set", 5000, 1);
            
SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "* Follow the route to collect your payment! (see checkpoint on radar).");
            
SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "* The less damage your vehicle takes the more money you will earn.");
            new 
RAND = random(sizeof(LSBankDelivery));
            
LSBankDelivery_X = LSBankDelivery[RAND][0];
            
LSBankDelivery_Y = LSBankDelivery[RAND][1];
            
LSBankDelivery_Z = LSBankDelivery[RAND][2];
            
SetPlayerCheckpoint(playerid,LSBankDelivery_X,LSBankDelivery_Y,LSBankDelivery_Z, 4);
            
SetPVarInt(playerid, "tpSTruckRunTimer", 30);
            
            if(
PlayerInfo[playerid][pLevel] >= 2)
            {
                new 
wep, ammo, count;
                for(new 
w=0; w<13; w++)
                {
                    
GetPlayerWeaponData(playerid, w, wep, ammo);
                    if(
wep == 22 || wep == 23 || wep == 24) count ++;
                }
                if(
count == 0)
                {
                    
GivePlayerValidWeapon(playerid, 22, 45);
                    
SendClientMessageEx(playerid, COLOR_YELLOW, "You have been given a 9mm to defend yourself!");
                }
                else
                {
                    
SendClientMessageEx(playerid, COLOR_GRAD2, "You already have a weapon for defense, therefore you did not receive a 9mm.");
                }
            }
            return 
1;
        }
        else 
SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "* You are not in a bank car or at the loading zone.");
        return 
1;
    }
    else 
SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "* You are not a LS Bank Escourt worker.");
    return 
1;
} 
Reply
#2

if(IsABankCar(vehicleid) && IsPlayerInRangeOfPoint(playerid, 10, 2520.6016,2447.6489,10.9427) && gPlayerCheckpointStatus[playerid] == CHECKPOINT_NONE) {

else if(IsABankCar(vehicleid) && IsPlayerInRangeOfPoint(playerid, 15, 1433.0181,-962.2107,36.3097) && gPlayerCheckpointStatus[playerid] == CHECKPOINT_NONE) {


They receive that "error" when one of those conditions aren't met. They most likely have a checkpoint so either remove this gPlayerCheckpointStatus[playerid] == CHECKPOINT_NONE or add a /disablecp command.
Reply


Forum Jump:


Users browsing this thread: