Send a command by pressing a key - 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: Send a command by pressing a key (
/showthread.php?tid=453895)
Send a command by pressing a key -
alanhutch - 26.07.2013
Hello to all! I wanted to know how could I do to run the command "/enter" when you press ENTER! How can I do? Thank you.
Re: Send a command by pressing a key -
ReVo_ - 26.07.2013
https://sampwiki.blast.hk/wiki/OnPlayerKeyStateChange
Keys:
https://sampwiki.blast.hk/wiki/Keys
If you use ZCMD, check if he press ENTER and do:
return cmd_enter(playerid, "");
Re: Send a command by pressing a key -
alanhutch - 26.07.2013
Quote:
Originally Posted by ReVo_
|
I use this type of commands:
pawn Код:
if(strcmp(cmd, "/enter", true) == 0) // Trasforma in INVIO
{
What can I do?
I know how to use the Keys, the problem's the command
Re: Send a command by pressing a key -
ReVo_ - 26.07.2013
Switch to ZCMD. (Consider it.)
Ok, you can do a function where move enter code, or do: OnPlayerCommandText(playerid, "/enter");
Re: Send a command by pressing a key -
alanhutch - 26.07.2013
Quote:
Originally Posted by ReVo_
Switch to ZCMD. (Consider it.)
Ok, you can do a function where move enter code, or do: OnPlayerCommandText(playerid, "/enter");
|
Thank you very much. I will switch to ZCMD...
Rep+