MultiCommands (Use different commands at the same time!) -
iPLEOMAX - 07.03.2012
MultiCommands
An enhancement for all command systems
A very short but useful include.
Video:
[ame]http://www.youtube.com/watch?v=HfKQ3WfLmug[/ame]
A single function:
pawn Код:
native MultiCommand(playerid, commands[]);
Usage:
pawn Код:
//ZCMD
CMD:multi(playerid, params[])
{
if(isnull(params)) return SendClientMessage(playerid, -1, "Usage: /multi [Desired /Commands, ...]");
MultiCommand(playerid, params);
return true;
}
//rCmd:
rCmd:multi(playerid, success, commands[]) {
if(!success) return SendClientMessage(playerid, -1, "Usage: /multi [Desired /Commands, ...]");
MultiCommand(playerid, commands);
return 1;
}
//YCMD:
YCMD:multi(playerid, params[], help)
{
if(help) return SendClientMessage(playerid, -1, "Help: Enables you to use different commands at the same time.");
if(isnull(params)) return SendClientMessage(playerid, -1, "Usage: /multi [Desired /Commands, ...]");
MultiCommand(playerid, params);
return true;
}
//Default:
public OnPlayerCommandText(playerid, cmdtext[])
{
if(!strcmp(cmdtext, "/multi", true, 6)) return MultiCommand(playerid, cmdtext[7]);
//Other...
return false;
}
* Note that you can attach it to the main command processing code to convert ALL commands into multi-commands.
Would slow down performance by few milliseconds though.
Download:
Newbie? You better download this:
Mediafire
or else, you know how to paste it as an include:
Pastebin
Legal:
Mozilla Public License 2.0
Changelog:
Код:
7/Mar/2012- Initial Release
Tell me if you have any suggestions or reported bugs.
Thank you.
Re : MultiCommands (Use different commands at the same time!) -
dydjyz - 07.03.2012
8/10, good
Re: MultiCommands (Use different commands at the same time!) -
Marshall32 - 07.03.2012
7/10,
Really cool and usable.
Re: MultiCommands (Use different commands at the same time!) -
_DownLoaD_ - 07.03.2012
Amazing :]
Re: MultiCommands (Use different commands at the same time!) -
Michael@Belgium - 07.03.2012
:O Very epic ! Didn't know it was possible. Great work ! And lol @ sig ;p
Re: MultiCommands (Use different commands at the same time!) -
rati555 - 07.03.2012
amazing 10/10
Re: MultiCommands (Use different commands at the same time!) -
SteeLFelna - 07.03.2012
Good, 7/10
Re: MultiCommands (Use different commands at the same time!) -
tyler12 - 07.03.2012
nice 8/10
lol @ signature
Respuesta: MultiCommands (Use different commands at the same time!) -
[DOG]irinel1996 - 07.03.2012
LOL
Amazing. 5/5
AW: MultiCommands (Use different commands at the same time!) -
BigETI - 07.03.2012
Although I like this idea since now you can use multiple commands at once.
Anyways this version might been made in stock and there are server which uses commands like
So I just remade your script and uploaded this one:
mcmds.inc Pastebin
Usage:
Код:
M_CMDs(playerid, params[], somevariable);
or
Код:
MultiCommands(playerid, params[], somevariable);
or if you get any warnings that a variable shadows at a proceeding level
Код:
M_CMDsEx(playerid, params[], somevariable1, somevariable2, somevariable3);
Function name
Player ID to perform the multiple commands
Parameters
Код:
somevariable, somevariable1, somevariable2, somevariable3
Just put here undeclared/undefined variables (It's important for the loop inside this macro)
Example:
pawn Код:
M_CMDs(playerid, params, i);
or
pawn Код:
M_CMDs(playerid, params, ehlol);
or
pawn Код:
M_CMDs(playerid, params, randomstuff);
etc..
Re: MultiCommands (Use different commands at the same time!) -
Ballu Miaa - 07.03.2012
Haha! When i saw that
thread of a guy with 46 Posts and he was making a multicmd include. That was pretty fucked up for me :S
Cross checked the code and found it was you :P
Anyways good work with this. I already had your include before it was released
Gonna use it for sure.
Re: MultiCommands (Use different commands at the same time!) -
lordturhan - 07.03.2012
Freaky awesome
Re: MultiCommands (Use different commands at the same time!) -
Spooky - 08.03.2012
10/10 Rep+
Re: MultiCommands (Use different commands at the same time!) -
AlTy - 09.03.2012
omg epic
Re: MultiCommands (Use different commands at the same time!) -
Stylock - 09.03.2012
I actually find this really useful!