CMD HELP !!!!
#1

Hi my cmd are full of bugs and why idk

codes
PHP код:
CMD:DoCdiv(playerid, params[])
{
    if(
PlayerInfo[playerid][pMember] == 3 && PlayerInfo[playerid][pRank] >= 5)
    {
        new 
string[128], giveplayerid, division;
        if(
sscanf(params, "ud", giveplayerid, division))
        {
            
SendClientMessageEx(playerid, COLOR_WHITE, "USAGE: /DoCdiv [playerid] [division]");
            
SendClientMessageEx(playerid, COLOR_GRAD2, "Available division names: 0 (None), 1 (HR), 2 (GU), 3 (PTR), 4 (SO)");
            return 
1;
        }
        if(
IsPlayerConnected(giveplayerid))
        {
            if(
PlayerInfo[playerid][pMember] == 3 && PlayerInfo[playerid][pRank] >= 5)
            {
                if(
division == 0)
                {
                    if (
PlayerInfo[giveplayerid][pMember] == 3)
                    {
                        
PlayerInfo[giveplayerid][pDivision] = 0;
                        
format(string, sizeof(string), "You have been kicked from your division by %s.", GetPlayerNameEx(playerid));
                        
SendClientMessageEx(giveplayerid, COLOR_LIGHTBLUE, string);
                        
format(string, sizeof(string), "You have kicked %s out of their division.", GetPlayerNameEx(giveplayerid));
                        
SendClientMessageEx(playerid, COLOR_LIGHTBLUE, string);
                    }
                }
                else if(
division == 1)
                {
                    if (
PlayerInfo[giveplayerid][pMember] == 3)
                    {
                        
PlayerInfo[giveplayerid][pDivision] = 1;
                        
format(string, sizeof(string), "You are now in the Human Resources division, invited by %s.", GetPlayerNameEx(playerid));
                        
SendClientMessageEx(giveplayerid, COLOR_LIGHTBLUE, string);
                        
format(string, sizeof(string), "You have invited %s to join the Human Resources division.", GetPlayerNameEx(giveplayerid));
                        
SendClientMessageEx(playerid, COLOR_LIGHTBLUE, string);
                    }
                }
                else if(
division == 2)
                {
                    if (
PlayerInfo[giveplayerid][pMember] == 3)
                    {
                        
PlayerInfo[giveplayerid][pDivision] = 2;
                        
format(string, sizeof(string), "You are now in the Gang Unit, invited by %s.", GetPlayerNameEx(playerid));
                        
SendClientMessageEx(giveplayerid, COLOR_LIGHTBLUE, string);
                        
format(string, sizeof(string), "You have invited %s to join the Gang Unit division.", GetPlayerNameEx(giveplayerid));
                        
SendClientMessageEx(playerid, COLOR_LIGHTBLUE, string);
                    }
                }
                else if(
division == 3)
                {
                    if (
PlayerInfo[giveplayerid][pMember] == 3)
                    {
                        
PlayerInfo[giveplayerid][pDivision] = 3;
                        
format(string, sizeof(string), "You are now in the Prisoner Transport division, invited by %s.", GetPlayerNameEx(playerid));
                        
SendClientMessageEx(giveplayerid, COLOR_LIGHTBLUE, string);
                        
format(string, sizeof(string), "You have invited %s to join the Prisoner Transport division.", GetPlayerNameEx(giveplayerid));
                        
SendClientMessageEx(playerid, COLOR_LIGHTBLUE, string);
                    }
                }
                else if(
division == 4)
                {
                    if (
PlayerInfo[giveplayerid][pMember] == 3)
                    {
                        
PlayerInfo[giveplayerid][pDivision] = 4;
                        
format(string, sizeof(string), "You are now in the Special Operations division, invited by %s.", GetPlayerNameEx(playerid));
                        
SendClientMessageEx(giveplayerid, COLOR_LIGHTBLUE, string);
                        
format(string, sizeof(string), "You have invited %s to join the Special Operations division.", GetPlayerNameEx(giveplayerid));
                        
SendClientMessageEx(playerid, COLOR_LIGHTBLUE, string);
                    }
                }
            }
        }
        else
        {
            
SendClientMessageEx(playerid, COLOR_GRAD1, "You are not authorized to use that command - only R5+ can do this.");
        }
    }
    return 
1;
} 
2

PHP код:
CMD:DoC(playerid, params[])
{
    if(
PlayerInfo[playerid][pMember] == 3 || PlayerInfo[playerid][pLeader] == 3)
     {
          if(
IsPlayerInRangeOfPoint(playerid, 4.0, 293.675415, 188.238296, 1007.171875+0.6))
        {
             
ShowPlayerDialog(playerid, DIALOG_DoC, DIALOG_STYLE_LIST, "DoC: Lockers", "Toggle Duty\nEquipment\nClothing Selection\nClear Suspect", "Proceed", "Cancel");
         }
          else
        {
              
SendClientMessageEx(playerid, COLOR_WHITE, "You aren't in range of your DoC lockers.");
              return 
1;
         }
      }
    return 
1;
} 
3
PHP код:
CMD:SASP(playerid, params[])
{
    if(
PlayerInfo[playerid][pMember] == 7 || PlayerInfo[playerid][pLeader] == 7)
     {
          if(
IsPlayerInRangeOfPoint(playerid, 4.0, 2525.9009,-1655.4312,562.8000) || IsPlayerInRangeOfPoint(playerid, 4.0, 327.05, 306.81, 999.14+0.6))
        {
             
ShowPlayerDialog(playerid, DIALOG_SASP, DIALOG_STYLE_LIST, "SASP: Lockers", "Toggle Duty\nEquipment\nClothing Selection\nClear Suspect", "Proceed", "Cancel");
           }
        else
        {
            
SendClientMessageEx(playerid, COLOR_WHITE, "You aren't in range of your SASP lockers.");
            return 
1;
        }
      }
    return 
1;
} 
Please help me
Reply


Messages In This Thread
CMD HELP !!!! - by firemanjv - 15.02.2013, 13:23
Re: CMD HELP !!!! - by bensmart469 - 15.02.2013, 14:10
Re: CMD HELP !!!! - by firemanjv - 16.02.2013, 10:33
Re: CMD HELP !!!! - by [TC]XxJuggaloxX - 16.02.2013, 12:15
Re: CMD HELP !!!! - by firemanjv - 20.02.2013, 16:46
Re: CMD HELP !!!! - by firemanjv - 21.02.2013, 08:22
Re: CMD HELP !!!! - by PabloDiCostanzo - 21.02.2013, 08:48
Re: CMD HELP !!!! - by firemanjv - 23.02.2013, 11:24
Re: CMD HELP !!!! - by firemanjv - 23.02.2013, 17:04
Re: CMD HELP !!!! - by firemanjv - 24.02.2013, 12:27
Re: CMD HELP !!!! - by Da_Noob - 24.02.2013, 12:34
Re: CMD HELP !!!! - by firemanjv - 24.02.2013, 13:00
Re: CMD HELP !!!! - by RajatPawar - 24.02.2013, 13:32
Re: CMD HELP !!!! - by Aarab - 24.02.2013, 13:35
Re: CMD HELP !!!! - by firemanjv - 24.02.2013, 13:51

Forum Jump:


Users browsing this thread: 1 Guest(s)