SA-MP Forums Archive
How to send a cmd as a player - 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 send a cmd as a player (/showthread.php?tid=251451)



How to send a cmd as a player - John_Cooper - 27.04.2011

How to send a cmd as a player like when someone joins make them type a cmd?


Re: How to send a cmd as a player - Backwardsman97 - 27.04.2011

You can't do commands that are built-in like '/q' but you can just do this for all others.

pawn Код:
OnPlayerCommandText(playerid,"/mycommand");



Re: How to send a cmd as a player - Steven82 - 27.04.2011

I dont quite understand this topic...


Re: How to send a cmd as a player - Backwardsman97 - 27.04.2011

He wants to call a command as if the player typed it when he didn't. So if you wanted to kill a player, and for whatever reason didn't want to just set his health to 0, you could do something like this.

pawn Код:
OnPlayerCommandText(playerid,"/kill");