Jump to content
  • 0

Problema licente. Va rog sa ma ajutati.


Question

Posted

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.. 

5 answers to this question

Recommended Posts

  • 1
Posted
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

  • 0
Posted (edited)
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
  • 0
Posted (edited)
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
  • 0
Posted
3 hours ago, adversaru said:

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

esti si prost si mandru, bravo.

mersi frate te pup

  • -2
Posted
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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • 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.