SA-MP Forums Archive
how to make a command with dcmd? - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: how to make a command with dcmd? (/showthread.php?tid=235477)



how to make a command with dcmd? - iGetty - 05.03.2011

The title says it all, I am wondering, how can I make an enter command for my server, with DCMD?

Also, how can I make an enter command for just PD to use?

pawn Код:
if(Groups[Player[playerid][Group]][CommandTypes] == 1 && Player[playerid][Group] != 0 || Groups[Player[playerid][Group]][CommandTypes] == 4)
I have that, if it helps?



Re: how to make a command with dcmd? - bestr32 - 05.03.2011

How a enter command?


Re: how to make a command with dcmd? - grand.Theft.Otto - 05.03.2011

Well, I'm not sure what you're trying to do, but I took this off my admin script. You can edit it around if you want and remove the if(PlayerInfo[playerid][Level] >= 1) { line if you'd like.

pawn Код:
dcmd_enter(playerid,params[]) {
    if(PlayerInfo[playerid][Level] >= 1) {
           // YOUR STUFF HERE
        } else return SendClientMessage(playerid,red,"ERROR: Invalid Player ID.");
    } else return SendClientMessage(playerid,red,"ERROR: You Are Not A High Enough Level To Use This Command.");
}
EDIT: You also need to add dcmd(enter,5,cmdtext); under OnPlayerCommandText


Re: how to make a command with dcmd? - Markx - 05.03.2011

OMG, Cant read?


Re: how to make a command with dcmd? - bestr32 - 05.03.2011

No, I was saying that I don't know what is that enter, but I know what you are talking about.