HealAll Command
#2

Here's a quick example. You could change the IsInDM to the variable you have in your script

pawn Код:
dcmd_healall(playerid,params[])
{
    #pragma unused params
    if(AccInfo[playerid][Level] < 2) return ErrorMessages(playerid, 6);
   
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
        if(!IsPlayerConnected(i) && (i != playerid) && i != ServerInfo[MaxAdminLevel]) continue;
       
        if(IsInDM[i] == 1)
        {
            // do nothing, returns 0.
            return false;
        }
        else
        {
            PlayerPlaySound(i, 1057,0.0,0.0,0.0 );
            SetPlayerHealth(i, 100.0 );
        }
    }
    new
        string[ 128 ] ;

    format(string,sizeof(string),"{00FFFF}Administrator \"%s\" has healed all players , Except In DM Places !", pName(playerid));
    SendClientMessageToAll(blue, string);

    return SendCommandToAdmins(playerid,"HealAll");
}
Reply


Messages In This Thread
HealAll Command - by MahdiGames - 23.12.2013, 12:23
Re: HealAll Command - by Patrick - 23.12.2013, 12:30
Re: HealAll Command - by [EnErGyS]KING - 23.12.2013, 12:32
Re: HealAll Command - by Konstantinos - 23.12.2013, 12:35
Re: HealAll Command - by [EnErGyS]KING - 23.12.2013, 12:50

Forum Jump:


Users browsing this thread: 4 Guest(s)