08.04.2019, 14:20
I have this under if "(newkeys & KEY_NO)" and when im pressing the key N nothing happens,its like this part of the script isn't even there
if(IsPlayerInAnyVehicle(playerid))
{
if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
{
new Float, Float:y, Float:z;
GetVehiclePos(RentedVehicle[playerid], Float, Float:y, Float:z);
if(IsPlayerInRangeOfPoint(playerid, Float:5, Float, Float:y, Float:z))
{
if(LockedVeh[RentedVehicle[playerid]] == 0)
{
LockedVeh[RentedVehicle[playerid]] = 1;
SendClientMessage(playerid, -1, "Locked");
}
else {
LockedVeh[RentedVehicle[playerid]] = 0;
SendClientMessage(playerid, -1, "Unlocked");
}
}
}
}
}
if(IsPlayerInAnyVehicle(playerid))
{
if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
{
new Float, Float:y, Float:z;
GetVehiclePos(RentedVehicle[playerid], Float, Float:y, Float:z);
if(IsPlayerInRangeOfPoint(playerid, Float:5, Float, Float:y, Float:z))
{
if(LockedVeh[RentedVehicle[playerid]] == 0)
{
LockedVeh[RentedVehicle[playerid]] = 1;
SendClientMessage(playerid, -1, "Locked");
}
else {
LockedVeh[RentedVehicle[playerid]] = 0;
SendClientMessage(playerid, -1, "Unlocked");
}
}
}
}
}