Is there a way to make custom commands not defined by user? [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)
+--- Thread: Is there a way to make custom commands not defined by user? [zcmd] (
/showthread.php?tid=410342)
Is there a way to make custom commands not defined by user? [zcmd] -
RajatPawar - 25.01.2013
Suppose I set a PVar string of a player, "hello" as "test", so can I in some way retrieve it and make it into a command?
For example,
pawn Код:
new st[10];
GetPVarString(playerid,"hello",st,10);
CMD:st(playerid)
//....
I know this would create a command called st, but is there a way it could make a command named 'test' as the value of st is 'test'?
I really need this. For generating commands based on user input. I thought about pointers, *p, but still the command would be CMD
, totally useless.
Re: Is there a way to make custom commands not defined by user? [zcmd] -
DiGiTaL_AnGeL - 25.01.2013
I think you can do this with YCMD.
Re: Is there a way to make custom commands not defined by user? [zcmd] -
RajatPawar - 25.01.2013
Checked out the y_cmd tutorial, nothing like this.
AW: Is there a way to make custom commands not defined by user? [zcmd] -
Blackazur - 25.01.2013
Yep with YCMD.
Re: Is there a way to make custom commands not defined by user? [zcmd] -
RajatPawar - 25.01.2013
Never used y_cmd, can someone tell me a way of doing this? An example?
Re: Is there a way to make custom commands not defined by user? [zcmd] -
RajatPawar - 26.01.2013
Bump, need this.
Re: Is there a way to make custom commands not defined by user? [zcmd] -
RajatPawar - 27.01.2013
Alright guys, thanks for the 'help', I found a way to do this, if anyone wants this:
Use strcmp to make the command, compare it as you do for commands after strcat'ing the say, PlayerInfo[playerid][pString] with '/' and do the necessary after wards. Will surely try this and return the results.