Help CMD repair
#1

Код:
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;
}
Why pay 998 ALWAYS? Whatever the life of the vehicle?
Reply


Messages In This Thread
Help CMD repair - by AlexPalermitano97 - 16.03.2017, 17:43
Re: Help CMD repair - by GoldenLion - 16.03.2017, 18:13
Re: Help CMD repair - by AlexPalermitano97 - 16.03.2017, 19:06
Re: Help CMD repair - by RyderX - 16.03.2017, 19:09
Re: Help CMD repair - by Bolex_ - 16.03.2017, 19:11
Re: Help CMD repair - by Toroi - 16.03.2017, 19:24
Re: Help CMD repair - by AlexPalermitano97 - 16.03.2017, 19:25
Re: Help CMD repair - by Toroi - 16.03.2017, 19:28
Re: Help CMD repair - by AlexPalermitano97 - 16.03.2017, 19:59
Re: Help CMD repair - by AlexPalermitano97 - 16.03.2017, 20:02

Forum Jump:


Users browsing this thread: 3 Guest(s)