Quote:
Originally Posted by ConnorMcLeod
Dynamic natives are more efficient, and appropriated for what you are doing. Forget callfunc !!
|
I'm aware dynamic natives are more efficient and appropriate, that is why i tried them first. But how would you suggest i set up a dynamic native for the string to go back to the core, so the core can handle everything. This is especially important if i have more than one extension adding more than one hud string. THIS is the case that i'm trying to account for.
EDIT: This is how i set up the dynamic native (my original design) but it didn't do what i wished for it to, though did what i needed successfully.
PHP Code:
new g_hudFwd
// init
g_hudFwd = CreateMultiForward("bkf_setHud", ET_CONTINUE, FP_CELL, FP_CELL, FP_STRING, FP_CELL)
// calling function
new retVal
if( !ExecuteForward(g_hudFwd, retVal, id ,g_PowerHud, pus, charsmax(pus)) )
{
ShowSyncHudMsg(id, g_PowerHud, pus) // show hud message of powers
log_amx("[BKF] bkf_setHud was not fired properly.")
}
else if(!retVal)
{
ShowSyncHudMsg(id, g_PowerHud, pus)
client_print(id, print_chat, "bkf_setHud returned 0")
}
__________________