01.09.2009, 15:29
hey i need some help i have a heal command that heals me but i whant one so i can heal other players so could someone help me plz thx for ur time
Originally Posted by ► James_Alex
try this
pawn Код:
|
Originally Posted by ► James_Alex
try this
pawn Код:
Код:
for(new i=0; i < MAX_PLAYERS; i++) { if(IsPlayerConnected(i)) { SetPlayerHealth(i,100.0); SendClientMessageToAll(0xFFFFFFFF,"All players are healed !"); |
dcmd_aheal(playerid,params[]) { if(PlayerData[playerid][Level] >= 1) { new id = (IsNumeric(params)) ? strval(params) : GetPlayerId(params); new playername[MAX_PLAYER_NAME],adminname[MAX_PLAYER_NAME],string[100]; if(!strlen(params)) return ACM(playerid,"[ ! ] Correct usage : /aheal <playerid>"); if(!IsPlayerConnected(id)) return ACM(playerid,"[ ! ] Incorrect playerid !"); if(id == playerid) return LRS(playerid,"[ ! ] You have admin healed your self !"); SetPlayerHealth(playerid,100.0); GetPlayerName(playerid,adminname,sizeof(adminname)); GetPlayerName(playerid,playername,sizeof(playername)); format(string,sizeof(string),"[ ! ] You have admin healed %s(ID:%d)",playername,id); LRS(playerid,string); format(string,sizeof(string),"[ NOTICE ] You have been admin healed by admin %s(ID:%d),",adminname,playerid); SendClientMessage(playerid,COLOUR_YELLOW,string); SetPlayerHealth(id,100.0); } return 1; }