Will 'OnPlayerCommandText' work with ZCMD? - 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: Will 'OnPlayerCommandText' work with ZCMD? (
/showthread.php?tid=148371)
Will 'OnPlayerCommandText' work with ZCMD? -
Torran - 16.05.2010
Will it?
Example:
pawn Code:
CMD:example(playerid, params[])
{
print("Example");
return 1;
}
public OnPlayerConnect(playerid)
{
OnPlayerCommandText(playerid, "/example");
return 1;
}
It probably wont work, But if it dosent is there another way?
Re: Will 'OnPlayerCommandText' work with ZCMD? -
Kyosaur - 16.05.2010
Quote:
Originally Posted by Torran
Will it?
Example:
pawn Code:
CMD:example(playerid, params[]) { print("Example"); return 1; }
public OnPlayerConnect(playerid) { OnPlayerCommandText(playerid, "/example"); return 1; }
It probably wont work, But if it dosent is there another way?
|
Try it out lol, it might work (i dont see a reason it wouldnt).
Re: Will 'OnPlayerCommandText' work with ZCMD? -
russo666 - 16.05.2010
Yup try it out, if doesn't work you could use 'return cmd_cmdhere'.
Re: Will 'OnPlayerCommandText' work with ZCMD? -
dice7 - 16.05.2010
Yes it will, since the only way to process a command is via OnPlayerCommandText
Re: Will 'OnPlayerCommandText' work with ZCMD? -
Torran - 16.05.2010
If i did '
OnPlayerCommandText(playerid, "/quit");' Would that work? or..
Re: Will 'OnPlayerCommandText' work with ZCMD? -
Kyosaur - 16.05.2010
Quote:
Originally Posted by Torran
If i did 'OnPlayerCommandText(playerid, "/quit");' Would that work? or..
|
It wont work if its a client command.
Re: Will 'OnPlayerCommandText' work with ZCMD? -
Scenario - 16.05.2010
So, you want it to be so when a player "connects" to your server, it automatically sends a command, acting as if
they "sent" it?