Raised This Month: $ Target: $400
 0% 

[SOLVED] remove_user_flags not working


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Blizzard_87
Veteran Member
Join Date: Oct 2012
Old 05-13-2013 , 18:35   [SOLVED] remove_user_flags not working
Reply With Quote #1

im testing some new things on my LAN server... and

remove_user_flags( index ) is not working..

its set to remove all flags on client_connect( id ).

but once i connect and spawn i still have all my flags still...

Code:
#include <amxmodx> #include <amxmisc> #define PLUGIN "Activate Admin" #define VERSION "1.0" #define AUTHOR "Blizzard" new szFlags[ 33 ]; public plugin_init() {     register_plugin(PLUGIN, VERSION, AUTHOR)         register_concmd( "test", "test", 0, ": test <password>" ); } public client_connect( id ) {     szFlags[ id ] = get_user_flags( id );     remove_user_flags( id ); } public test( id ) {     new iArg[ 32 ];     read_argv( 1, iArg, charsmax( iArg ) );         if( equal( iArg, "password" ) )     {         set_user_flags( id, read_flags( szFlags[ id ] ) );         return PLUGIN_HANDLED;     }     else if( !equal( iArg, "password" ) )     {         console_print( id, "Usage: test <password>" );     }     return PLUGIN_HANDLED; }
__________________
Blizzard_87 is offline
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 05-13-2013 , 18:41   Re: remove_user_flags not working
Reply With Quote #2

I don't think the player has flags yet at connect, try putinserver.
__________________
Bugsy is offline
Blizzard_87
Veteran Member
Join Date: Oct 2012
Old 05-13-2013 , 18:58   Re: remove_user_flags not working
Reply With Quote #3

Quote:
Originally Posted by Bugsy View Post
I don't think the player has flags yet at connect, try putinserver.
that did it thanks.

im at work and not thinking straight im stupid lol
__________________
Blizzard_87 is offline
Jhob94
AMX Mod X Donor
Join Date: Jul 2012
Old 05-13-2013 , 20:58   Re: [SOLVED] remove_user_flags not working
Reply With Quote #4

At putinserver maybe not read yet (It depends not always samet time). Make a task with 10seconds on putinserver for make sure it gonna work ;)
__________________
Jhob94 is offline
Blizzard_87
Veteran Member
Join Date: Oct 2012
Old 05-13-2013 , 21:14   Re: [SOLVED] remove_user_flags not working
Reply With Quote #5

Quote:
Originally Posted by Blizzard_87 View Post
that did it thanks.

im at work and not thinking straight im stupid lol
Quote:
Originally Posted by Jhob94 View Post
At putinserver maybe not read yet (It depends not always samet time). Make a task with 10seconds on putinserver for make sure it gonna work ;)
client_putinserver forward worked... Jhob94
__________________
Blizzard_87 is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 05-14-2013 , 03:58   Re: [SOLVED] remove_user_flags not working
Reply With Quote #6

Flags are set in client_authorized which is one function that you never know when it will execute. Therefore, you should use client_authorized.
__________________

Last edited by fysiks; 05-14-2013 at 03:58.
fysiks is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 16:25.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode