AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Admin & VIP acces (https://forums.alliedmods.net/showthread.php?t=95834)

matiaslp 06-27-2009 18:29

Admin & VIP acces
 
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

DA 06-28-2009 05:35

Re: Admin & VIP acces
 
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.

matiaslp 06-28-2009 15:54

Re: Admin & VIP acces
 
Quote:

Originally Posted by DA (Post 859120)
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!

fysiks 06-28-2009 16:06

Re: Admin & VIP acces
 
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.

matiaslp 06-28-2009 18:46

Re: Admin & VIP acces
 
Quote:

Originally Posted by fysiks (Post 859498)
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?

fysiks 06-28-2009 19:10

Re: Admin & VIP acces
 
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.

matiaslp 06-28-2009 19:43

Re: Admin & VIP acces
 
Quote:

Originally Posted by fysiks (Post 859643)
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?

fysiks 06-28-2009 21:54

Re: Admin & VIP acces
 
Quote:

Originally Posted by fysiks (Post 859643)
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)

matiaslp 06-28-2009 22:11

Re: Admin & VIP acces
 
Quote:

Originally Posted by fysiks (Post 859731)
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!

DarkGod 06-28-2009 22:16

Re: Admin & VIP acces
 
No, it's not used like that...
Look at your own code in your first post.


All times are GMT -4. The time now is 15:30.

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