DCMD Not working - 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: DCMD Not working (
/showthread.php?tid=117553)
DCMD Not working -
JoeDaDude - 31.12.2009
None of my DCMD commands are working!
I put
dcmd(cmd,3,cmdtext);
Under OnPlayerCommandText callback,
i go ingame and type /cmd,
It should send a message Saying: Command works,
But it dosent, It dosent do anything, Why?
Re: DCMD Not working - WackoX - 31.12.2009
Please show us some more code.
Re: DCMD Not working -
JoeDaDude - 31.12.2009
pawn Код:
#define dcmd(%1,%2,%3) if (!strcmp((%3)[1], #%1, true, (%2)) && ((((%3)[(%2) + 1] == '\0') && (dcmd_%1(playerid, ""))) || (((%3)[(%2) + 1] == ' ') && (dcmd_%1(playerid, (%3)[(%2) + 2]))))) return 1
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
dcmd(cmd,3,cmdtext);
return 0;
}
pawn Код:
dcmd_cmd(playerid, params[])
{
SendClientMessage(playerid,COLOR_WHITE,"Test 102023433563..");
return 1;
}
Thats all thats in my script atm