Reading single char from string
This is what I want to do:
I want to make a script that check if someone is regged on a forum. It will do this by checking for a specific access flag, lets say "n". And if the server is full, it should kick one of the unregistred players when a registred player try to connect (this should therefore also give access to a reserved slot). _Any_ other tips that might help me do this is Greaty appreciated. But to the main question: How do I check the value I get from get_user_flags() (<--- think thats the one with access flags...?) for a specific flag, in this case, "n". All flags for a normal registred user (not admin, or immune) would be bmn. All help appreciated, thank you. |
try containi, contain, or regex.
|
Actually, in this case, you wouldn't search a string.
Code:
|
Re: Reading single char from string
Quote:
Code:
So, use: Code:
Edit: the access() function that Avalanche posted is the exact same thing as what I wrote above, but it requires you include <amxmisc> Remember tho, get_user_flags() returns a BitSum of the flags, not actual characters... to convert it to the character flags (and vice-versa), use these from amxmodx.inc: Code:
Edit: :P Avalanche, you posted just b4 me.. |
| All times are GMT -4. The time now is 09:56. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.