Problem Help - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Problem Help (
/showthread.php?tid=505848)
Problem Help -
qUneT - 10.04.2014
Код:
new vehicleid = GetPlayerVehicleID(playerid);
if(vehicleid == carlic1 || carlic2 || carlic3 || carlic4)// cars from Car Drive Test
{
if(newstate == PLAYER_STATE_DRIVER)
{
if(PlayerInfo[playerid][pCarLic] == 2)// He take the test
{
SetPlayerCheckpoint(playerid, 1738.6161,-2251.9590,13.2313, 3.0);
CP[playerid] = 200;
SendClientMessage(playerid,-1,"DMV:Te rog sa urmaresti checkpointuri-le pentru a termina test-ul.");
}else{
RemovePlayerFromVehicle(playerid);
}
}
}
If you get into any car server remove from it.....
Re: Problem Help -
Konstantinos - 10.04.2014
First of all the way to compare vehicleid is incorrect. The correct way would be:
pawn Код:
if(vehicleid == carlic1 || vehicleid == carlic2 || vehicleid == carlic3 || vehicleid == carlic4)
About your problem - it removes you because
PlayerInfo[playerid][pCarLic] is not 2 (that he takes the test). Make sure you set it to 2 before.