How do I make a fakecmd in zcmd like dis? - 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: How do I make a fakecmd in zcmd like dis? (
/showthread.php?tid=523970)
How do I make a fakecmd in zcmd like dis? -
DamonD - 04.07.2014
How would I go about doing this? I know this won't work, but it's just an example,
CMD:fakecmd(playerid, params[])
{
if(sscanf(params, "iss", playerid, command, fakeparams)) return sendmsg(playerid, "/fakecmd [id] [cmd] [params]");
cmd_command(playerid, fakeparams);
return 1;
}
Re: How do I make a fakecmd in zcmd like dis? -
Dziugsas - 04.07.2014
What do you want to do with this command?
Re: How do I make a fakecmd in zcmd like dis? -
nickdodd25 - 04.07.2014
Quote:
Originally Posted by DamonD
How would I go about doing this? I know this won't work, but it's just an example,
CMD:fakecmd(playerid, params[])
{
if(sscanf(params, "iss", playerid, command, fakeparams)) return sendmsg(playerid, "/fakecmd [id] [cmd] [params]");
cmd_command(playerid, fakeparams);
return 1;
}
|
You would use this...
pawn Код:
CallRemoteFunction("OnPlayerCommandText", "is", id, command);
But you need to change the sscanf params so command and fakeparams are in the same thing.
Re: How do I make a fakecmd in zcmd like dis? -
DamonD - 04.07.2014
The tricky part is that I believe that sends it in strcmp? Would it work with ZCMD?
Re: How do I make a fakecmd in zcmd like dis? -
Dziugsas - 04.07.2014
Yes.
Re: How do I make a fakecmd in zcmd like dis? -
DamonD - 04.07.2014
Alright, i'll try it now. Hope it works!
UPDATE: I've scripted it, and it's compiling. Hopefully, it will work as it's supposed to.