16.03.2017, 17:43
Код:
CMD:ripara(playerid, params[])
{
new id=GetPlayerVehicleID(playerid);
if(PlayerToPoint(6.0, playerid, 992.987121,-1659.088134,14.559866) || PlayerToPoint(6.0, playerid, 992.834289,-1650.768920,14.559599) && IsPlayerInAnyVehicle(playerid))
{
new Float:health;
new str[128];
new Float:vh = GetVehicleHealth(id,health);
new vhealth = floatround(vh, floatround_round);
new totale = 999-vhealth;
RepairVehicle(id);
format(str,sizeof(str),"Hai riparato il tuo veicolo per %i", totale);
SCM(playerid, INFO, str);
GivePlayerMoney(playerid, -totale);
SetVehicleHealth(id, 999.0);
VeicoloInfo[(id)][vVita] = 999.0;
Salvaveh((id));
Salvataggio(playerid);
}
return 1;
}


