PHP Code:
return PLUGIN_HANDLED
Should i
always return PLUGIN_HANDLED at the end of code? Does it matter? Does it affect performance?
Example:
PHP Code:
public MenuTest(id)
{
new Menu = menu_create(sMenu, "MenuTest_Handler")
menu_additem(Menu, "test 1", "", 0)
menu_additem(Menu, "teste 2", "", 0)
menu_setprop(Menu, MPROP_EXIT, MEXIT_NEVER)
menu_setprop(Menu, MPROP_PERPAGE, 6)
menu_display(id, Menu, 0)
return PLUGING_HANDLED
}
==========================
Is it better to have all plugins seperated, or have a HUGE with all of them inside a single one?
Does it affect performance?
==========================
When doing loops:
PHP Code:
new iPlayers[32], iNum
get_players(iPlayers, iNum, "ch")
for(new i = 0; i < iNum; i++)
Should i use "new i" inside "for()", or outside?
Like this:
PHP Code:
new iPlayers[32], iNum, i
get_players(iPlayers, iNum, "ch")
for(i = 0; i < iNum; i++)