SA-MP Forums Archive
ZCMD to YCMD - 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: ZCMD to YCMD (/showthread.php?tid=460003)



ZCMD to YCMD - benel1 - 25.08.2013

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


Re: ZCMD to YCMD - Cypress - 25.08.2013

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.


Re: ZCMD to YCMD - Jessyy - 25.08.2013

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


Re: ZCMD to YCMD - benel1 - 25.08.2013

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"


Re: ZCMD to YCMD - Cypress - 25.08.2013

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.


Re: ZCMD to YCMD - benel1 - 25.08.2013

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 :/


Re: ZCMD to YCMD - Jessyy - 25.08.2013

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


Re: ZCMD to YCMD - DanishHaq - 25.08.2013

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.