Scripting help
#6

ohh sorry :

Код:
public FixAllCar()
{
        for(new playerid = 0; playerid < MAX_PLAYERS; playerid++)
        // loop all possible player
        {
                if(IsPlayerConnected(playerid) && IsPlayerInAnyVehicle(playerid) && AutoFix[playerid] == 1)
                //if the player is connected AND in a car
                {
                        new vehicleid = GetPlayerVehicleID(playerid);// gettin the vehicle id
                        SetVehicleHealth(vehicleid,1000.0);// set the vehicle health
                }
        }
}

public OnVehicleDamageStatusUpdate(vehicleid, playerid)
{
    #pragma unused playerid
	if (AutoFix[playerid] == 1)
	{
	    new panels, doors, lights, tires;
	    GetVehicleDamageStatus(vehicleid, panels, doors, lights, tires);
	    tires = encode_tires(0, 0, 0, 0); // fix all tires
	    panels = encode_panels(0, 0, 0, 0, 0, 0, 0); // fix all panels //fell off - (3, 3, 3, 3, 3, 3, 3)
	    doors = encode_doors(0, 0, 0, 0, 0, 0); // fix all doors //fell off - (4, 4, 4, 4, 0, 0)
	    lights = encode_lights(0, 0, 0, 0); // fix all lights
	    UpdateVehicleDamageStatus(vehicleid, panels, doors, lights, tires);
	}
    return 1;
}
Reply


Messages In This Thread
Scripting help - by kirostar - 30.06.2014, 23:33
Re: Scripting help - by ikkentim - 30.06.2014, 23:41
Re : Scripting help - by Clad - 30.06.2014, 23:44
Re: Scripting help - by kirostar - 30.06.2014, 23:47
Re : Scripting help - by Clad - 30.06.2014, 23:52
Re: Scripting help - by kirostar - 30.06.2014, 23:54
Re : Scripting help - by Clad - 30.06.2014, 23:57
Re: Re : Scripting help - by xo - 01.07.2014, 00:24

Forum Jump:


Users browsing this thread: 3 Guest(s)