I need help here guy's
#5

This is CMD. Tell me if it is not working
PHP код:
CMD:settempusa(playerid,params[])
{
    if(
PlayerInfo[playerid][LoggedIn] == 1)
    {
            if(
PlayerInfo[playerid][USA] < 7)
            {
                
ShowPlayerDialog(playerid5DIALOG_STYLE_MSGBOX"ERROR""You must be at least Urban Squads Chief Executive Officer to use this command""OK""");
                return 
1;
            }
            if(
PlayerInfo[playerid][USB] < 7)
            {
                
ShowPlayerDialog(playerid5DIALOG_STYLE_MSGBOX"ERROR""You must be at least Urban Squads Chief Executive Officer to use this command""OK""");
                return 
1;
            }
            if(
PlayerInfo[playerid][USC] < 7)
            {
                
ShowPlayerDialog(playerid5DIALOG_STYLE_MSGBOX"ERROR""You must be at least Urban Squads Chief Executive Officer to use this command""OK""");
                return 
1;
            }
            if(
PlayerInfo[playerid][USD] < 7)
            {
                
ShowPlayerDialog(playerid5DIALOG_STYLE_MSGBOX"ERROR""You must be at least Urban Squads Chief Executive Officer to use this command""OK""");
                return 
1;
            }
            new 
tmp[128], tmp2[128], Index;
            
tmp strtok(params,Index), tmp2 strtok(params,Index);
            if(
isnull(params))
            {
                
SendClientMessage(playerid0xFF0000AA"USAGE: /settempusa [id] [rank]")
            }
            &&
            
SendClientMessage(playeridorange"FUNCTION: Will set temporary Branch A Level of US for the Specific Player");
            new 
player1levelplayername[MAX_PLAYER_NAME], adminname[MAX_PLAYER_NAME], string[128];
            
player1 strval(tmp);
            if(
isnull(tmp2))
            {
                
SendClientMessage(playerid0xFF0000AA"USAGE: /settempusa [id] [rank]")
                return 
1;
            }
            &&
            
SendClientMessage(playeridorange"FUNCTION: Will set temporary Urban Squads Branch A rank for a specific player");
            
level strval(tmp2);

            if(
IsPlayerConnected(player1) && player1 != INVALID_PLAYER_ID)
            {
                if(
PlayerInfo[player1][LoggedIn] == 1)
                {
                    if(
level )
                    }
                        
SendClientMessage(playerid,0xFF0000AA,"ERROR: Max Temporary US rank is 4");
                        return 
1;
                    {
                    if(
level == PlayerInfo[player1][USA]) return SendClientMessage(playerid,0xFF0000AA,"ERROR: Player already has this US rank");
                    
GetPlayerName(player1playernamesizeof(playername)); GetPlayerName(playeridadminnamesizeof(adminname));
                    new 
year,month,day;   getdate(yearmonthday); new hour,minute,secondgettime(hour,minute,second);
                    if(
level 0format(string,sizeof(string),"%s has set your Ubran Squads Branch A status to rank %d",adminnamelevel);
                    else 
format(string,sizeof(string),"%s has set your Urban Squads Branch A Status to rank %d",adminnamelevel);
                    
SendClientMessage(player1,0x00FFFFAA,string);
                    if(
level PlayerInfo[player1][USA]) GameTextForPlayer(player1,"~g~URBAN SQUADS TEMPORARY RANK UP"20003);
                    else 
GameTextForPlayer(player1,"~r~UBRAN SQUADS TEMPORARY RANK DOWN"20003);
                    
format(string,sizeof(string),"You have set %s's Urban Squads Branch A temporary rank to %d on %d/%d/%d at %d:%d:%d"playernameleveldaymonthyearhourminutesecond); SendClientMessage(playerid,0x00FFFFAA,string);
                    
format(string,sizeof(string),"%s has set %s's Urban Squads Branch A temporary rank to %d on %d/%d/%d at %d:%d:%d",adminnameplayernameleveldaymonthyearhourminutesecond);
                    
PlayerInfo[player1][USA] = level;
                    return 
PlayerPlaySound(player1,1057,0.0,0.0,0.0);
                }
                else
                {
                    
SendClientMessage(playerid,0xFF0000AA,"ERROR: Player must be registered and logged in to be set temporarily as Urban Squads member");
                    return 
1;
                }
            }
            else
            {
                
SendClientMessage(playerid0xFF0000AA"Player is not connected");
                return 
1;
            }
    }
    else
    {
        
SendClientMessage(playerid,0xFF0000AA,"ERROR: You must be logged in to use this commands");
        return 
1;
    }

Reply


Messages In This Thread
. - by alatraga - 01.06.2016, 19:23
Re: I need help here guy's - by alatraga - 01.06.2016, 19:33
Re: I need help here guy's - by Micko123 - 01.06.2016, 19:34
Re: I need help here guy's - by alatraga - 01.06.2016, 19:36
Re: I need help here guy's - by Micko123 - 01.06.2016, 19:46
Re: I need help here guy's - by alatraga - 01.06.2016, 19:49
Re: I need help here guy's - by Micko123 - 01.06.2016, 19:49
Re: I need help here guy's - by Stinged - 01.06.2016, 19:53
Re: I need help here guy's - by Micko123 - 01.06.2016, 19:54
Re: I need help here guy's - by alatraga - 01.06.2016, 22:40

Forum Jump:


Users browsing this thread: 2 Guest(s)