dcmd - akill problem
#1

I need help with this

i probably did something wrong with this >_<

pawn Код:
dcmd_akill(playerid, params[])
{
    if(PlayerInfo[playerid][AdminLevel] > 3)
    {
        new string[100];
        format(string, sizeof(string), "You must be administrator level 3 to use that command!");
        return SendClientMessage(playerid, COLOR_ORANGE, string);
    }
    else if(!strlen(params))
        return SendClientMessage(playerid, COLOR_ORANGE, "USAGE: /akill [id | name]");
    else
    {
    new pName;
    new id = (isNumeric(params)) ? strval(params) : GetPlayerId(params);
    if(IsPlayerConnected(id) && id != playerid)
    {
        SetPlayerHealth(id, 0.0);
        new string[128];
        format(string, sizeof(string), "You have been admin-killed by administrator %s", pName);
        SendClientMessage(id, COLOR_ORANGE, string);
        format(string, sizeof(string), "You have successfully admin-killed player %s", pName);
        return SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
    }
    else
        return SendClientMessage(playerid, COLOR_ORANGE, "ERROR: You can not admin-kill yourself or a disconnected player.");
    }
}
Reply


Messages In This Thread
dcmd - akill problem - by jonnyboy - 03.05.2011, 15:52
Re: dcmd - akill problem - by jonnyboy - 03.05.2011, 15:55
Re: dcmd - akill problem - by [S]trong - 03.05.2011, 15:58
Re: dcmd - akill problem - by jonnyboy - 03.05.2011, 16:04
Re: dcmd - akill problem - by Sinner - 03.05.2011, 16:20
Re: dcmd - akill problem - by jonnyboy - 03.05.2011, 16:23

Forum Jump:


Users browsing this thread: 1 Guest(s)