ZCMD to YCMD
#1

how to convert this:
pawn Код:
CMD:h(playerid, params[]) return cmd_help(playerid, params);
to YCMD ?
Reply
#2

pawn Код:
YCMD:h(playerid) return ycmd_help(playerid);
Should work I guess. I personally have never used y_cmd but I believe it works the same way as zcmd at some point.

EDIT: I might be wrong, but give it a try anyway.
Reply
#3

Command_AddAltNamed(old[], altname[]) - Adds an alternate spelling for a command by name

Код:
public OnGameModeInit()
{
	...
	Command_AddAltNamed("help", "h");
	...
	return 1;
}

...

YCMD:help(playerid, params[], help)
{
	...
	return 1;
}
!!!! why like this simple read this https://sampforum.blast.hk/showthread.php?tid=169029
Reply
#4

Quote:
Originally Posted by Cypress
Посмотреть сообщение
pawn Код:
YCMD:h(playerid) return ycmd_help(playerid);
Should work I guess. I personally have never used y_cmd but I believe it works the same way as zcmd at some point.
Quote:
Originally Posted by Jessyy
Посмотреть сообщение
REMOVE
error 017: undefined symbol "ycmd_help"
Reply
#5

Quote:
Originally Posted by benel1
Посмотреть сообщение
error 017: undefined symbol "ycmd_help"
Well give me a second, I'll try to test it myself, should of do before posting anyway, apologies man.
Reply
#6

Quote:
Originally Posted by Jessyy
Посмотреть сообщение
Command_AddAltNamed(old[], altname[]) - Adds an alternate spelling for a command by name

Код:
public OnGameModeInit()
{
	...
	Command_AddAltNamed("help", "h");
	...
	return 1;
}

...

YCMD:help(playerid, params[], help)
{
	...
	return 1;
}
!!!! why like this simple read this https://sampforum.blast.hk/showthread.php?tid=169029
I read and did not understand ..
- There is no simpler way? Because I have a lot of commands in ZCMD and now I need move all this? ...
Anyway thanks!
Edit:
I forgot to ask ..
What is the parameter of the help I did not understand it :/
Reply
#7

you didn't read carefully ... I thought the problem is just at alias name...
YCMD autodedect the ZCMD tag and is converting automatali for ycmd
example
Код:
public OnGameModeInit()
{
	...
	Command_AddAltNamed("help", "h");
	...
	return 1;
}

...

YCMD:help(playerid, params[], help)
{
	...
	return 1;
}
is same as:
Код:
public OnGameModeInit()
{
	...
	Command_AddAltNamed("help", "h");
	...
	return 1;
}

...

CMD:help(playerid, params[])
{
	...
	return 1;
}
you will need to be careful with one think to remove this line "#inlude <zmcd>" and you will need to replace with this "#include <YSI\y_commands>"
in other world you just change the include and you're done
Reply
#8

Seems like you're new to y_commands, read this: https://sampforum.blast.hk/showthread.php?tid=169029. Furthermore, read this to get an understanding of create YCMD commands: https://sampforum.blast.hk/showthread.php?tid=290132.

I'm sure after you've read those, you'll have a better understanding and maybe even be able to fix your problems yourself.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)