Some Questions
#1

found this in some random script

Код:
public OnPlayerUpdate(playerid)
{
    new Float:hp,Float:armour;
    new Float:health;
    new veh = GetPlayerVehicleID(playerid);
    GetPlayerHealth(playerid,hp);
    GetPlayerArmour(playerid,armour);
    GetVehicleHealth(veh, health);

    if(God[playerid] == 1)
    {
        if(hp < 999.0) SetPlayerHealth(playerid, 1000.0);
        if(armour < 999.0) SetPlayerArmour(playerid, 1000.0);
        if(health < 999.0) SetVehicleHealth(veh, 1000.0);
        RepairVehicle(veh);
    }
    else if(God[playerid] == 1) return 1;

    return 1;
}
shouldn't it be like

Код:
public OnPlayerUpdate(playerid)
{
    new Float:hp,Float:armour;
    new Float:health;
    new veh = GetPlayerVehicleID(playerid);
    GetPlayerHealth(playerid,hp);
    GetPlayerArmour(playerid,armour);
    GetVehicleHealth(veh, health);

    if(God[playerid] == 1)
    {
        if(hp < 999.0) SetPlayerHealth(playerid, 1000.0);
        if(armour < 999.0) SetPlayerArmour(playerid, 1000.0);
        if(health < 999.0) SetVehicleHealth(veh, 1000.0);
        RepairVehicle(veh);
    }
    else if(God[playerid] == 0) return 1; //this

    return 1;
}
Reply


Messages In This Thread
Some Questions - by donhu789 - 31.08.2016, 23:59
Re: Some Questions - by Jefff - 01.09.2016, 00:41
Re: Some Questions - by donhu789 - 01.09.2016, 00:45

Forum Jump:


Users browsing this thread: 1 Guest(s)