Major problem with rp script i made
#3

Here i will also include where it checks to see if they have a driving lisence
Quote:

public OnPlayerStateChange(playerid,newstate,oldstate)
{
new vehicle;
vehicle = GetPlayerVehicleID(playerid);
if(newstate==PLAYER_STATE_DRIVER)
{
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");
else if(User[playerid][pLicense]==3 && vehicle<=4) RemovePlayerFromVehicle(playerid),SendClientMessag e(playerid, COLOR_RED, "You are not authorized to drive this government vehicle");
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);
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");
}
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");
}
}
return 1;
}

maybe that will help you think of something
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)