class and vip allowed to use these vehicles...
#1

hey so i have this code but it does not work vip still get's locked out of vehicle....
Код:
public OnPlayerEnterVehicle(playerid, vehicleid)
{
	new model = GetVehicleModel(vehicleid);

	if(model == 425 && Player[playerid][class] != AIRFORCE || Player[playerid][viplevel] < 1 || model == 520 && Player[playerid][class] != AIRFORCE && Player[playerid][viplevel] < 1) {
	
		ClearAnimations(playerid);
		SendClientMessage(playerid, C_RED, "• You need the class Airforce to fly this vehicle(or V.I.P)!");
		return 1;
	}

	if(model == 432 && Player[playerid][class] != HEAVY_GUNNER || Player[playerid][viplevel] < 1) {
	
	    ClearAnimations(playerid);
		SendClientMessage(playerid, C_RED, "• You need the class Heavy Gunner drive this vehicle!(or V.I.P)");
		return 1;
	}
	
	if(model == 416 && Player[playerid][class] != MEDIC || Player[playerid][viplevel] < 1) {

	    ClearAnimations(playerid);
		SendClientMessage(playerid, C_RED, "• You need the class Medic drive this vehicle!(or V.I.P)");
		return 1;
	}
	return 1;
}
thanks...
Reply


Messages In This Thread
class and vip allowed to use these vehicles... - by SwisherSweet - 13.01.2014, 23:48
Re: class and vip allowed to use these vehicles... - by Voxel - 14.01.2014, 04:54
Re: class and vip allowed to use these vehicles... - by xZdadyZx - 14.01.2014, 05:41
Re: class and vip allowed to use these vehicles... - by Voxel - 14.01.2014, 06:22

Forum Jump:


Users browsing this thread: 1 Guest(s)