two / in a cmd
#1

Hey guys I think its a crazy Q but here we go xD I found alot of servers who use zcmd and made sth that idk to enable that some cmds like for ex aa they made it to be //aa not /aa and they have both like some cmds use only one / and some use // how to do this I thought of sth in the cmd I thought of doing CMD:/aa (playerid, params []) but got an error so how to do it
Reply
#2

You have to do it with OnPlayerText.
Reply
#3

Quote:
Originally Posted by SickAttack
Посмотреть сообщение
You have to do it with OnPlayerText.
Ahhh okay thnx buddy another small Q can I use zcmd and make normal cmds using onplayertext or wont work bec onplayertext doesbt work with zmcd got replaced with onplayercommandperformed and received? Srry for asking alot
Reply
#4

Here's an example:
pawn Код:
new cmd[128], params[128];
sscanf(text, "s[128]s[128]", cmd, params);
if(!strcmp(cmd, "//aa", true)) {cmd_aa(playerid, params); return 0;}
Note that you will need sscanf.
You can get it here: https://sampforum.blast.hk/showthread.php?tid=120356.
Reply
#5

Quote:
Originally Posted by SickAttack
Посмотреть сообщение
Here's an example:
pawn Код:
new cmd[128], params[128];
sscanf(text, "s[128]s[128]", cmd, params);
if(!strcmp(cmd, "//aa", true)) {cmd_aa(playerid, params); return 0;}
Note that you will need sscanf.
You can get it here: https://sampforum.blast.hk/showthread.php?tid=120356.
Ok thanks man I rly appreciate it and I Rep+ u for ur help
Reply
#6

Код HTML:
CMD:aa(playerid, params[])
{
Function code
}
I hope you serve
Reply
#7

Quote:
Originally Posted by Shura
Посмотреть сообщение
Код HTML:
CMD:aa(playerid, params[])
{
Function code
}
I hope you serve
Yes to make the one under onplayertext hss same functionality as the other one thanks bro
If you have skype feel free to add me youssefehab100
Reply
#8

Sorry, I just do not understand so well, I thought you wanted to convert ZCMD in CMD, excuse my language.
Reply
#9

Quote:
Originally Posted by Shura
Посмотреть сообщение
Sorry, I just do not understand so well, I thought you wanted to convert ZCMD in CMD, excuse my language.
No I just wanted to make some cmds like //aa not /aa u get me ?
Reply
#10

You refer to a command with two dividers? O.o ("//") ?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)