11.03.2014, 10:41
I am trying to make it so when these 3 factions are near a vehicle they can access the factions locker.
When I am standing on the vehicle evan it says Im not near the vehicle.
Anyone that can help?
Thanks
Here is the code:
When I am standing on the vehicle evan it says Im not near the vehicle.
Anyone that can help?
Thanks
Here is the code:
Код:
CMD:trunk(playerid, params[]) { new Float:X, Float:Y, Float:Z; for(new a = 0; a < MAX_VEHICLES; a++) { GetVehiclePos(a, X, Y, Z); if(IsPlayerInRangeOfPoint(a, 5.0, X+5, Y, Z)) { if(PlayerInfo[playerid][pFaction] == 1) { ShowPlayerDialog(playerid, DIALOG_LSPD, DIALOG_STYLE_LIST, "Locker", "Duty\nEquipment\nUniform\nSelect Skin", "Ok", "Close"); return 1; } if(PlayerInfo[playerid][pFaction] == 2) { ShowPlayerDialog(playerid, DIALOG_FBI, DIALOG_STYLE_LIST, "Locker", "Duty\nEquipment\nUniform\nSelect Skin\nChange Name", "Ok", "Close"); return 1; } if(PlayerInfo[playerid][pFaction] == 3) { ShowPlayerDialog(playerid, DIALOG_LAFMD, DIALOG_STYLE_LIST, "Locker", "Duty\nEquipment\nUniform", "Ok", "Close"); return 1; } else return SendClientMessage(playerid, COLOR_GREY, "You are not in a faction."); } else return SendClientMessage(playerid, COLOR_GREY, "You are not near a vehicle."); } return 1; }