SA-MP Forums Archive
help do a background check - 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: help do a background check (/showthread.php?tid=258981)



help do a background check - Sergey68 - 02.06.2011

help do a background check
PHP код:
if(if the car is damaged visual)
{
SendClientMessage(playerid,COLOR_WHITE,"write to the player if the car has visual damage")
}
else
{
SendClientMessage(playerid,COLOR_WHITE,"write to the player if the car has no visual damage")

Thanks in advance


Re: help do a background check - Sergey68 - 02.06.2011

up up up


Re: help do a background check - Jack Shred - 02.06.2011

Quote:

new Float:health;
new veh;
veh = GetPlayerVehicleID(playerid);
GetVehicleHealth(veh, health);
if(health < 1000)
{
SendClientMessage(playerid,COLOR_WHITE,"Your vehicle is damaged!")
}
else
{
SendClientMessage(playerid,COLOR_WHITE,"Your vehicle is not damaged!");
}

Normally when you hit something you lose veh hp & visual damage.
I don't think there's another way.