Can someone take an eye on my plugin? Got some errors when try to compile it:
error 035: argument type mismatch (argument 1)
error 035: argument type mismatch (argument 4)
error 035: argument type mismatch (argument 1)
[ZE] Show Button Pressed BUG
Not related to our Mod, but here you are:
- #include <amxmodx>
- #include <fakemeta>
- #include <hamsandwich>
- new const TAG[] = "[ZE]";
- new g_msgsaytext, bool:g_buttons[1000];
- new g_butoane;
- public plugin_init()
- {
- RegisterHam(Ham_Use, "func_button", "FwdUseButtonPost", 1);
- register_logevent("endround", 2, "1=Round_End");
- take_buttons();
- g_msgsaytext = get_user_msgid("SayText");
- g_butoane = 0;
- }
- public take_buttons()
- {
- g_butoane = 0;
- new entid = -1;
- while((entid = engfunc(EngFunc_FindEntityByString, entid, "classname", "func_button")))
- {
- if(!pev_valid(entid))
- continue;
- g_buttons[entid] = false;
- g_butoane++;
- }
- server_print("%d butoane ****", g_butoane);
- }
- public endround()
- take_buttons();
- public FwdUseButtonPost(ent, caller, activator)
- {
- if(!g_buttons[ent])
- {
- new name[32];
- get_user_name(activator, name, charsmax(name));
- color(0, ".v%s.g Player.e %s.g press a button!", TAG, name);
- g_buttons[ent] = true;
- }
- }
- stock color( const id, const input[], any: ... )
- {
- new count = 1, players[32], i, player;
- static msg[191];
- if ( numargs() == 2 )
- copy( msg, 190, input );
- else
- vformat( msg, 190, input, 3 );
- replace_all( msg, 190, "!g", "^4" );
- replace_all( msg, 190, "!y", "^1" );
- replace_all( msg, 190, "!t", "^3" );
- if ( id )
- {
- if ( !is_user_connected( id ) ) return;
- players[0] = id;
- } else get_players( players, count, "ch" );
- for ( i = 0; i < count; i++ )
- {
- player = players[i];
- message_begin( MSG_ONE_UNRELIABLE, g_msgsaytext, _, player );
- write_byte( player );
- write_string( msg );
- message_end();
- }
- }
He who fails to plan is planning to fail
It's working fine, thank you!
Create an account or sign in to join the discussion
You need to be a member in order to post a reply
Create an account
Not a member? register to join our community
Members can start their own topics & subscribe to topics
It’s free and only takes a minute
Sign in
Who is online
Users browsing this forum: No registered users and 5 guests