30.10.2014, 06:08
For instance, /heal and /hp will be the same thing. I just don't want to copy paste the block of code and replace the user-input command to /hp.
dcmd_hp(playerid, params[]) return dcmd_heal(playerid, params);
//Place this under all of your commands with dcmd
CMD:hp(playerid,params[])
{
return cmd_heal(playerid,params);
}
//I generally place these right under the command itself.
Command_AddAltNamed("heal", "hp");
//Place This Under OnGamemodeInit
if((strcmp("/heal", cmdtext, true) == 0) || (strcmp("/hp", cmdtext, true) == 0))
//Use this under OnPlayerCommandText
if((strcmp("/heal", cmdtext, true) == 0) || (strcmp("/hp", cmdtext, true) == 0))
//Use this under OnPlayerCommandText