Crap command
#3

Indent your code, please.
pawn Код:
CMD: pinfo(playerid, params[]) {
    if (IsPlayerConnected(playerid)) {
        if (IsSpecing[playerid] == 1) {
            if (isnull(params)) return SendClientMessage(playerid, -1, "Syntax: /pinfo <targetid>");
            if (PlayerInfo[playerid][pAdmin] < 1) return SendClientMessage(playerid, -1, "Your admin leve isn't high enough to use this command.");
            else {
                new Float: pHealth, Float: pArmor;
                new string[24 + MAX_PLAYER_NAME + 1];
                GetPlayerHealth(playerid, pHealth);
                GetPlayerHealth(playerid, pWeapon);
                SendClientMessage(playerid, -1, "Info about player:");
                format(string, sizeof(string), "Health: %.1f", pHealth);
                SendClientMessage(playerid, -1, string);
                format(string, sizeof(string), "Current Weapon ID: %d", GetPlayerWeapon(playerid));
                SendClientMessage(playerid, -1, string);
                format(string, sizeof(string), "Armour: %.1f", pArmour);
                SendClientMessage(playerid, -1, string);
            }
        }
    }
    return 1;
}
Reply


Messages In This Thread
Crap command - by prooftzm - 13.07.2014, 13:58
Re: Crap command - by printer - 13.07.2014, 14:16
Re: Crap command - by greentarch - 13.07.2014, 14:21
Re: Crap command - by prooftzm - 13.07.2014, 14:23

Forum Jump:


Users browsing this thread: 1 Guest(s)