This site is a testing version, but all data is shared with the live forum.


Raised This Month: $ Target: $400
 0% 

check if player is admin at connect


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
sparkey
Senior Member
Join Date: May 2010
Old 07-30-2011 , 11:22   check if player is admin at connect
Reply With Quote #1

Hi,

Is there any way to check if a player is admin at connect instead of loading it at plugin_init or would i have to call the adminSql function at client_putinserver?

Best regards
sparkey is offline
Nyuszy
Senior Member
Join Date: Apr 2009
Old 07-30-2011 , 11:41   Re: check if player is admin at connect
Reply With Quote #2

Code:
if(is_user_admin(id)) { // ... }
Nyuszy is offline
bibu
Veteran Member
Join Date: Sep 2010
Old 07-30-2011 , 11:41   Re: check if player is admin at connect
Reply With Quote #3

PHP Code:
public client_connect(id)
{
     if(
is_user_admin(id)) // or check adminflags
               //is admin 
Works perfectly.
__________________
Selling tons of my own private works.
Accepting paid work for clans and communities.
Don't hesitate to contact me.
bibu is offline
sparkey
Senior Member
Join Date: May 2010
Old 07-30-2011 , 12:40   Re: check if player is admin at connect
Reply With Quote #4

I think you misunderstood me, say for example that a new admin gets added to the mysql database. For the admin to exist in the server it has to be restarded to reinitialize the local admin db.
sparkey is offline
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 07-30-2011 , 12:52   Re: check if player is admin at connect
Reply With Quote #5

You need some method of retrieving the new admin(s) from the db. You can do it manually or by using amx_reloadadmins
__________________

Last edited by Bugsy; 07-30-2011 at 12:55.
Bugsy is online now
sparkey
Senior Member
Join Date: May 2010
Old 07-30-2011 , 13:12   Re: check if player is admin at connect
Reply With Quote #6

Quote:
Originally Posted by Bugsy View Post
You need some method of retrieving the new admin(s) from the db. You can do it manually or by using amx_reloadadmins
Fantastic!! Thx!
sparkey 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 14:46.


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