OnPlayerEnterVehicle
#1

Hey, I've been trying to make it so you can't drive around in DMV vehicles unless you're doing the driving test. Now, I've attempted to edit the /engine command so if you attempt to do /engine while in the DMV vehicle it'll give you and error and kick you out, but I couldn't get that to work.

Is there any way to make it so it's impossible to start the engine of the vehicle unless you're doing /takedrivingtest

/takedrivingtest
Код:
CMD:takedrivingtest(playerid, params[]) {
	new veh;
	veh = GetPlayerVehicleID(playerid);
	if(playerVariables[playerid][pLicense] == 0) {
		if(veh == 1 || veh == 2 || veh == 3 || veh == 4 || veh == 5) {
			DrivingTest[playerid] = 1;
			SetPlayerCheckpoint(playerid, 2083.7573,-1878.4850,13.4358, 3.0);
			SendClientMessage(playerid, COLOR_GREEN, "You have started your driving test! Follow the intructers orders!");
			playerVariables[playerid][pMoney] -=250;
		}else{
			SendClientMessage(playerid, COLOR_RED, "You must be in a DMV vehicle to start your test!");
			RemovePlayerFromVehicle(playerid);
		}
	}else{
		SendClientMessage(playerid, COLOR_RED, "You already have a license, you do not need to take the test!");
		RemovePlayerFromVehicle(playerid);
	}
	return 1;
}
Reply


Messages In This Thread
OnPlayerEnterVehicle - by Luit - 06.02.2013, 14:03
Re: OnPlayerEnterVehicle - by Luit - 06.02.2013, 14:30

Forum Jump:


Users browsing this thread: 1 Guest(s)