Jump to content
  • 0

Problema licente. Va rog sa ma ajutati.


NuamNume

Question

Salut, am facut un sistem de licente, totul merge nu am probleme dar cand ma apropii de un avion sau barca, imi zice ca nu am licenta de condus. Dar daca imi setez licenta de condus merge sa urc. La masini este ok.

 

Cod: public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
    if(!ispassenger)
    {
        if(!isBike(GetVehicleModel(vehicleid)) && PlayerInfo[playerid][pDrivingLic] == 0)
        {
            ClearAnimations(playerid);
            return SendClientMessage(playerid, COLOR_GREY, "Nu ai licenta de condus.");
        }
        if(isBoat(GetVehicleModel(vehicleid)) && PlayerInfo[playerid][pBoatLic] == 0)
        {
            ClearAnimations(playerid);
            return SendClientMessage(playerid, COLOR_GREY, "Nu ai licenta de navigatie.");
        }
        if(isPlane(GetVehicleModel(vehicleid)) && PlayerInfo[playerid][pFlyLic] == 0)
        {
            ClearAnimations(playerid);
            return SendClientMessage(playerid, COLOR_GREY, "Nu ai licenta de pilot.");
        }
    }
    return 1;
}

 

si la statechange

    if(newstate == PLAYER_STATE_DRIVER)
    {
        if(!isBike(GetVehicleModel(GetPlayerVehicleID(playerid))) && PlayerInfo[playerid][pDrivingLic] == 0)
        {
            SlapPlayer(playerid);
            return SendClientMessage(playerid, COLOR_GREY, "Nu ai licenta de condus.");
        }
        if(isBoat(GetVehicleModel(GetPlayerVehicleID(playerid))) && PlayerInfo[playerid][pBoatLic] == 0)
        {
            SlapPlayer(playerid);
            return SendClientMessage(playerid, COLOR_GREY, "Nu ai licenta de navigatie.");
        }
        if(isPlane(GetVehicleModel(GetPlayerVehicleID(playerid))) && PlayerInfo[playerid][pFlyLic] == 0)
        {
            SlapPlayer(playerid);
            return SendClientMessage(playerid, COLOR_GREY, "Nu ai licenta de pilot.");
        }
    }

 

Am un stock gen cu isplane, etc.. 

Link to comment
Share on other sites

5 answers to this question

Recommended Posts

  • 1
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
    if(!ispassenger)
    {
        if(isBoat(GetVehicleModel(vehicleid)) && PlayerInfo[playerid][pBoatLic] == 0)
        {
            ClearAnimations(playerid);
            return SendClientMessage(playerid, COLOR_GREY, "Nu ai licenta de navigatie.");
        }
        else if(isPlane(GetVehicleModel(vehicleid)) && PlayerInfo[playerid][pFlyLic] == 0)
        {
            ClearAnimations(playerid);
            return SendClientMessage(playerid, COLOR_GREY, "Nu ai licenta de pilot.");
        }
        else if(!isBike(GetVehicleModel(vehicleid)) && PlayerInfo[playerid][pDrivingLic] == 0)
        {
            ClearAnimations(playerid);
            return SendClientMessage(playerid, COLOR_GREY, "Nu ai licenta de condus.");
        }
    }
    return 1;
}
if(newstate == PLAYER_STATE_DRIVER)
    {
        if(isBoat(GetVehicleModel(GetPlayerVehicleID(playerid))) && PlayerInfo[playerid][pBoatLic] == 0)
        {
            SlapPlayer(playerid);
            return SendClientMessage(playerid, COLOR_GREY, "Nu ai licenta de navigatie.");
        }
        else if(isPlane(GetVehicleModel(GetPlayerVehicleID(playerid))) && PlayerInfo[playerid][pFlyLic] == 0)
        {
            SlapPlayer(playerid);
            return SendClientMessage(playerid, COLOR_GREY, "Nu ai licenta de pilot.");
        }
        else if(!isBike(GetVehicleModel(GetPlayerVehicleID(playerid))) && PlayerInfo[playerid][pDrivingLic] == 0)
        {
            SlapPlayer(playerid);
            return SendClientMessage(playerid, COLOR_GREY, "Nu ai licenta de condus.");
        }
    }

Pune asa.

Discord:
! Akan !#6675

Link to comment
Share on other sites

  • 0
10 minutes ago, NuamNume said:

Salut, am facut un sistem de licente, totul merge nu am probleme dar cand ma apropii de un avion sau barca, imi zice ca nu am licenta de condus. Dar daca imi setez licenta de condus merge sa urc. La masini este ok.

 

Cod: public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
    if(!ispassenger)
    {
        if(!isBike(GetVehicleModel(vehicleid)) && PlayerInfo[playerid][pDrivingLic] == 0)
        {
            ClearAnimations(playerid);
            return SendClientMessage(playerid, COLOR_GREY, "Nu ai licenta de condus.");
        }
        if(isBoat(GetVehicleModel(vehicleid)) && PlayerInfo[playerid][pBoatLic] == 0)
        {
            ClearAnimations(playerid);
            return SendClientMessage(playerid, COLOR_GREY, "Nu ai licenta de navigatie.");
        }
        if(isPlane(GetVehicleModel(vehicleid)) && PlayerInfo[playerid][pFlyLic] == 0)
        {
            ClearAnimations(playerid);
            return SendClientMessage(playerid, COLOR_GREY, "Nu ai licenta de pilot.");
        }
    }
    return 1;
}

 

si la statechange

    if(newstate == PLAYER_STATE_DRIVER)
    {
        if(!isBike(GetVehicleModel(GetPlayerVehicleID(playerid))) && PlayerInfo[playerid][pDrivingLic] == 0)
        {
            SlapPlayer(playerid);
            return SendClientMessage(playerid, COLOR_GREY, "Nu ai licenta de condus.");
        }
        if(isBoat(GetVehicleModel(GetPlayerVehicleID(playerid))) && PlayerInfo[playerid][pBoatLic] == 0)
        {
            SlapPlayer(playerid);
            return SendClientMessage(playerid, COLOR_GREY, "Nu ai licenta de navigatie.");
        }
        if(isPlane(GetVehicleModel(GetPlayerVehicleID(playerid))) && PlayerInfo[playerid][pFlyLic] == 0)
        {
            SlapPlayer(playerid);
            return SendClientMessage(playerid, COLOR_GREY, "Nu ai licenta de pilot.");
        }
    }

 

Am un stock gen cu isplane, etc.. 

de ce spui "am facut un sistem" cand de fapt l-ai copiat? daca stiai tu sa codezi atat, stiai sigur sa rezolvi si o problema banala de genu.
va dati ce nu sunteti, asta e pacatul vostru, si dupa 1 an de copy-paste postati "Ofer servicii scripting".

vezi si tu la comanda de dat licente daca-ti seteaza [pBoatLic] pe 1.

Edited by adversaru
Link to comment
Share on other sites

  • 0
20 hours ago, NuamNume said:

lol ce prost

nu stiu care dintre noi e prostu' care cere ajutor in disper la orice problema de incepatori. 😘

esti si prost si mandru, bravo.

Edited by adversaru
Link to comment
Share on other sites

  • -2
1 hour ago, adversaru said:

de ce spui "am facut un sistem" cand de fapt l-ai copiat? daca stiai tu sa codezi atat, stiai sigur sa rezolvi si o problema banala de genu.
va dati ce nu sunteti, asta e pacatul vostru, si dupa 1 an de copy-paste postati "Ofer servicii scripting".

vezi si tu la comanda de dat licente daca-ti seteaza [pBoatLic] pe 1.

lol ce prost

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.