Help CMD repair
#6

PHP код:
CMD:ripara(playeridparams[])
{
    new 
id=GetPlayerVehicleID(playerid);
    if(
PlayerToPoint(6.0playerid992.987121,-1659.088134,14.559866) || PlayerToPoint(6.0playerid992.834289,-1650.768920,14.559599) && IsPlayerInAnyVehicle(playerid))
    {
        new 
Float:health;
        new 
str[128];
        new 
Float:vh GetVehicleHealth(id,health); // pasta pizza bambino, you don't need here to create a new Float:vh as you've already retrieved the vehicle's health on the variable health.
        
new vhealth floatround(vhfloatround_round); // pasta pizza bambino, you need to change vh for health again here
        
new totale 999-vhealth;
        
RepairVehicle(id);
        
format(str,sizeof(str),"Hai riparato il tuo veicolo per %i"totale);
        
SCM(playeridINFOstr);
        
GivePlayerMoney(playerid, -totale);
        
SetVehicleHealth(id999.0);
        
VeicoloInfo[(id)][vVita] = 999.0;
        
Salvaveh((id));
        
Salvataggio(playerid);
    }
    return 
1;

Cappicci? Capecci? Capitzie? Pepperoni?

So, instead of the lines I pointed out up there, they should look like this:

Код:
        GetVehicleHealth(id,health);
        new vhealth = floatround(health);
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: 4 Guest(s)