Help in changing commands!
#1

Hey help me!

Im trying to change some commands like /lspd to /lapd and /lspddiv to /lapddiv but when i changed it, and entereed in game.. when i press /lapd or /lspd or /lapddiv and /lspddiv none of them work. it says

"UnknowN Command"
Reply
#2

Can I see your code?
Reply
#3

PHP код:
CMD:lapddiv(playeridparams[])
{
    if(
IsACop(playerid))
    {
        new 
string[128], giveplayeriddivision;
        if(
sscanf(params"ud"giveplayeriddivision))
        {
            
SendClientMessageEx(playeridCOLOR_WHITE"USAGE: /lapddiv [playerid] [division]");
            
SendClientMessageEx(playeridCOLOR_GRAD2"Available division names: 1 (None), 2 (II), 3 (FTO), 4 (IA), 5 (SWAT)");
            return 
1;
        }
        if (
PlayerInfo[playerid][pRank] >= 4)
        {
            if(
IsPlayerConnected(giveplayerid))
            {
                if(
PlayerInfo[playerid][pMember] == 1)
                {
                    if(
division == 3)
                    {
                        
PlayerInfo[giveplayerid][pDivision] = 3;
                        
format(stringsizeof(string), "You are now in the FTO division, invited by %s."GetPlayerNameEx(playerid));
                        
SendClientMessageEx(giveplayeridCOLOR_LIGHTBLUEstring);
                        
format(stringsizeof(string), "You have invited %s into the FTO division."GetPlayerNameEx(giveplayerid));
                        
SendClientMessageEx(playeridCOLOR_LIGHTBLUEstring);
                    }
                    else if(
division == 2)
                    {
                        
PlayerInfo[giveplayerid][pDivision] = 2;
                        
format(stringsizeof(string), "You are now in the II division, invited by %s."GetPlayerNameEx(playerid));
                        
SendClientMessageEx(giveplayeridCOLOR_LIGHTBLUEstring);
                        
format(stringsizeof(string), "You have invited %s to join the II division."GetPlayerNameEx(giveplayerid));
                        
SendClientMessageEx(playeridCOLOR_LIGHTBLUEstring);
                    }
                    else if(
division == 4)
                    {
                        
PlayerInfo[giveplayerid][pDivision] = 4;
                        
format(stringsizeof(string), "You are now in the IA division, invited by %s."GetPlayerNameEx(playerid));
                        
SendClientMessageEx(giveplayeridCOLOR_LIGHTBLUEstring);
                        
format(stringsizeof(string), "You have invited %s to join the IA division."GetPlayerNameEx(giveplayerid));
                        
SendClientMessageEx(playeridCOLOR_LIGHTBLUEstring);
                    }
                    else if(
division == 5)
                    {
                        
PlayerInfo[giveplayerid][pDivision] = 5;
                        
format(stringsizeof(string), "You are now in the SWAT division, invited by %s."GetPlayerNameEx(playerid));
                        
SendClientMessageEx(giveplayeridCOLOR_LIGHTBLUEstring);
                        
format(stringsizeof(string), "You have invited %s to join the SWAT division."GetPlayerNameEx(giveplayerid));
                        
SendClientMessageEx(playeridCOLOR_LIGHTBLUEstring);
                    }
                    else if(
division == 1)
                    {
                        
PlayerInfo[giveplayerid][pDivision] = 1;
                        
format(stringsizeof(string), "You have been kicked from your division by %s."GetPlayerNameEx(playerid));
                        
SendClientMessageEx(giveplayeridCOLOR_LIGHTBLUEstring);
                        
format(stringsizeof(string), "You have kicked %s out of their division."GetPlayerNameEx(giveplayerid));
                        
SendClientMessageEx(playeridCOLOR_LIGHTBLUEstring);
                    }
                }
            }
        }
        else
        {
            
SendClientMessageEx(playeridCOLOR_GRAD1"You are not authorized to use that command - only R4+ can do this.");
        }
    }
    return 
1;

Reply
#4

Try at the bottom
PHP код:
    else
        return 
SendClientMessageEx(playeridCOLOR_GRAD1"You're not authorized to use this command!");
    return 
1;

Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)