Raised This Month: $ Target: $400
 0% 

Admin & VIP acces


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
matiaslp
Senior Member
Join Date: Apr 2007
Old 06-27-2009 , 18:29   Admin & VIP acces
Reply With Quote #1

I've found this piece of code and i want to know if it's ok and i can use it on my server...

I want admin & users to be able to join the server when they want, and a random normal player must be kicked if the server it's full.

The flag that i'm using for VIP players it's b (only slot reservation)

can anybody help me? thanks in advance

Last edited by matiaslp; 06-30-2009 at 13:04.
matiaslp is offline
DA
Veteran Member
Join Date: Nov 2005
Location: Germany/Münster
Old 06-28-2009 , 05:35   Re: Admin & VIP acces
Reply With Quote #2

The code looks well. You have only one problem
When your server is full, the plugin won't work.
Because steam wouldn't you connect to the server.
The only way to fix this is to reserve one slot or to hide one (like the amxx plugin adminslots.amxx).
I would guess you to use this plugin.
__________________
DA is offline
matiaslp
Senior Member
Join Date: Apr 2007
Old 06-28-2009 , 15:54   Re: Admin & VIP acces
Reply With Quote #3

Quote:
Originally Posted by DA View Post
The code looks well. You have only one problem
When your server is full, the plugin won't work.
Because steam wouldn't you connect to the server.
The only way to fix this is to reserve one slot or to hide one (like the amxx plugin adminslots.amxx).
I would guess you to use this plugin.
Yes i've got 1 slot extra for reservation and hidden =)

How does the plugin kick one random player? I don't understand...

And will users with flag "b" be kicked?

thanks 4 u time!
matiaslp is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 06-28-2009 , 16:06   Re: Admin & VIP acces
Reply With Quote #4

I think that maybe is_user_admin(id) called in client_authorized(id) will give inconsistent results. So, sometimes it will say the user is not an admin even though they really are, it just hasn't gotten far enough for AMX to apply the admin priveleges yet.
__________________
fysiks is offline
matiaslp
Senior Member
Join Date: Apr 2007
Old 06-28-2009 , 18:46   Re: Admin & VIP acces
Reply With Quote #5

Quote:
Originally Posted by fysiks View Post
I think that maybe is_user_admin(id) called in client_authorized(id) will give inconsistent results. So, sometimes it will say the user is not an admin even though they really are, it just hasn't gotten far enough for AMX to apply the admin priveleges yet.
But i want to check if user got reservation privileges, not admin privileges!
it that possible?
matiaslp is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 06-28-2009 , 19:10   Re: Admin & VIP acces
Reply With Quote #6

I was wrong, AMX uses client_authorized(). You can look in adminslots.sma to see how they do it.

In your code you don't reference reservations anywhere.
__________________

Last edited by fysiks; 06-28-2009 at 19:13.
fysiks is offline
matiaslp
Senior Member
Join Date: Apr 2007
Old 06-28-2009 , 19:43   Re: Admin & VIP acces
Reply With Quote #7

Quote:
Originally Posted by fysiks View Post
I was wrong, AMX uses client_authorized(). You can look in adminslots.sma to see how they do it.

In your code you don't reference reservations anywhere.
I don't know where to look... can you help me a bit?
matiaslp is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 06-28-2009 , 21:54   Re: Admin & VIP acces
Reply With Quote #8

Quote:
Originally Posted by fysiks View Post
I was wrong, AMX uses client_authorized(). You can look in adminslots.sma to see how they do it.

In your code you don't reference reservations anywhere.
client_authorized(id)
__________________
fysiks is offline
matiaslp
Senior Member
Join Date: Apr 2007
Old 06-28-2009 , 22:11   Re: Admin & VIP acces
Reply With Quote #9

Quote:
Originally Posted by fysiks View Post
client_authorized(id)
So instead of is_user_admin(id) i must use client_authorized(id)?

How do normal users are "kicked" it's randomly?

ty!
matiaslp is offline
DarkGod
SourceMod DarkCrab
Join Date: Jul 2007
Location: Sweden
Old 06-28-2009 , 22:16   Re: Admin & VIP acces
Reply With Quote #10

No, it's not used like that...
Look at your own code in your first post.
__________________
DarkGod is offline
Send a message via AIM to DarkGod Send a message via MSN to DarkGod
Reply


Thread Tools
Display Modes

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 15:30.


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