05.02.2011, 12:35
Actually, wait. I think you would want to use this because in that one he would still have his car and be taking the test after he failed:
Код:
if(IsPlayerInRangeOfPoint(playerid, 7.0, 1140.0406,1370.9948,10.3881)) { new Float:health, vehicleid; vehicleid = GetPlayerVehicleID(playerid); GetVehicleHealth(vehicleid, health); PlayerPlaySound(playerid, 1054 , 0.0, 0.0, 10.0); if(checkpointid == dtcp[19]) { if (health == 1000) { DisablePlayerRaceCheckpoint(playerid); DestroyDynamicRaceCP(dtcp[19]); DestroyVehicle(dscar); IsInDrivingTest[playerid] = 0; SendClientMessage(playerid,COLOR_RED,"You passed the test!"); dvlicense[playerid] = 1; return 1; } else { DisablePlayerRaceCheckpoint(playerid); DestroyDynamicRaceCP(dtcp[19]); DestroyVehicle(dscar); IsInDrivingTest[playerid] = 0; SendClientMessage(playerid,COLOR_RED,"You failed at the test!"); dvlicense[playerid] = 0; return 1; } } }