Set Admin Level command
#9

PHP код:
if(strcmp(cmd"/makeadmin"true) == 0
    { 
        if(
IsPlayerConnected(playerid)) 
        { 
            if(
PlayerInfo[playerid][pAdmin] >= 99998
            { 
                new 
idx
                
tmp strtok(cmdtextidx); 
                if(!
strlen(tmp)) 
                { 
                    
SendClientMessage(playeridCOLOR_GRAD2"USAGE: /makeadmin [playerid/PartOfName] [level]"); 
                    return 
1
                } 
                new 
para1
                new 
level
                new 
tmp[256]; 
                new 
giveplayer[MAX_PLAYER_NAME]; 
                
para1 ReturnUser(tmp); 
                
tmp strtok(cmdtextidx); 
                
level strval(tmp); 
                if(
IsPlayerConnected(para1)) 
                { 
                    if(
para1 != INVALID_PLAYER_ID
                    { 
                        
GetPlayerName(para1giveplayersizeof(giveplayer)); 
                        
GetPlayerName(playeridsendernamesizeof(sendername)); 
                        
PlayerInfo[para1][pAdmin] = level
                        
printf("Info: %s has promoted %s to a level %d admin."sendernamegiveplayerlevel); 
                        
format(stringsizeof(string), "   You have been promoted to a level %d admin by %s"levelsendername); 
                        
SendClientMessage(para1COLOR_LIGHTBLUEstring); 
                        
format(stringsizeof(string), "   You have promoted %s to a level %d admin."giveplayer,level); 
                        
SendClientMessage(playeridCOLOR_LIGHTBLUEstring); 
                    } 
                } 
            } 
        } 
        return 
1
    } 
Please this should work
Reply


Messages In This Thread
Set Admin Level command - by IvancheBG - 16.09.2012, 08:46
Re: Set Admin Level command - by BadgerLedger - 16.09.2012, 09:18
Re: Set Admin Level command - by Sig Hansen - 16.09.2012, 09:24
Re: Set Admin Level command - by IvancheBG - 16.09.2012, 09:45
AW: Set Admin Level command - by BiosMarcel - 16.09.2012, 09:49
Re: AW: Set Admin Level command - by clarencecuzz - 16.09.2012, 09:52
AW: Set Admin Level command - by BiosMarcel - 16.09.2012, 09:53
Re: Set Admin Level command - by IvancheBG - 16.09.2012, 09:55
AW: Set Admin Level command - by BiosMarcel - 16.09.2012, 09:56
Re: Set Admin Level command - by IvancheBG - 16.09.2012, 09:58

Forum Jump:


Users browsing this thread: 1 Guest(s)