15.10.2013, 16:00
For the command, you need to put that under the command, i.e.
Show us the command first of all.
Secondly, if you want it to always have the set amount of HP, put it under OnVehicleSpawn, not under OnPlayerStateChange, like this:
pawn Код:
if(model == X) SetVehicleHP(...);
Secondly, if you want it to always have the set amount of HP, put it under OnVehicleSpawn, not under OnPlayerStateChange, like this:
pawn Код:
public OnVehicleSpawn(vehicleid)
{
new model = GetVehicleModel(vehicleid)
switch(model)
{
case 541: SetVehicleHealth(vehicleid, 1500);
case 596: SetVehicleHealth(vehicleid, 2000);
case 560: SetVehicleHealth(vehicleid, 1500);
case 402: SetVehicleHealth(vehicleid, 1500);
case 427: SetVehicleHealth(vehicleid, 7500);
case 528: SetVehicleHealth(vehicleid, 5000);
case 599: SetVehicleHealth(vehicleid, 2000);
case 601: SetVehicleHealth(vehicleid, 4000);
case 490: SetVehicleHealth(vehicleid, 2500);
case 433: SetVehicleHealth(vehicleid, 4000);
case 470: SetVehicleHealth(vehicleid, 2500);
case 432: SetVehicleHealth(vehicleid, 10000);
case 497: SetVehicleHealth(vehicleid, 2500);
case 487: SetVehicleHealth(vehicleid, 1500);
}
return 1;
}