CMD HELP !!!!
#1

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
Reply
#2

First of all, can you explain the bugs?
Reply
#3

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

-_-
Reply
#4

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.
Reply
#5

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

no one
Reply
#7

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

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

no one?
Reply
#10

realy ?? no one can help me
Reply
#11

Did you compile and restart your server?
Reply
#12

yes but excactly the same
Reply
#13

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.
Reply
#14

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."); 
             
         }
Reply
#15

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
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)