****** Vehicle Health 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)
+--- Thread: ****** Vehicle Health check (
/showthread.php?tid=501977)
****** Vehicle Health check -
Carxi - 21.03.2014
I've think to set all vehicles health 999 for Detect the ****** repair.
But i don't now how start the script.
Re: ****** Vehicle Health check -
David (Sabljak) - 21.03.2014
for start...
Код:
for(new i=1; i<MAX_VEHICLES; i++)
{
SetVehicleHealth(i, 999);
}
Well... you must secure that PAY 'N' SPRAY dont detect as "HACK" ...so you can make X,Y,Z with 15 Meters around PNS to ignore that check...
and you must make some kind of timer that will run idk every 5-10 seconds to check all vehicles...
GetVehicleHealth
if... == 1000
{
Hack...
}
got it?
Re: ****** Vehicle Health check -
Carxi - 21.03.2014
Quote:
Originally Posted by David (Sabljak)
for start...
Код:
for(new i=1; i<MAX_VEHICLES; i++)
{
SetVehicleHealth(i, 999);
}
Well... you must secure that PAY 'N' SPRAY dont detect as "HACK" ...so you can make X,Y,Z with 15 Meters around PNS to ignore that check...
and you must make some kind of timer that will run idk every 5-10 seconds to check all vehicles...
GetVehicleHealth
if... == 1000
{
Hack...
}
got it?
|
PHP код:
if(IsPlayerInAnyVehicle(playerid))
{
new Float:health;
new veh = GetPlayerVehicleID(playerid);
GetVehicleHealth(veh, health);
if(health == 1000)
{
SendCheatAlert(playerid,CHEAT_VEHICLE,health);
}
}