31.12.2011, 20:54
pawn Код:
//===============================[DMV System]=================================================
if(strcmp(cmd, "/licenseexam", true) == 0) // By Lilcuete
{
if(IsPlayerConnected(playerid))
{
if(DriverTest[playerid] > 0)
{
SendClientMessage(playerid,COLOR_LIGHTRED, "ERROR:You are already on your Driving Test !");
return 1;
}
new newcar = GetPlayerVehicleID(playerid);
if(newcar >= 131 && newcar <= 134)
{
if(PlayerInfo[playerid][pDrivLic] == 0)
{
if(GetPlayerMoney(playerid) >= 500) {
DriverTest[playerid] = 1;
TogglePlayerControllable(playerid, true);
SendClientMessage(playerid,COLOR_LIGHTRED,"_______________Main Driving rules:______________");
SendClientMessage(playerid,COLOR_LIGHTRED,"1) Drive on the right side of the road");
SendClientMessage(playerid,COLOR_LIGHTRED,"2) Don't drive too fast");
SendClientMessage(playerid,COLOR_LIGHTRED,"3) Respect the other drivers on the road");
SendClientMessage(playerid,COLOR_WHITE,"Now enter checkpoint and arrive to last one to in time to complete");
SendClientMessage(playerid,COLOR_WHITE,"Don't go too fast,on streets you may get in trouble if you do.");
SetPlayerCheckpoint(playerid,1244.7015,-1572.9912,12.9179,5.0);
CheckP[playerid] = 0;
//GivePlayerPCash(playerid,-5000);
gPlayerCheckpointStatus[playerid] = CHECKPOINT_DRIVETEST;
}
else
{
SendClientMessage(playerid,COLOR_GREY," You already have a Driving License or don't have 5000$ !");
}
}
}
}
return 1;
}