Quote:
Originally Posted by zT KiNgKoNg
Hey Gabi, here you go (Note: I just threw this together, and cannot say it works (it should); And its 1:10).
Note: The define "IsAdmin" is just me being clean, and I've always preferred this method to clean my code up a little.
pawn Код:
#define IsAdmin(%0,%1) PlayerInfo[%0][pAdmin] >=%1
CMD:healme(playerid, params []) { if(IsAdmin(playerid, 1)) { new Float:SetHealth; if(sscanf(params, "f", SetHealth)) return // USAGE MESSAGE EG SendClientMessage(playerid, 0xFFFFFFFF, "[Usage]: /healme [amount]"); if(SetHealth < 1 || SetHealth > 100) return // ERROR MESSAGE EG SendClientMessage(playerid, 0xFFFFFFFF, "[ERROR]: The value cannot be above 100 or below 1"); SetPlayerHealth(playerid, SetHealth); } else // Error message here return true; }
You are aware that there's 312 skins not 308.
|
I have only modified to fix his problem