Raised This Month: $51 Target: $400
 12% 

is_user_admin() doesn't works right!


  
 
 
Thread Tools Display Modes
Author Message
#Reaper
Junior Member
Join Date: Mar 2006
Old 06-03-2006 , 06:07   is_user_admin() doesn't works right!
#1

Hello,
I use is_user_admin() in my user log plugin. But sometimes a admin is in the log file, he wasn't detected as an admin(!)
A other person has the same problem,too. So, this must be an bug in AMXX. That a admin isn't detected as an admin isn't often, but sometimes.
I hope, you can repair this bug soon, thanks

greetz
#Reaper

PS: Sorry for my baaad english^^
__________________
#Reaper is offline
Send a message via ICQ to #Reaper
Hawk552
AMX Mod X Moderator
Join Date: Aug 2005
Old 06-03-2006 , 10:54  
#2

You probably gave them flag z.
__________________
Hawk552 is offline
Send a message via AIM to Hawk552
#Reaper
Junior Member
Join Date: Mar 2006
Old 06-03-2006 , 14:19  
#3

No, I am not stupid, they had not the flag z ;)
__________________
#Reaper is offline
Send a message via ICQ to #Reaper
teame06
i have a hat
Join Date: Feb 2005
Location: Hat City
Old 06-03-2006 , 15:36  
#4

Show your code
__________________
No private support via Instant Message
GunGame:SM Released
teame06 is offline
Send a message via AIM to teame06
#Reaper
Junior Member
Join Date: Mar 2006
Old 06-04-2006 , 12:39  
#5

Code:
public client_putinserver(id){
	//new ids[32]
	//num_to_str(id,ids,31)
	//new arg_len = read_argv(1,ids,31)
	set_task(5.0, "connect", id) //, ids, arg_len + 1
	
	return PLUGIN_HANDLED
}

public connect(id){ //ids[]
	//new id = str_to_num(ids)
	new ip2[32]
	get_user_ip(id,ip2,31,1)
	if (is_user_admin(id)==0 && equali(ip2,"127.0.0.1")){
		new name[32]
		new authid[32]
		new ip[32]
		
		get_user_name(id,name,31)
		get_user_authid(id,authid,31)
		get_user_ip(id,ip,31)
		
		log_to_file(logfilename,"Name: %s		SteamID: %s			IP: %s",name,authid,ip)
	}
	return PLUGIN_HANDLED
}
:-/
__________________
#Reaper is offline
Send a message via ICQ to #Reaper
Greenberet
AMX Mod X Beta Tester
Join Date: Apr 2004
Location: Vienna
Old 06-04-2006 , 13:32  
#6

you forgot the TASKID parameter in set_task
Greenberet is offline
Send a message via ICQ to Greenberet Send a message via MSN to Greenberet
BAILOPAN
Join Date: Jan 2004
Old 06-04-2006 , 13:36  
#7

He did?
__________________
egg
BAILOPAN is offline
Greenberet
AMX Mod X Beta Tester
Join Date: Apr 2004
Location: Vienna
Old 06-04-2006 , 13:43  
#8

I just hope, that he is not so stupid to forget the parameter he wants to use...

so i just say that the forgot the taskid parameter
Greenberet is offline
Send a message via ICQ to Greenberet Send a message via MSN to Greenberet
SweatyBanana
BANNED
Join Date: Sep 2005
Location: LOL
Old 06-04-2006 , 13:44  
#9

Wouldnt it be:

Code:
set_task(5.0, "connect")
SweatyBanana is offline
Send a message via AIM to SweatyBanana Send a message via Yahoo to SweatyBanana
Greenberet
AMX Mod X Beta Tester
Join Date: Apr 2004
Location: Vienna
Old 06-04-2006 , 13:45  
#10

Quote:
Originally Posted by SweatyBanana
Wouldnt it be:

Code:
set_task(5.0, "connect")
no,
he wouldn't get the playerid then
Greenberet is offline
Send a message via ICQ to Greenberet Send a message via MSN to Greenberet
 



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 10:57.


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