Help autofix command
#5

Don't use OnPlayerUpdate

Код:
public OnPlayerWeaponShot(playerid, weaponid, hittype, hitid, Float:fX, Float:fY, Float:fZ)
{
    if(hittype == BULLET_HIT_TYPE_VEHICLE)
    {
        new p = GetVehicleOwner(vehicleid);
		if(IsPlayerConnected(p) && AutoFix[p] == 1)
		{
			RepairVehicle(p);
		}
    }
    return 1;
}

public GetVehicleOwner(vehicleid)
{
    for(new i = 0; i < MAX_PLAYERS; i++)
	{
	    if(vehicleid == GetPlayerVehicleID(i) && IsPlayerConnected(i)) return i;
	}
	return -1;
}
Reply


Messages In This Thread
Help autofix command - by Fpwn - 11.10.2017, 06:29
Re: Help autofix command - by Kane - 11.10.2017, 07:04
Re: Help autofix command - by raydx - 11.10.2017, 07:54
Re: Help autofix command - by kAn3 - 11.10.2017, 11:53
Re: Help autofix command - by Kyle - 11.10.2017, 12:03
Re: Help autofix command - by AlamoTR - 11.10.2017, 12:07
Re: Help autofix command - by 0x88 - 11.10.2017, 12:17
Re: Help autofix command - by Kyle - 11.10.2017, 13:18
Re: Help autofix command - by FuNkYTheGreat - 11.10.2017, 13:34
Re: Help autofix command - by Fpwn - 11.10.2017, 17:03

Forum Jump:


Users browsing this thread: 3 Guest(s)