28.08.2013, 18:12
Well 'your own mind' overlooked some mistakes:
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:
That only sets the pVip to yourself. change it to:
pawn Код:
format (string, sizeof (string),"{FF0000}[Administrator command]:{FAF5F5}you have promote %s to vip player!",GetPlayerNameEx(id));
SendClientMessage(playerid,-1,string);
pawn Код:
PlayerInfo[playerid][pVip] = 1;
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;
}