Possible /ahelp and /ah with dcmd?
#1

Hi.

I wonder if it's possible to make a command /ahelp and /ah with both is linked to same dcmd command.

Like:
pawn Код:
if(strcmp(cmd, "/ahelp", true) == 0 || strcmp(cmd, "/ah", true)
but with dcmd,
pawn Код:
dcmd_ahelp(playerid, params[]){
//Something
}

dcmd(ahelp,5, cmdtext);

//Goobii
Reply
#2

pawn Код:
dcmd_ahelp(playerid,params)
{
dcmd_ah(playerid,params)
return 1;
}
Thought it was something like that.
Reply
#3

or

Код:
dcmd_ahelp(playerid, params)
{
return dcmd_ah(playerid, params);
}
Reply
#4

^post above is better.

pawn Код:
forward Action()
public Action()
{
//actions
}

dcmd_ahelp(playerid,params)
{
Action();
return 1;
}
dcmd_ah(playerid,params)
{
Action();
return 1;
}
Reply
#5

Quote:
Originally Posted by Born2die
^post above is better.

pawn Код:
forward Action()
public Action()
{
//actions
}

dcmd_ahelp(playerid,params)
{
Action();
return 1;
}
dcmd_ah(playerid,params)
{
Action();
return 1;
}
thats hardcore
Reply
#6

Quote:
Originally Posted by [MWR
Niixie ]
or

Код:
dcmd_ahelp(playerid, params)
{
return dcmd_ah(playerid, params);
}
But I will still need to define both commands in OnPlayerCommandText, right?
pawn Код:
dcmd(ahelp,5, cmdtext);
dcmd(ah,2, cmdtext);
Reply
#7

Quote:
Originally Posted by Goobii ııqooƃ
Quote:
Originally Posted by [MWR
Niixie ]
or

Код:
dcmd_ahelp(playerid, params)
{
return dcmd_ah(playerid, params);
}
But I will still need to define both commands in OnPlayerCommandText, right?
pawn Код:
dcmd(ahelp,5, cmdtext);
dcmd(ah,2, cmdtext);
Yes. All commands need to be defined.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)