Is there a way to make custom commands not defined by user? [zcmd]
#1

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.
Reply
#2

I think you can do this with YCMD.
Reply
#3

Checked out the y_cmd tutorial, nothing like this.
Reply
#4

Yep with YCMD.
Reply
#5

Never used y_cmd, can someone tell me a way of doing this? An example?
Reply
#6

Bump, need this.
Reply
#7

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.
Reply


Forum Jump:


Users browsing this thread: 4 Guest(s)