1.Don't use
PlayerPreThink, you have better ways here:
- For speed, hook Ham_Item_PreFrame and do your stuff. Also you won't need CurWeapon any longer.
- For bhop, hook Ham_Player_Jump.
2.Use new file natives.
3.Use charsmax() to get a string size, don't hardcode it.
4.Do not create variables inside a loop.
5.Check if
iFile pointer is valid before doing anything(> 0).
6.
for (new i; i <= get_maxplayers(); i++) don't loop players like this, use get_players. It will give an array with fully valid players.
7.Switch with only one case is silly.
8.
strtolower( g_szMapname ) is not needed.
9.static on global variables is not needed here. It means that the variable is in the scope of the current file, but since you work with only one file new is perfectly fine.
That's at the most fastest glance possible. Unapproved for now, because sections needs to be cleaned. You can PM me when you made this few changes so we can go in deep and explore all the functions.
__________________