07.01.2015, 13:06
Hello i want to attach fire object on vehicle when vehicle healt reach 250 hare is my code :
but its not working and i dont realy know the reason why , i have tested this on game mode int
yes its works its attach flames to vehicle but if i do that on my carcheck its not working its just add +150 healt to vehicle when she reach 250 . help please
Код:
Flame = CreateObject(18690, 10.0, 10.0, 10.0, 0, 0, 0); public carcheck() { for(new i=0; i<MAX_PLAYERS; i++) { new vehicle, Float:health; vehicle = GetPlayerVehicleID(i); GetVehicleHealth(vehicle, health); if(health <= 250) { RemovePlayerFromVehicle(i); AttachObjectToVehicle(Flame, vehicle, 0.0, 1.5, -1.5, 0.000000, 0.000000, 0.000000); health += 150; SetVehicleHealth(vehicle, health); } } return 1; }
Код:
test = AddStaticVehicle(411, 1798.6711,-1605.2622,13.5469,260.7245, 1, 1); Flame = CreateObject(18690, 10.0, 10.0, 10.0, 0, 0, 0); AttachObjectToVehicle(Flame, test, 0.0, 1.5, -1.5, 0.000000, 0.000000, 0.000000);