/makeadmin help
#4

sorry i didn't read cmd complete !
firstly, are you using this?
pawn Код:
enum PlayerInfo
{
    Adminlevel
}
new pInfo[MAX_PLAYERS][PlayerInfo];
use Zcmd is better than Str
pawn Код:
#include <zcmd>

also define
#include <streamer>
#include <sscanf>
and use this
pawn Код:
CMD:makeadmin(playerid, params[])
{
    new id, level, string[128], string2[128], name[MAX_PLAYER_NAME], name2[MAX_PLAYER_NAME];

    if(pInfo[playerid][Adminlevel] < 5) return SendClientMessage(playerid, -1, "Nono:You don't have the required level to execute this command");
    if(sscanf(params, "ud", id, level)) return SendClientMessage(playerid, -1, "Nana: use /makeadmin [PartOfName/ID] [level]");
    if(id == INVALID_PLAYER_ID) return SendClientMessage(playerid, -1, "No: That ID isn't connected");
    else
    {
        GetPlayerName(playerid, name, sizeof(name));
        GetPlayerName(id, name2, sizeof(name2));

        pInfo[id][Adminlevel] = level;

        format(string, sizeof(string), "Admin %s has promoted you to admin level %d", name, level);
        format(string2, sizeof(string2), "You have promoted %s to admin level %d", name2, level);

        SendClientMessage(id, -1, string);
        SendClientMessage(playerid, -1, string2);
    }
    return true;
}
i'm sorry if you don't understand me
also
tell me if works
Reply


Messages In This Thread
/makeadmin help - by Alex_Obando - 26.09.2013, 04:01
Respuesta: /makeadmin help - by RafaelZam - 26.09.2013, 04:17
Respuesta: /makeadmin help - by Alex_Obando - 26.09.2013, 04:22
Respuesta: /makeadmin help - by RafaelZam - 26.09.2013, 04:35
Respuesta: /makeadmin help - by Alex_Obando - 26.09.2013, 04:40
Respuesta: /makeadmin help - by RafaelZam - 26.09.2013, 04:48
Respuesta: /makeadmin help - by Alex_Obando - 26.09.2013, 04:53
Respuesta: /makeadmin help - by RafaelZam - 26.09.2013, 04:58
Respuesta: /makeadmin help - by Alex_Obando - 26.09.2013, 05:03
Respuesta: /makeadmin help - by RafaelZam - 26.09.2013, 05:13

Forum Jump:


Users browsing this thread: 1 Guest(s)