if that doesn't work, try
FakeClientCommandEx(victim, "say /ability");
Personally, I'd just either create a native to do it from War3Source_Engine_CommandHook.sp or use something I've already created in my private copy.
If all else fails, or you'd like to do this better...
Put the following into a includes file and include it in your commandhook and in your race file or any other file you want to do this with:
Maybe call the file:
War3Source_CommandHook_Forwards.inc
new Handle:g_OnUltimateCommandHandle;
new Handle:g_OnAbilityCommandHandle;
public bool:InitNativesForwards()
{
g_OnUltimateCommandHandle=CreateGlobalForward("OnUltimateCommand",ET_Ignore,Param_Cell,Param_Cell,Param_Cell,Param_Cell);
g_OnAbilityCommandHandle=CreateGlobalForward("OnAbilityCommand",ET_Ignore,Param_Cell,Param_Cell,Param_Cell);
return true;
}
stock TriggerAbility(client,num,pressed)
{
Call_StartForward(g_OnAbilityCommandHandle);
Call_PushCell(client);
Call_PushCell(num);
Call_PushCell(pressed);
new result;
Call_Finish(result);
}
stock TriggerUltimate(client,pressed)
{
new race=War3_GetRace(client);
if(race>0)
{
Call_StartForward(g_OnUltimateCommandHandle);
Call_PushCell(client);
Call_PushCell(race);
Call_PushCell(pressed);
new result;
Call_Finish(result);
}
}
^^ move that from the War3Source / addons / sourcemod / scripting / War3Source_Engine_CommandHook.sp file into a War3Source_CommandHook_Forwards.inc file.
Then #includes "W3SIncs/War3Source_CommandHook_Forwards" in the War3Source_Engine_CommandHook.sp file and in your race file.
When you want to trigger a ability or ultimate event for a race, just use the stocks, but make sure you include that file into the race you want to use those for.