13.07.2014, 14:21
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;
}