01.02.2016, 18:32
I'm trying to make it so when a player enters a vehicle and has no license, it doesn't let him.
He can only enter the vehicle if the vehicleid is equal to the vehicleid or vehicle model of a bike or faggio.
This is my code.
Simply it doesn't work, even tho I'm trying to enter a bike or the faggio it says that I don't have a license.
He can only enter the vehicle if the vehicleid is equal to the vehicleid or vehicle model of a bike or faggio.
This is my code.
Код:
public OnPlayerEnterVehicle(playerid, vehicleid) { new vmodel = GetVehicleModel(vehicleid); new Float:x, Float:y, Float:z; GetPlayerPos(playerid, x, y, z); if(pInfo[playerid][pGroup] != cInfo[vehicleid][cGroup]) { SetPlayerPos(playerid, x, y, z+3); if(cInfo[vehicleid][cGroup] == 1) { SendClientMessage(playerid, -1, "You are not part of Los Santos Police Department."); } } if(pInfo[playerid][pLic1] == 0 && vmodel != 481 || vmodel != 462 || vmodel != 510 || vmodel != 509) { SetPlayerPos(playerid, x, y, z+3); SendClientMessage(playerid, -1, "You don't have a drivings license, a checkpoint has been set on your map."); SetPlayerCheckpoint(playerid, 1219.1997,-1811.9343,16.5938, 5); } return 1; }