Jump to content
  • 0

Probleme licente


Shad0wdpbgd

Question

Salut, am o problema la licente. Mereu cand intru intr-un avion sau barca, imi zice ca nu am licenta de driving, daca imi dau licenta de driving, merge sa conduc si masina, sa pilotez si avionu, si sa merg si cu barca. Stie cineva de ce? 

COD: public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
    if(!ispassenger)
    {
        if(!isBike(GetVehicleModel(vehicleid)) && PlayerInfo[playerid][pDrivingLic] == 0)
        {
            ClearAnimations(playerid);
            return SCM(playerid, COLOR_GREY, "You need a driving license to use this vehicle.");
        }
        if(isBoat(GetVehicleModel(vehicleid)) && PlayerInfo[playerid][pBoatLic] == 0)
        {
            ClearAnimations(playerid);
            return SCM(playerid, COLOR_GREY, "You need a boat license use this boat.");
        }
        if(isPlane(GetVehicleModel(vehicleid)) && PlayerInfo[playerid][pFlyLic] == 0)
        {
            ClearAnimations(playerid);
            return SCM(playerid, COLOR_GREY, "You need a fly licenses to use this plane.");
        }                
    }
    return 1;
}

Link to comment
Share on other sites

1 answer to this question

Recommended Posts

  • 0

Salut @Raduq,

Trebuie sa detectezi si daca vehiculul in care urca e diferit fata de un avion si de o barca. Atunci cand jucatorul urca intr-un vehicul, la tine in script detectezi doar daca e bicicleta. Exemplu de rezolvare:

new vehModel = GetVehicleModel(vehicleid); //ajuta la citirea codului mai bine
if(!isBike(vehModel) && !isPlane(vehModel) && !isBoat(vehModel) && PlayerInfo[playerid][pDrivingLic] == 0)

 

  • Upvote 1

Daca te-am ajutat =>

spacer.png

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.