Command doesn't work
#8

PHP код:
if(!strcmp(cmdtext"/makeadmin"true))
{
    new 
player[MAX_PLAYER_NAME], giveplayer[MAX_PLAYER_NAME], levelgiveplayerid;
    if(
IsPlayerAdmin(playerid))
    {
        if(!
sscanf(params,"ud",giveplayer,level))
        {
            if(
giveplayerid != INVALID_PLAYER_ID)
            {
                
GetPlayerName(giveplayeridgiveplayersizeof(giveplayer));
                
GetPlayerName(playeridplayersizeof(player));
                
PlayerInfo[giveplayerid][AdminLvl] = level;
                
printf("Admin %s made %s a level %d admin."playergiveplayerlevel);
                
format(stringsizeof(string), "You are now an administrator level %d thanks to %s."level,  player);
                
SendClientMessage(giveplayerid0x00C2ECFFstring);
                
format(stringsizeof(string), "You have given %s level %d admin.",  giveplayer,PlayerInfo[giveplayerid][AdminLvl]);
                
SendClientMessage(playerid0x00C2ECFFstring);
            }
            else
            {
                
format(stringsizeof(string), "%i is not an active player."giveplayerid);
                
SendClientMessage(playerid0xE60000FFstring);
                return 
1;
            }
        }
        else
        {
            
SendClientMessage(playeridCrvena"USAGE: /makeadmin [playerid] [level]");
            
SendClientMessage(playeridCrvena"FUNCTION: Player will be an admin.");
            return 
1;
        }
    }
    else 
SendClientMessage(playerid0xE60000FF"You are not a lead admin!");
    return 
1;

Reply


Messages In This Thread
HELP pls ! Command problem. - by .sparkY - 16.11.2010, 09:50
Re: Command doesn't work - by Dj_maryo1993 - 16.11.2010, 10:17
Re: Command doesn't work - by .sparkY - 16.11.2010, 10:47
Re: Command doesn't work - by iggy1 - 16.11.2010, 10:57
Re: Command doesn't work - by .sparkY - 16.11.2010, 11:20
Re: Command doesn't work - by .sparkY - 16.11.2010, 11:59
Re: Command doesn't work - by .sparkY - 16.11.2010, 19:00
Re: Command doesn't work - by Kidemo - 16.11.2010, 19:03
Re: Command doesn't work - by .sparkY - 16.11.2010, 19:37
Re: Command doesn't work - by .sparkY - 17.11.2010, 14:14

Forum Jump:


Users browsing this thread: 1 Guest(s)