- 0
Problema licente. Va rog sa ma ajutati.
-
Similar Content
-
- 13 replies
- 350 views
-
- 2 replies
- 77 views
-
- 7 answers
- 599 views
-
- 2 answers
- 129 views
-
- 2 answers
- 160 views
-
-
Recently Browsing 0 members
- No registered users viewing this page.
Question
NuamNume
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
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.