Quote:
|
Speed is different on AMX Mod X versions. You must change it yourself
|
Never heard of something like this. I know a bug with speed caused by
sv_maxspeed cvar(on furien server, maybe it's the case here too). To fix it, just set this cvar to a higher value like
9999 inside your plugin.
PHP Code:
public Init_Vars() {
Not everything need public in front of it. It is needed for stuffs that can be called from other plugins/modules(forwards, the handler of a menu, a task, etc). You should avoid public if you call stuffs directly in your plugin(it will become a private function - is accessible only inside current plugin). Another thing is that you initialize only one variable, making a function only for that is silly. Just put it inside
plugin_init, and please don't hardcode strings size, use
charsmax()(can be done with
sizeof -1 too, but it is the same thing, peoples prefer the first one for readability) to get it.
PHP Code:
set_task( 60.0, "Advertise_DM" );
This is not going to work correctly. Maybe after one minute no one is connected to server yet and they won't see your message, IMO you should display it at spawn.
Reseting variables in both
client_disconnect and
client_connect is not needed. It is enough to do it only one time during
client_disconnect.
Kia was talking about
iFrags >= iPrice. You can save expression value(true/false) inside a boolean and check it inside
formatex. From my point of view this is not very important, it may help on readability, but nothing more.
Initializing
iTime variable is not needed, cause you use it only one time, you can write the native directly.
Also, for menu items an array would be better :crab
Info param from
menu_additem is not used, so you can remove
menu_item_getinfo and work directly with
item.
Also, instead of checking item name, why you don't do a [tt]switch(item)[/t] ?
Returning
PLUGIN_HANDLED inside menu callback and inside the public where creating the menu is not needed.
PHP Code:
new g_Menu;
g_Menu = menu_create( "\yRang Ra Entekhab Konid:", "Glow_Menu_Handler" );
menu_additem( g_Menu, "Red", "1" );
menu_additem( g_Menu, "Green", "2" );
menu_additem( g_Menu, "Blue", "3" );
menu_additem( g_Menu, "Purple", "4" );
menu_additem( g_Menu, "Cyan", "5" );
menu_additem( g_Menu, "Yellow", "6" );
menu_additem( g_Menu, "Black", "7" );
menu_additem( g_Menu, "White", "8" );
menu_additem( g_Menu, "Random", "9" );
This menu is not dynamic, so you can create it only one time in
plugin_init and make
g_Menu global, so you can acces your menu later.
Cache the return value of
get_user_msgid.
This are just some stuffs, didn't read all your code.
__________________