12.06.2014, 14:44
i want to create a command, which return the name of the command to the stock, then the stock return that cmd. Can do that? Pls help me, thanks!
Example:
Example:
PHP код:
stock CheckAnim(playerid)
{
if(TheAnim[playerid] == 0) return 0;
if(TheAnim[playerid] == 1) return 1;
return 0;
}
stock DoAnim(playerid, namecmd[])
{
TheAnim[playerid] = 1;
return cmd_namecmd[](playerid, params);
}
CMD:test(playerid, params[])
{
if(CheckAnim(playerid) == 0)
{
DoAnim(playerid, "test");
return 1;
}
SendClientMessageEx(playerid, -1, "Success.");
return 1;
}