from experimenting a lot with callbacks (Zcommands aswell, they act same somehow), i learned this:
the gamemode script gets loaded as first, it gets assigned the "trunk" callbacks, which should return something (1 for success, 0 for fail like UnKnownCommand).
assuming you load a filterscript now, it gets assigned a child instance on the main trunk:
Код:
1 - filterscript NOW gets procesed first, so a callback/zCMD can return nothing (not 0 nor 1), to let the gamemode..
0 - gamemode ..finally process the callback
i got one CMD:cmds(playerid,params[]) in my gamemode, returning 1; at its end.
now, ALL my filterscripts contain a CMD:cmds aswell, but they dont return anything. but they DO process things (SendClientMessage), until the gamemode prints out its stuff, then returns.
you can se and prove the order of the scripts printing out the /cmds by simply reading their order
ima make a screenshot now, where i loaded some filterscripts /cmds callbacks, pay attention to the order.
i guess that needs no more comments?
if iam doing it th wrong way, let me know, but as far as i can see, the server runs for days, and there are some players using the /cmds all time..