19.10.2015, 10:26
Hello everyone!
I have one problem...
If I am not VIP and I login as admin(RCON) command returns 0
If I wont command to work I have to be vip...
But thats not right...Why this doesn't work
I have one problem...
If I am not VIP and I login as admin(RCON) command returns 0
If I wont command to work I have to be vip...
But thats not right...Why this doesn't work
Код:
if(!IsPlayerAdmin(playerid) || PlayerInfo[playerid][AdminLevel] < 5) return 0;
PHP код:
CMD:setvip(playerid,params[])
{
new level,id;
if(!IsPlayerAdmin(playerid) || PlayerInfo[playerid][AdminLevel] < 5) return 0;
else
if(!IsPlayerConnected(id))return SendClientMessage(playerid,COLOR_GREY,"You have entered an incorrect ID");
if(sscanf(params, "ui", id, level)) return SendClientMessage(playerid, COLOR_RED, "USAGE: /setvip [playerid] [level(0-1]");
if(level < 0 || level > 1) return SendClientMessage(playerid, COLOR_RED, "Level must be between 0 and 1!");
new str[512];
PlayerInfo[id][VIP] = level;
dini_IntSet(UserPath(id),"VIP",level);
format(str,sizeof(str),""COL_RED"Admin %s "COL_ORANGE"have has given "COL_RED"VIP "COL_ORANGE"status to "COL_LIGHTBLUE"%s",PlayerName(playerid),PlayerName(id));
SendClientMessageToAll(COLOR_LIGHTBLUE,str);
return 1;
}