Healall cmd wont work [FAST +rep ]
#1

So the problem is
the admin who use the cmd dont got healed
pawn Код:
[COLOR="Red"]here is the code[/COLOR]
dcmd_healall(playerid,params[])
{
    #pragma unused params
    if(AccInfo[playerid][Level] >= 3)
    {
        SendCommandToAdmins(playerid,"HealAll");
        for(new i = 0; i < MAX_PLAYERS; i++)
        {
        if(IsPlayerConnected(i) && (i != playerid) && i != ServerInfo[MaxAdminLevel])
        {
        PlayerPlaySound(i,1057,0.0,0.0,0.0);
        SetPlayerHealth(i,100.0);
        }
        }
        new string[128];
        format(string,sizeof(string),"|- Administrator \"%s\" has Healed all players -|", pName(playerid));
        return SendClientMessageToAll(blue, string);
    }
    else return ErrorMessages(playerid, 6);
}
Reply
#2

Try deleting "&& i != ServerInfo[MaxAdminLevel]"
Reply
#3

Nope. not working your method
btw i fixed it
Reply
#4

try:
PHP код:
dcmd_healall(playerid,params[])
{
    
#pragma unused params
    
if(AccInfo[playerid][Level] >= 3)
    {
        
SendCommandToAdmins(playerid,"HealAll");
           for(new 
0MAX_PLAYERSi++)
        {
            if(
IsPlayerConnected(i)
            {
                if(
ServerInfo[MaxAdminLevel](i)
                {
                    
PlayerPlaySound(i,1057,0.0,0.0,0.0);
                    
SetPlayerHealth(i,100.0);
                }
            }
        }
        new 
string[128];
        
format(string,sizeof(string),"|- Administrator \"%s\" has Healed all players -|"pName(playerid));
        return 
SendClientMessageToAll(bluestring);
    }
    else return 
ErrorMessages(playerid6);

Reply
#5

Like i said up i fixed it
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)