Checkpoint not working
#2

pawn Код:
public OnPlayerEnterCheckpoint(playerid)
{
    if(IsPlayerInRangeOfPoint(playerid, 5, -2105.5925,-2403.5745,31.3825)){
        if(pRouteStatus[playerid] == 1 && pRoute[playerid] == 1){
            pRoute[playerid] = 2;//here was the problem
            DisablePlayerCheckpoint(playerid);
            SetPlayerCheckpoint(playerid, sbInfo[pFactoryID[playerid]][ENX],sbInfo[pFactoryID[playerid]][ENY],sbInfo[pFactoryID[playerid]][ENZ], 5.0);
            return SendClientMessage(playerid, COLOR_WHITE, "[FACTORY:] Head to the weapons factory unload point to deliver materials. Type /cancelmission to cancel the mission.");
        }
    }
    if(IsPlayerInRangeOfPoint(playerid, 5, 2306.9885,-5318.7769,2.0906)){
        if(pRouteStatus[playerid] == 1 && pRoute[playerid] == 2){
            pRouteStatus[playerid] = 2;
            DisablePlayerCheckpoint(playerid);
            SetPlayerCheckpoint(playerid, sbInfo[pFactoryID[playerid]][ENX],sbInfo[pFactoryID[playerid]][ENY],sbInfo[pFactoryID[playerid]][ENZ], 5.0);
            return SendClientMessage(playerid, COLOR_WHITE, "[FACTORY:] Head to the weapons factory unload point to deliver materials. Type /cancelmission to cancel the mission.");
        }
    }
    if(IsPlayerInRangeOfPoint(playerid, 5, sbInfo[pFactoryID[playerid]][ENX],sbInfo[pFactoryID[playerid]][ENY],sbInfo[pFactoryID[playerid]][ENZ])){
        if(pRouteStatus[playerid] == 2){
            pRouteStatus[playerid] = 0;
            sbInfo[pFactoryID[playerid]][WeaponParts] += pMaterials[playerid];

            new string[150]; format(string, 150, "[FACTORY:] %i materials delivered to the factory. Total materials: %i. Type /checkmats to check the materials amount.", pMaterials[playerid], sbInfo[pFactoryID[playerid]][WeaponParts]);
            pMaterials[playerid] = 0;
            pFactoryID[playerid] = -1;
            return SendClientMessage(playerid, COLOR_WHITE, string);
        }
    }
    return 1;
}
Reply


Messages In This Thread
Checkpoint not working - by Gerira Gaijin - 11.03.2012, 13:21
Re: Checkpoint not working - by eesh - 11.03.2012, 13:55
Re: Checkpoint not working - by Gerira Gaijin - 11.03.2012, 14:13
Re: Checkpoint not working - by eesh - 11.03.2012, 14:17
Re: Checkpoint not working - by Gerira Gaijin - 11.03.2012, 14:21
Re: Checkpoint not working - by eesh - 11.03.2012, 14:24
Re: Checkpoint not working - by Gerira Gaijin - 11.03.2012, 22:31

Forum Jump:


Users browsing this thread: 3 Guest(s)