I need help here guy's
#1

............
Reply
#2

i bet that no One Can Solve This Problem
Reply
#3

You made beginners mistake. You didn't took care of writing beautifull code. It need to be written good in order to work. You have problems in brackets and fix it yourself. Learn it
Reply
#4

Quote:
Originally Posted by Micko123
Посмотреть сообщение
You made beginners mistake. You didn't took care of writing beautifull code. It need to be written good in order to work. You have problems in brackets and fix it yourself. Learn it
Please i need ur help dude i'll really appreciate it
Reply
#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
#6

Yea sure thing Thank u so much
Reply
#7

you have errors or warns?
Reply
#8

Commands have to return something.
Add return 1; at the end.
Reply
#9

@alatraga you have any more errors or warns?
Reply
#10

error 017: undefined symbol "cmd_settempusa" please help
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)