Class/Rank Vehicle System.
#1

It was well good working when it only included limits score.
There is 3 classes. I want only allow class 1 to drive heavy vehicles.
After testing, class 1 can drive heavy vehicles with any scores and class 2 and 3 are able to drive it above the required score.




Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
    new Sparrow = GetVehicleModel(GetPlayerVehicleID(playerid));
    if(GetPlayerScore(playerid) < 150 && PickedClass[playerid] !=1) {
		if(Sparrow == 447) {
			SendClientMessage(playerid, COLOR_RED, "ERROR: You need to be LIEUTENANT and ASSAULT to Pilot this vehicle.");
			new Float:x, Float:y, Float:z;
	 	    GetPlayerPos(playerid, x, y, z); SetPlayerPos(playerid,x,y,z+1);
		}
    }
    new Rhino = GetVehicleModel(GetPlayerVehicleID(playerid));
    if(GetPlayerScore(playerid) < 300 && PickedClass[playerid] != 1) {
		if(Rhino == 432) {
			SendClientMessage(playerid, COLOR_RED, "ERROR: You need to be MAJOR AND Assualt to Pilot this vehicle.");
			new Float:x, Float:y, Float:z;
	 	    GetPlayerPos(playerid, x, y, z); SetPlayerPos(playerid,x,y,z+1);
		}
    }
	new Hydra = GetVehicleModel(GetPlayerVehicleID(playerid));
	if(GetPlayerScore(playerid) < 750 && PickedClass[playerid] != 1) {
		if(Hydra == 520) {
			SendClientMessage(playerid, COLOR_RED, "ERROR: You need to be COLONEL AND Assualt to Pilot this vehicle.");
			new Float:x, Float:y, Float:z;
	 	    GetPlayerPos(playerid, x, y, z); SetPlayerPos(playerid,x,y,z+1);
	 	}
	 	
	}
	new Hunter = GetVehicleModel(GetPlayerVehicleID(playerid));
	if(GetPlayerScore(playerid) < 750 && PickedClass[playerid] != 1) {
		if(Hunter == 425) {
			SendClientMessage(playerid, COLOR_RED, "ERROR: You need to be COLONEL AND Assualt to Pilot this vehicle.");
			new Float:x, Float:y, Float:z;
	 	    GetPlayerPos(playerid, x, y, z); SetPlayerPos(playerid,x,y,z+1);
		}
	}
Reply


Messages In This Thread
Class/Rank Vehicle System. - by ColonelBurton - 20.06.2013, 12:44
Re: Class/Rank Vehicle System. - by dEcooR - 20.06.2013, 12:50
Re: Class/Rank Vehicle System. - by ColonelBurton - 20.06.2013, 14:12

Forum Jump:


Users browsing this thread: 2 Guest(s)