How to call ****** command?
#1

Ex: I have this command:
Код:
YCMD:handsup(playerid, params[],help)
{
	SetPlayerSpecialAction(playerid,SPECIAL_ACTION_HANDSUP);
	return 1;
}
And this:
Код:
YCMD:handsupbaybe(playerid, params[],help)
{
	SetPlayerSpecialAction(playerid,SPECIAL_ACTION_HANDSUP);
	return 1;
}
They are same...
When i use zcmd, i write second command like this:
Код:
CMD:handsupbaybe(playerid, params[]) return cmd_handsup(playerid,params[]);
How to do it with y_commands?
This is just ex, but i need it for more commands to make easier game for players...
Reply
#2

Quote:
Originally Posted by ******
Посмотреть сообщение
You should really be thinking about WHY you want to call the command! Commands are an interface to code functionality for users. If you need to use that code from other places in your script you are doing it the wrong way! Put the code in a separate function and call that instead.
Simply put the code directly or if it's called a LOT make it into a function and call the function.
Reply
#3

Command_ReProcess(playerid, "/CMD:handsupbaybe", false);

Easier shortcut: Command_AddAltNamed("handsup", "handsupbaybe");
Reply
#4

Thank you!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)