02.09.2010, 12:50
I tried to create my own /healall command which is only available for the owner to use, everything works okay except it only heals myself and not everyone else: BTW its in ZCMD
pawn Код:
CMD:healall(playerid,params[])
{
if(Logged[playerid] == 0) return SendClientMessage(playerid,LIGHTBLUE,"You are not logged in");
if(PlayerInfo[playerid][Owner] == 0 ) return SendClientMessage(playerid,LIGHTBLUE,"Only the owner can use this command");
for (new i=0; i<MAX_PLAYERS; i++)
{
if (IsPlayerConnected(i))
{
new str[51], name[MAX_PLAYER_NAME];
GetPlayerName(playerid,name,sizeof(name));
format(str,sizeof(str),"Admin %s has healed you all!",name);
SendClientMessage(i,LIMEGREEN,str);
SetPlayerHealth(i,100);
return 1;
}
}
return 1;
}