SA-MP Forums Archive
CMD HELP !!!! - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: CMD HELP !!!! (/showthread.php?tid=415949)



CMD HELP !!!! - firemanjv - 15.02.2013

Hi my cmd are full of bugs and why idk

codes
PHP код:
CMD:DoCdiv(playeridparams[])
{
    if(
PlayerInfo[playerid][pMember] == && PlayerInfo[playerid][pRank] >= 5)
    {
        new 
string[128], giveplayeriddivision;
        if(
sscanf(params"ud"giveplayeriddivision))
        {
            
SendClientMessageEx(playeridCOLOR_WHITE"USAGE: /DoCdiv [playerid] [division]");
            
SendClientMessageEx(playeridCOLOR_GRAD2"Available division names: 0 (None), 1 (HR), 2 (GU), 3 (PTR), 4 (SO)");
            return 
1;
        }
        if(
IsPlayerConnected(giveplayerid))
        {
            if(
PlayerInfo[playerid][pMember] == && PlayerInfo[playerid][pRank] >= 5)
            {
                if(
division == 0)
                {
                    if (
PlayerInfo[giveplayerid][pMember] == 3)
                    {
                        
PlayerInfo[giveplayerid][pDivision] = 0;
                        
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 if(
division == 1)
                {
                    if (
PlayerInfo[giveplayerid][pMember] == 3)
                    {
                        
PlayerInfo[giveplayerid][pDivision] = 1;
                        
format(stringsizeof(string), "You are now in the Human Resources division, invited by %s."GetPlayerNameEx(playerid));
                        
SendClientMessageEx(giveplayeridCOLOR_LIGHTBLUEstring);
                        
format(stringsizeof(string), "You have invited %s to join the Human Resources division."GetPlayerNameEx(giveplayerid));
                        
SendClientMessageEx(playeridCOLOR_LIGHTBLUEstring);
                    }
                }
                else if(
division == 2)
                {
                    if (
PlayerInfo[giveplayerid][pMember] == 3)
                    {
                        
PlayerInfo[giveplayerid][pDivision] = 2;
                        
format(stringsizeof(string), "You are now in the Gang Unit, invited by %s."GetPlayerNameEx(playerid));
                        
SendClientMessageEx(giveplayeridCOLOR_LIGHTBLUEstring);
                        
format(stringsizeof(string), "You have invited %s to join the Gang Unit division."GetPlayerNameEx(giveplayerid));
                        
SendClientMessageEx(playeridCOLOR_LIGHTBLUEstring);
                    }
                }
                else if(
division == 3)
                {
                    if (
PlayerInfo[giveplayerid][pMember] == 3)
                    {
                        
PlayerInfo[giveplayerid][pDivision] = 3;
                        
format(stringsizeof(string), "You are now in the Prisoner Transport division, invited by %s."GetPlayerNameEx(playerid));
                        
SendClientMessageEx(giveplayeridCOLOR_LIGHTBLUEstring);
                        
format(stringsizeof(string), "You have invited %s to join the Prisoner Transport division."GetPlayerNameEx(giveplayerid));
                        
SendClientMessageEx(playeridCOLOR_LIGHTBLUEstring);
                    }
                }
                else if(
division == 4)
                {
                    if (
PlayerInfo[giveplayerid][pMember] == 3)
                    {
                        
PlayerInfo[giveplayerid][pDivision] = 4;
                        
format(stringsizeof(string), "You are now in the Special Operations division, invited by %s."GetPlayerNameEx(playerid));
                        
SendClientMessageEx(giveplayeridCOLOR_LIGHTBLUEstring);
                        
format(stringsizeof(string), "You have invited %s to join the Special Operations division."GetPlayerNameEx(giveplayerid));
                        
SendClientMessageEx(playeridCOLOR_LIGHTBLUEstring);
                    }
                }
            }
        }
        else
        {
            
SendClientMessageEx(playeridCOLOR_GRAD1"You are not authorized to use that command - only R5+ can do this.");
        }
    }
    return 
1;

2

PHP код:
CMD:DoC(playeridparams[])
{
    if(
PlayerInfo[playerid][pMember] == || PlayerInfo[playerid][pLeader] == 3)
     {
          if(
IsPlayerInRangeOfPoint(playerid4.0293.675415188.2382961007.171875+0.6))
        {
             
ShowPlayerDialog(playeridDIALOG_DoCDIALOG_STYLE_LIST"DoC: Lockers""Toggle Duty\nEquipment\nClothing Selection\nClear Suspect""Proceed""Cancel");
         }
          else
        {
              
SendClientMessageEx(playeridCOLOR_WHITE"You aren't in range of your DoC lockers.");
              return 
1;
         }
      }
    return 
1;

3
PHP код:
CMD:SASP(playeridparams[])
{
    if(
PlayerInfo[playerid][pMember] == || PlayerInfo[playerid][pLeader] == 7)
     {
          if(
IsPlayerInRangeOfPoint(playerid4.02525.9009,-1655.4312,562.8000) || IsPlayerInRangeOfPoint(playerid4.0327.05306.81999.14+0.6))
        {
             
ShowPlayerDialog(playeridDIALOG_SASPDIALOG_STYLE_LIST"SASP: Lockers""Toggle Duty\nEquipment\nClothing Selection\nClear Suspect""Proceed""Cancel");
           }
        else
        {
            
SendClientMessageEx(playeridCOLOR_WHITE"You aren't in range of your SASP lockers.");
            return 
1;
        }
      }
    return 
1;

Please help me



Re: CMD HELP !!!! - bensmart469 - 15.02.2013

First of all, can you explain the bugs?


Re: CMD HELP !!!! - firemanjv - 16.02.2013

when i type the command it say's [SERVER] Unknow Command.'

-_-


Re: CMD HELP !!!! - [TC]XxJuggaloxX - 16.02.2013

pawn Код:
CMD:DoCdiv(playerid, params[])
These, Don't make 'em all different sizes on the letters, That causes various issues. Just change it to
pawn Код:
CMD:docdiv(playerid, params[])
And it should start working.


Re: CMD HELP !!!! - firemanjv - 20.02.2013

hmm it is again not working and again still the same error : command unkown


Re: CMD HELP !!!! - firemanjv - 21.02.2013

no one


Re: CMD HELP !!!! - PabloDiCostanzo - 21.02.2013

If you get an error, tell us that error, then we can help you


Re: CMD HELP !!!! - firemanjv - 23.02.2013

as i said the there is no error only [server] unknow command.


Re: CMD HELP !!!! - firemanjv - 23.02.2013

no one?


Re: CMD HELP !!!! - firemanjv - 24.02.2013

realy ?? no one can help me


Re: CMD HELP !!!! - Da_Noob - 24.02.2013

Did you compile and restart your server?


Re: CMD HELP !!!! - firemanjv - 24.02.2013

yes but excactly the same


Re: CMD HELP !!!! - RajatPawar - 24.02.2013

Are you sure you have ZCMD included?
pawn Код:
#include <zcmd>
Because, even without including it, sometimes, if you compile this, it will not give you an error.


Re: CMD HELP !!!! - Aarab - 24.02.2013

Try to replace all

Код:
 { 
              SendClientMessageEx(playerid, COLOR_WHITE, "You aren't in range of your DoC lockers."); 
              return 1; 
         }
to

Код:
 { 
              SendClientMessageEx(playerid, COLOR_WHITE, "You aren't in range of your DoC lockers."); 
             
         }



Re: CMD HELP !!!! - firemanjv - 24.02.2013

Quote:
Originally Posted by Rajat_Pawar
Посмотреть сообщение
Are you sure you have ZCMD included?
pawn Код:
#include <zcmd>
Because, even without including it, sometimes, if you compile this, it will not give you an error.
yes i have other way no cmd wil work but its only this

Quote:
Originally Posted by Aarab
Посмотреть сообщение
Try to replace all

Код:
 { 
              SendClientMessageEx(playerid, COLOR_WHITE, "You aren't in range of your DoC lockers."); 
              return 1; 
         }
to

Код:
 { 
              SendClientMessageEx(playerid, COLOR_WHITE, "You aren't in range of your DoC lockers."); 
             
         }
i will give it a try