AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   [SOLVED]Little problem with set_user_flags (https://forums.alliedmods.net/showthread.php?t=2696)

rompom7 06-13-2004 23:28

[SOLVED]Little problem with set_user_flags
 
I am trying to log someone out from admin privilages.

Code:
public logout(id) {     set_user_flags(id, "z")     client_print(id, print_console, "[AMXX AUTH] You are now logged out of administrator status")     return PLUGIN_HANDLED }

Quote:

amx_logincopy.sma(75) : error 035: argument type mismatch (argument 2)

1 Error.
I knew that wouldn't work but I tried it anyway.

I have also tried

Code:
public logout(id) {     set_user_flags(id, ADMIN_USER)     client_print(id, print_console, "[AMXX AUTH] You are now logged out of administrator status")     return PLUGIN_HANDLED }

It compiles but when I login then logout it I still have admin flags

and I have also tried

Code:
public logout(id) {     set_user_flags(id, -1)     client_print(id, print_console, "[AMXX AUTH] You are now logged out of administrator status")     return PLUGIN_HANDLED }

It compiles but when I login then logout it I still have admin flags

Any ideas anyone?

Mugwump 06-14-2004 11:05

Try the function remove_user_flags(id) instead , that might work better.

Both the set_user_flags() and remove_user_flags() natives are defined in amxmodx.inc ...


Mugwump

rompom7 06-15-2004 03:53

Thanks I will try it out.


All times are GMT -4. The time now is 14:45.

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