Major problem with rp script i made
#5

Quote:

if(User[playerid][pLicense]==0) RemovePlayerFromVehicle(playerid),SendClientMessag e(playerid, COLOR_RED, "You do not have a license to operate this vehicle, Book a driving test at the front desk of the DMV");

that checks to see if there license = 0 if it does then it means they cannot drive the vehicle
Quote:

else if(User[playerid][pLicense]==3 && vehicle<=4) RemovePlayerFromVehicle(playerid),SendClientMessag e(playerid, COLOR_RED, "You are not authorized to drive this government vehicle");

License 3 means that they have their full license, so if they have their full license and try to get into a test car it removes them and says they are not authorised to drive a government vehicle.
Quote:

else if(User[playerid][pLicense]==1 && vehicle<=4) SetPlayerRaceCheckpoint(playerid,0, 1556.22, -1838.86, 13.55, 1567.05, -1862.33, 13.38, 3.0);

license = 1 is when the user has purchased a driving lesson, so when they have license one and the car is a test car it starts a checkpoint for their test.
Quote:

else if(User[playerid][pLicense]==1 && vehicle>4) RemovePlayerFromVehicle(playerid),SendClientMessag e(playerid, COLOR_RED, "You do not have a license to operate this vehicle, Book a driving test at the front desk of the DMV");

if your license = 1 (which only authorises u to drive the test car in a test) and u try to get in any other vehicle then you are removed and told
Quote:

"You do not have a license to operate this vehicle, Book a driving test at the front desk of the DMV")

Quote:

else if(User[playerid][pLicense]==1 && vehicle<=4)
{
if(oldstate==PLAYER_STATE_DRIVER && newstate==PLAYER_STATE_ONFOOT)
{
User[playerid][pLicense]=0, DisablePlayerRaceCheckpoint(playerid);
SendClientMessage(playerid, COLOR_RED, "You have exited the test car, you have failed");
SendClientMessage(playerid, COLOR_RED, "To take the test again re-book at the front desk of the DMV");
}
}

Basicly for this one if your license = 1 and your in a test car and you go from PLAYER_STATE_DRIVER to PLAYER_STATE_ONFOOT (AKA you get out of your car during the test) then the test is over it removes the checkpoints and you fail your test and have to rebook at the dmv again.
Reply


Messages In This Thread
Major problem with rp script i made - by jimjam080 - 19.09.2010, 10:49
Re: Major problem with rp script i made - by Kwarde - 19.09.2010, 10:58
Re: Major problem with rp script i made - by jimjam080 - 19.09.2010, 11:10
Re: Major problem with rp script i made - by MadeMan - 19.09.2010, 11:20
Re: Major problem with rp script i made - by jimjam080 - 19.09.2010, 12:38
Re: Major problem with rp script i made - by jimjam080 - 19.09.2010, 12:41
Re: Major problem with rp script i made - by MadeMan - 19.09.2010, 13:14
Re: Major problem with rp script i made - by jimjam080 - 19.09.2010, 15:17
Re: Major problem with rp script i made - by MadeMan - 19.09.2010, 15:35
Re: Major problem with rp script i made - by jimjam080 - 19.09.2010, 16:55

Forum Jump:


Users browsing this thread: 1 Guest(s)