19.04.2013, 01:09
(
Последний раз редактировалось horsemeat; 21.04.2013 в 02:48.
)
I Would like to make it total cars instead of the traditional blowing up
here is the code I Tryed
The Code works when you are near the car but if you teleport a car or your spawn a car it will be totaled any way to fix this
here is the code I Tryed
pawn Код:
public OnVehicleTotal()
{
for(new count; count < MAX_VEHICLES;count++)
{
new Float:health;
GetVehicleHealth(count,health);
if((health) < 300.0)
{
SetVehicleHealth(count,290.0);
new engine,lights,alarm,doors,bonnet,boot,objective;
total[count] = 1;
GetVehicleParamsEx(count,engine,lights,alarm,doors,bonnet,boot,objective);
SetVehicleParamsEx(count,false,false,alarm,doors,bonnet,boot,objective);
for(new i;i < MAX_PLAYERS;i++)
{
if(IsPlayerConnected(i))
{
if(IsPlayerInVehicle(i,count))
{
GameTextForPlayer(i,"~r~Totaled",12,0);
}
}
}
}
else
{
total[count] = 0;
}
}
return 1;
}