13.07.2012, 13:01
did here %s = amount??
Quote:
COMMAND: sethealth(playerid, params[]) { new pID, aName[MAX_PLAYER_NAME], pName[MAX_PLAYER_NAME],Amount[128], string[256]; if (IsPlayerAdmin(playerid)) if(sscanf(params,"us",pID, Amount)) return SendClientMessage(playerid,COLOR_WHITE,"[CMD]:/sethealth [PlayerID] [Amount]"); else if (pID==INVALID_PLAYER_ID)SendClientMessage(playerid ,COLOR_BRIGHTRED,"[ERROR]:Player not Found!"); else { GetPlayerName(playerid,aName,sizeof(aName)); GetPlayerName(pID,pName,sizeof(pName)); format(string, sizeof(string),"Admin Has Healed You",aName, pName, Amount); SendClientMessage(playerid,COLOR_BRIGHTRED,string) ; SetPlayerHealth(pID,%s); } else return SendClientMessage(playerid, COLOR_BRIGHTRED, "[ERROR]:You need to be an Admin to Access this Commands!"); return 1; } |