/heal command - Will it work?
#4

Ok this is a sethealth command from my admin system,
But its not that hard to modify into a /heal

pawn Код:
if(strcmp(cmd, "/heal", true) == 0)
{
      tmp = strtok(cmdtext, idx);
        if(!strlen(tmp))
        {
            SendClientMessage(playerid, ORANGE, "USAGE: /sethp [playerid/name] [health]");
            return 1;
        }
        giveplayerid = ReturnUser(tmp);
        tmp = strtok(cmdtext, idx);
        new hp = strval(tmp);
        if (giveplayerid != INVALID_PLAYER_ID)
        {
            if (!strlen(tmp)) return SendClientMessage(playerid, ORANGE, "USAGE: /sethp [playerid/name] [health]");
            SetPlayerHealth(giveplayerid,hp);
            Drugs[giveplayerid] = 0;
            GetPlayerName(playerid, sendername, sizeof(sendername));
        GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
        format(string,sizeof(string),"|- Administrator %s has changed %s's HP. [HP: %d] -|",sendername,giveplayer,hp);
        SendClientMessageToAdmins(COLOR_RED,string,1);
        }
        else
        {
          SendClientMessage(playerid, RED, "Player is not active.");
        }
    }
    return 1;
    }
Reply


Messages In This Thread
/heal command - Will it work? - by Puzi - 29.05.2009, 09:58
Re: /heal command - Will it work? - by JoeDaDude - 29.05.2009, 10:00
Re: /heal command - Will it work? - by Puzi - 29.05.2009, 10:03
Re: /heal command - Will it work? - by JoeDaDude - 29.05.2009, 10:05
Re: /heal command - Will it work? - by Puzi - 29.05.2009, 10:57
Re: /heal command - Will it work? - by Gamer007 - 29.05.2009, 10:58
Re: /heal command - Will it work? - by miokie - 29.05.2009, 11:25
Re: /heal command - Will it work? - by Puzi - 29.05.2009, 11:32
Re: /heal command - Will it work? - by Weirdosport - 29.05.2009, 11:58
Re: /heal command - Will it work? - by zezam321 - 19.11.2009, 20:29

Forum Jump:


Users browsing this thread: 1 Guest(s)