06.02.2014, 15:29
Well , right, as you can see in the video, vehicle health sets to 300.0 whenever its lower than 300.0, it happens when player entering in locked vehicle as a passanger and health is lower than 300.0, and I don't set HP to 300.0 nowhere in the script, only part where I set, is if health is lower than 250.0 to 253.0 to stop burning process, so before shouting its a script bug, can someone make a video by confirming its not a bug? Because I triple checked my script, I don't set hp to 300 nowhere, whats more I use setvehiclehealth only at 2 places, at /repair cmd and when it starts to burn, don't have any additional FS which could cause this.
[ame]http://www.youtube.com/watch?v=orgLNcgzUxM[/ame]
OnPlayerEnterVehicle:
[ame]http://www.youtube.com/watch?v=orgLNcgzUxM[/ame]
OnPlayerEnterVehicle:
pawn Код:
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
GunSafety[playerid] = 6;
if(GetVehicleDriver(vehicleid) != -1 && !ispassenger)
{
if(SeatBelt[GetVehicleDriver(vehicleid)] == 1)
{
PlayerCanMove(playerid,0); PlayerCanMove(playerid,1); return 1;
}
}
if(IsPlayerAttachedObjectSlotUsed(playerid,9) || StretcherStatus[playerid] == 1) { PlayerCanMove(playerid,0); PlayerCanMove(playerid,1); return 1; }
if(CarLocked[vehicleid])
{
if(ispassenger) { PlayerCanMove(playerid,0); PlayerCanMove(playerid,1); }
}
if(IsOwnableCar(vehicleid))
{
new c = CarNr[vehicleid];
if(Cinfo[c][Alarm] == 1 && CarLocked[vehicleid])
{
TurnAlarm(vehicleid,1);
KillTimerExs(AlarmTimer[c]);
AlarmTimer[c] = SetTimerEx("TurnAlarm",120*1000,0,"ii",vehicleid,0);
return 1;
}
if(IsOwnerOfCar(playerid,vehicleid) && Cinfo[c][Imp] == 1) { Cinfo[c][Imp] = 0; SaveCarStat(c,"Imp",Cinfo[c][Imp]); }
}
SetPlayerArmedWeapon(playerid,0);
new cars[24];
format(cars,sizeof(cars),"~w~%s",VehicleNames[GetVehicleModel(vehicleid)-400]);
GameTextForPlayer(playerid,cars, 3000, 1);
return 1;
}