View Single Post
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 06-14-2011 , 11:38   Re: I'll plant the bomb on...
Reply With Quote #7

Don't include fakemeta util only for fm_find_ent_by_class stock.
Put the stock in your plugin or directly put engfunc( in code, or use find_ent_by_class native from engine module.

Also, make a check for info_bomb_target (the other possible bombsite classname).
You don't need to count them, just register stuff if you find one.

You misused LANG_SERVER, use LANG_PLAYER when you use index=0, use player index (here 'id') when you want to use receiver language, and use LANG_SERVER when you want to force player to see server language (i don't think you want here).
EDIT
I see what you want to do, then don't put this in the loop or chat will be duplicated (at least chat attempts that will be be blocked due to antoflood plugin or cs limitation), also you could use engclient_cmd there but you can't format with this command (your choice).
/EDIT

set_fail_state is rather to use when something goes wrong with the plugin so that you have no other choice than disable it.
You coud instead do the check at begining of plugin_init and if there are no bombsite, don't register logevent and menu, and pause the plugin if you want with pause() native.

Cache get_pcvar_num( useradcmd ) value before you execute the loop and iPlayers[ i ] at the start of each loop iteration.

In eventSpawnedWithBomb, check that id is not equal to 0 (or make the alive check before has weapon check).

PHP Code:
            formatexmenuformatcharsmaxmenuformat ), "%s"bombsite] );
            
menu_additemmenumenuformat ); 
You don't format anything here, use rather :

PHP Code:
            menu_additemmenubombsite] ); 

I think it's all.
__________________
- tired and retired -

- my plugins -

Last edited by ConnorMcLeod; 06-14-2011 at 11:46.
ConnorMcLeod is offline