SA-MP Forums Archive
dcmd and usually cmds? - 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 and usually cmds? (/showthread.php?tid=197593)



dcmd and usually cmds? - whitedragon - 09.12.2010

Is that possible to call out in /test dcmd command test?


Re: dcmd and usually cmds? - Scenario - 09.12.2010

I don't quite know what you mean. If you mean to do a test command using DCMD to make sure it works it would be pretty simple.

pawn Код:
dcmd_test(playerid, params[])
{
     SendClientMesage(playerid, COLOR_WHITE, "It works!");
     return 1;
}



Re: dcmd and usually cmds? - iJumbo - 09.12.2010

Quote:
Originally Posted by RealCop228
Посмотреть сообщение
I don't quite know what you mean. If you mean to do a test command using DCMD to make sure it works it would be pretty simple.

pawn Код:
dcmd_test(playerid, params[])
{
     SendClientMesage(playerid, COLOR_WHITE, "It works!");
     return 1;
}
add #pragma unused params
up of the client message


Re: dcmd and usually cmds? - whitedragon - 09.12.2010

i mean
pawn Код:
dcmd_test(playerid, params[])
{
     SendClientMesage(playerid, COLOR_WHITE, "It works!");
     return 1;
}
if(strcmp(cmdtext, "/test", true) == 0)
{
   dcmd(test,4,cmdtext);
}



Re: dcmd and usually cmds? - Scenario - 09.12.2010

Quote:
Originally Posted by whitedragon
Посмотреть сообщение
i mean
pawn Код:
dcmd_test(playerid, params[])
{
     SendClientMesage(playerid, COLOR_WHITE, "It works!");
     return 1;
}
if(strcmp(cmdtext, "/test", true) == 0)
{
   dcmd(test,4,cmdtext);
}
Oh... It should look like this:

pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    dcmd(test,4,cmdtext);
    return 0;
}

dcmd_test(playerid, params[])
{
     SendClientMesage(playerid, COLOR_WHITE, "It works!");
     return 1;
}
The actual command doesn't go inside the "OnPlayerCommandText" callback - only the "dcmd(test, 4, cmdtext);" thing.


Re: dcmd and usually cmds? - whitedragon - 09.12.2010

that is not the command what i need... I need use in system ь char but i dont want write all code over..