Need help with OnPlayerCommandText - 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: Need help with OnPlayerCommandText (
/showthread.php?tid=286071)
Need help with OnPlayerCommandText -
Hellhound - 26.09.2011
Whazzup?
I need help with this:
pawn Код:
if(listitem == 3)
{
OnPlayerCommandText(playerid, "/Animlist");
}
See? I want that if the Player will choose a List item, It will return a Command... This example dont work

How to do it?
Re: Need help with OnPlayerCommandText -
[MWR]Blood - 26.09.2011
https://sampwiki.blast.hk/wiki/CallRemoteFunction
It would be possible in another way, but you have to use a command processor, and I'm highly recommending you to download one (Best Y_CMD) and use it instead of strcmp!
Re: Need help with OnPlayerCommandText -
Hellhound - 26.09.2011
Cant Understand how to use it with commands, and how to use Strcmp, i mean i need to do it with strcmp, For Another Mod! (not mine!)
Re: Need help with OnPlayerCommandText -
[MWR]Blood - 26.09.2011
What happens when you choose the specified list item?
Does it say "Server: Unknown command"?
Re: Need help with OnPlayerCommandText -
Hellhound - 26.09.2011
No, it doesnt doing anything
Re: Need help with OnPlayerCommandText -
Hellhound - 26.09.2011
Can sOmeone pls help?? I need to fimish a script then tommorow!!!!
Re: Need help with OnPlayerCommandText -
HB - 26.09.2011
Why don't you put the code from the command in that list item? This is a temporary solution. So you have time to figure out how it works.
I also suggest you place the command without capital letters, as strcmp might be configured to exactly match the string in OnPlayerCommandText.
Re: Need help with OnPlayerCommandText -
Hellhound - 27.09.2011
Thx i guess, The problrm is that i domt have these commands, Im just side-scripter... I need that when they choose a list item it will return a command