10.09.2017, 17:16
The upper guy is still wrong by the way. Try this one
The problem was that you were using wrong sscanf parameters, " u " is for getting player id , but you also have " d " which is for a number, but because you don't need it so i removed, and the second problem was that health should've to be a float, and you were using Float, y , z for no reason, now it'll works fine..
Код:
CMD:healup(playerid, params[]) { new victim,Float:health; if(PlayerInfo[playerid][pFaction] != 3) return SCM(playerid, COLOR_LIGHTRED, "You are not a police officer."); if(sscanf(params, "u", victim)) return SendClientMessage(playerid, COLOR_GREY, "/healup (id)"); if(victim == INVALID_PLAYER_ID) return SendClientMessage(playerid, COLOR_LIGHTRED, "That player is not connected."); if (GetDistanceBetweenPlayers(playerid,victim) < 5) { GetPlayerHealth(victim, health); if (health < 40) SetPlayerHealth(victim, 60); } else return SCM(playerid, COLOR_LIGHTRED, "You're not close to that player."); return 1; }