28.03.2015, 08:04
Код:
IRCCMD:sethealth(botid, channel[], user[], host[], params[]) { if (IRC_IsVoice(botid, channel, user)) { new playerid, Float:amount; //Line 477 if (sscanf(params, "uf", playerid, amount)) return 1; if (IsPlayerConnected(playerid)) { new msg[128], name[MAX_PLAYER_NAME]; GetPlayerName(playerid, name, sizeof(name)); format(msg, sizeof(msg), "%s has set %s health to %.2f", user, name, amount); IRC_GroupSay(groupID, channel, msg); format(msg,sizeof(msg), "%s has set %s health to %.2f", user, name, amount); SendClientMessageToAll(0xDDDD2357, msg); SetPlayerHealth(playerid, amount); //Maybe Correct EDIT: Not working } } return 1; }
Also changed the d inside the sscanf to a 'u', which allows to select playerids by either their id or part of their name.