SA-MP Forums Archive
Vehicle Health - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Vehicle Health (/showthread.php?tid=165044)



Vehicle Health - CT_Ronnie_Deo - 03.08.2010

this is always returning player can't drive...

Код:
			case MAX_DRIVERTEST_CP:
			{
			    new string[125];
			    DisablePlayerCheckpoint(playerid);
			    DrivingStep[playerid] = 0;
			    new Float:vehp;

				if(GetVehicleHealth(v,vehp) < 750)
				{
					format(string, sizeof(string), "Player (%d) Cant Driver For ****..someone call him a Taxi!!", playerid);
					// Add Var to Set Licese Licese[playerid] = 1;
				}
				else
				{
				    format(string, sizeof(string), "Player (%d) Passed His Drivers Test, we are no longer safe on the streets!", playerid);
                    // Add Var to Set TAKE Licese Just in case of Bug ( Licese[playerid] = 0; )
				}
				SendClientMessageToAll(COLOR_LIGHTRED, string);
				DrivingTest[playerid] = 0;
			}
		}
	}



Re: Vehicle Health - iggy1 - 03.08.2010

Try this not tested but maybe will work.
pawn Код:
case MAX_DRIVERTEST_CP:
{
    new string[125],Float:vehp;
    DisablePlayerCheckpoint(playerid);
    DrivingStep[playerid] = 0;
    GetVehicleHealth(v,vehp);

    if(vehp < 750)
    {
        format(string, sizeof(string), "Player (%d) Cant Drive For ****..someone call him a Taxi!!", playerid);
        SendClientMessageToAll(COLOR_LIGHTRED, string);
    }
    else if(vehp >= 750)
    {
        format(string, sizeof(string), "Player (%d) Passed His Drivers Test, we are no longer safe on the streets!", playerid);
        SendClientMessageToAll(COLOR_LIGHTRED, string);
    }
    DrivingTest[playerid] = 0;
}



Re: Vehicle Health - CT_Ronnie_Deo - 03.08.2010

awesome thanks