/setadmin command help
#2

Well 'your own mind' overlooked some mistakes:

pawn Код:
format (string, sizeof (string),"{FF0000}[Administrator command]:{FAF5F5}you have promote %s to vip player!",GetPlayerNameEx(id));
    SendClientMessage(playerid,-1,string);
That line will only be shown to yourself. I suggest you make a function which checks if that player is an admin, it will send that message to them. If you want, I will make it for you. Next:

pawn Код:
PlayerInfo[playerid][pVip] = 1;
That only sets the pVip to yourself. change it to:

pawn Код:
PlayerInfo[id][pVip] = 1;

pawn Код:
CMD:setadmin(playerid, params[])
{
    new id, string[126], level;
    if(!IsPlayerAdmin(playerid))return SendClientMessage(playerid, -1, "{FF0000}[ERROR]:{FAF5F5}You are not{FF0000} Administrator {FAF5F5}to use this command");
    if (sscanf(params, "ui", id, level))
    {
    return SendClientMessage(playerid, 0xFF0000AA, "{FF0000}[SYSTEM USAGE]:{FAF5F5}/setadmin [Player ID/Part of name] [level]");
    }
    format (string, sizeof (string),"{FF0000}[Administrator]:{FAF5F5}%s has promote you to admin level %d",GetPlayerNameEx(playerid), level);
    SendClientMessage(id,-1,string);
    format (string, sizeof (string),"{FF0000}[Administrator command]:{FAF5F5}you have promote %s to vip player!",GetPlayerNameEx(id));
    SendClientMessage(playerid,-1,string);
    PlayerInfo[id][pAdminLeve] = level;
    return 1;
}
Reply


Messages In This Thread
/setadmin command help - by SilentSoul - 28.08.2013, 18:00
Re: /setadmin command help - by ProjectMan - 28.08.2013, 18:12
Re: /setadmin command help - by nor15 - 28.08.2013, 18:13
Re: /setadmin command help - by SilentSoul - 28.08.2013, 18:15

Forum Jump:


Users browsing this thread: 6 Guest(s)