OnPlayerEnterVehicle bug ? simple don't work
#1

My OnPlayerEnterVehicle
pawn Код:
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
    if(gTeam[playerid] >= 1 || gTeam[playerid] >= 3 || gTeam[playerid] >= 4)
    {
        if (IsNgCar(vehicleid) && !ispassenger)
        {
            if(PlayerInfo[playerid][pLeader]==1 || PlayerInfo[playerid][pLeader]==2 || PlayerInfo[playerid][pLeader]==3 || PlayerInfo[playerid][pMember]==1 || PlayerInfo[playerid][pMember]==2 || PlayerInfo[playerid][pMember]==3) {}
            else {
                WantedPoints[playerid]+=2;
                SetPlayerCriminal(playerid,255, "Tentativa de furt a unei masini de politie!");
                new Float:cx, Float:cy, Float:cz;
                GetPlayerPos(playerid, cx, cy, cz);
                SetPlayerPos(playerid, cx,  cy, cz);
            }
        }  
        if(IsAPizzaDeliver(vehicleid))
        {
            if(PlayerInfo[playerid][pJob] == 17 && TransportPizzaVar[playerid] == 1)
            {
                SetPlayerCheckpoint(playerid, 2244.8298,-1663.5673,15.0724, 3.0);      
                CP[playerid] = 199845;
                SendClientMessage(playerid, COLOR_GREY, "{FFFFFF}Ai inceput munca! Dute la punctul {CC0033}rosu {FFFFFF}pentru a incepe livrarile!!")
            }
            else
            {
                SendClientMessage(playerid, COLOR_GREY,"Aceste scutere pot fi conduse doar de cei ce fac livrari!");
                ClearAnimations(playerid);
            }
        }
        if(IsAHarvest(vehicleid))
        {
            if(PlayerInfo[playerid][pJob] == 18 && FarmerVar[playerid] == 1)
            {
                SetPlayerCheckpoint(playerid, -331.3332,-1471.8254,15.8007, 3.0);      
                CP[playerid] = 1500;       
                SendClientMessage(playerid, COLOR_GREY, "{FFFF66}[JOB INFO] - Dute dupa punctul {FF0033}rosu!");   
            }
            else
            {
                SendClientMessage(playerid, COLOR_GREY,"Poti conduce acest vehicul doar daca strangi recolta!");
                ClearAnimations(playerid);
            }
        }
        if(IsAHarvestDeliver(vehicleid))
        {
            if(PlayerInfo[playerid][pJob] == 18 && DeliverFarmVar[playerid] == 1)
            {
                SetPlayerCheckpoint(playerid, -412.1897,-1425.8871,25.3805, 1.0);      
                CP[playerid] = 1600;
                SendClientMessage(playerid, COLOR_GREY, "{FFFF66}[JOB INFO] - Dute la punctul {FF3300}rosu{FFFF66} pentru a livra recolta!");  
            }
            else
            {
                SendClientMessage(playerid, COLOR_GREY,"Poti conduce acest vehicul doar livrezi recolta!");
                ClearAnimations(playerid);
            }
        }

        if(IsASweeper(vehicleid))
        {
            if(PlayerInfo[playerid][pJob] != 21)
            {
                SendClientMessage(playerid, COLOR_GREY,"{FFFFFF}(( {33CCFF}Aceste vehicule pot fi conduse doar de cei ce au jobul {FF0033}Sweeper{FFFFFF} ))");
                ClearAnimations(playerid);
            }          
        }              
        if(vehicleid >= FedexC[0] && vehicleid <= FedexC[12])
        {
            if(PlayerInfo[playerid][pJob] != 30)
            {
                SendClientMessage(playerid, COLOR_GREY,"Nu ai job fedex.");
                ClearAnimations(playerid);
            }
        }
        if (IsAnAmbulance(vehicleid) && !ispassenger)
        {
            if(PlayerInfo[playerid][pMember]==4 || PlayerInfo[playerid][pLeader]==4) { }
            else { WantedPoints[playerid]+=2; SetPlayerCriminal(playerid,255, "Stealing An Ambulance"); }
        }
        if (IsATank(vehicleid) && !ispassenger)
        {
            if(PlayerInfo[playerid][pLeader]==1 || PlayerInfo[playerid][pLeader]==3 || PlayerInfo[playerid][pMember]==3) {}
            else { WantedPoints[playerid]+=2; SetPlayerCriminal(playerid,255, "Stealing A Tank"); SendClientMessage(playerid, COLOR_GREY,"You don't know how to drive it yet."); }
        }
        if(IsAnOwnableCar(vehicleid) && CarInfo[vehicleid][cLock] == 1 && CarInfo[vehicleid][cOwned] == 1)
        {
            if(PlayerInfo[playerid][pAdmin] >= 5 && AdminDuty[playerid] == 1) { }
            else
            {
                new Float:cx, Float:cy, Float:cz;
                GetPlayerPos(playerid, cx, cy, cz);
                SetPlayerPos(playerid, cx, cy, cz);
            }
        }
    }
    return 1;
}
Why he don't work ? don't work nothing at him.
Reply
#2

fix i don't show if(gTeam[playerid] >= 1 || gTeam[playerid] >= 3 || gTeam[playerid] >= 4)
please close topic.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)