Command not working?
#2

PHP код:
CMD:setvip(playerid,params[])
{
    new 
level ,id;
    if(!
IsPlayerAdmin(playerid) && PlayerInfo[playerid][AdminLevel] < 5) return 0;
    
    if(
sscanf(params"ui"idlevel)) return SendClientMessage(playeridCOLOR_RED"USAGE: /setvip [playerid] [level(0-1]");
    if(!
IsPlayerConnected(id)) return SendClientMessage(playerid,COLOR_GREY,"You have entered an incorrect ID");
    if(
level || level 1) return SendClientMessage(playeridCOLOR_RED"Level must be between 0 and 1!");
    
    new 
str[128];
    
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;

Reply


Messages In This Thread
Command not working? - by kalanerik99 - 19.10.2015, 10:26
Re: Command not working? - by Sellize - 19.10.2015, 10:30
Re: Command not working? - by kalanerik99 - 19.10.2015, 10:34
Re: Command not working? - by kalanerik99 - 19.10.2015, 10:36

Forum Jump:


Users browsing this thread: 1 Guest(s)