Raised This Month: $ Target: $400
 0% 

I need help, to add imunity for admins and fix some stuff...


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
╘╗۩ ktax ۩╔╛
BANNED
Join Date: Jun 2009
Location: In earth, europe, countr
Old 06-21-2009 , 03:41   I need help, to add imunity for admins and fix some stuff...
Reply With Quote #1

PHP Code:
#include <amxmodx>

public plugin_init() {
    
register_plugin("Easy kick","0.1","lukiuz")
    
register_concmd("kickid","kick_player",ADMIN_KICK," kickid <name> [Kicks player from the server]")
}
public 
kick_player(id) {
    if (!(
get_user_flags(id)&ADMIN_KICK)) {
        
console_print(id,"[EASY KICK] Insuccified privilegies.")
        return 
PLUGIN_HANDLED
    
}
    if (
read_argc() == 0) {
        
console_print(id,"[EASY KICK] Please specify an user.")
        return 
PLUGIN_HANDLED
    
}
    new 
user[32], uid
    read_argv
(1,user,32)
    
uid find_player("bh",user)
    if (
uid == 0) {
        
console_print(id,"[EASY KICK] Player was not found.")
        return 
PLUGIN_HANDLED
    
}
    
client_cmd(uid,"echo [EASY KICK] You were kicked from the server.")
    
client_cmd(uid,"disconnect")
    
console_print(id,"[EASY KICK] Player succesfully kicked.")
    return 
PLUGIN_HANDLED

  • I want the plugin if not found args write that the player was not found. But it kicks me...
  • I want that if player has admin imunity wouldnt be kicked.
  • Also i want to know, that if i want player that was kicked to be shown is this code right?


PHP Code:
    console_print(id,"[EASY KICK] Player %i succesfully kicked.",uid
Well im new at coding, so just dont flame about bad layout, code stuff, talking about more easier ways, becouse i thought of this to be easiest way.

Last edited by ╘╗۩ ktax ۩╔╛; 06-21-2009 at 04:15.
╘╗۩ ktax ۩╔╛ is offline
╘╗۩ ktax ۩╔╛
BANNED
Join Date: Jun 2009
Location: In earth, europe, countr
Old 06-21-2009 , 10:06   Re: I need help, to add imunity for admins and fix some stuff...
Reply With Quote #2

can anoyone help?
╘╗۩ ktax ۩╔╛ is offline
Owyn
Veteran Member
Join Date: Nov 2007
Old 06-21-2009 , 11:05   Re: I need help, to add imunity for admins and fix some stuff...
Reply With Quote #3

don't bump your topics until two weeks passed
__________________
☜ Free Mozy ☂backup\҉sync user
Quote:
Американский форум - Задаёшь вопрос, потом тебе отвечают.
Израильский форум - Задаёшь вопрос, потом тебе задают вопрос.
Русский форум - Задаёшь вопрос, потом тебе долго рассказывают, какой ты мудак.
Owyn is offline
Send a message via ICQ to Owyn
╘╗۩ ktax ۩╔╛
BANNED
Join Date: Jun 2009
Location: In earth, europe, countr
Old 06-21-2009 , 11:36   Re: I need help, to add imunity for admins and fix some stuff...
Reply With Quote #4

lol, alot of pro coders and noone knows how to add imunity for kicking admins? sad community...
╘╗۩ ktax ۩╔╛ is offline
[ --<-@ ] Black Rose
ANNIHILATED
Join Date: Sep 2005
Location: Stockholm, Sweden.
Old 06-21-2009 , 12:04   Re: I need help, to add imunity for admins and fix some stuff...
Reply With Quote #5

G... I wonder what happens if you combine this
Code:
if (!(get_user_flags(id)&ADMIN_KICK))
with this
Code:
uid
and possibly this
Code:
ADMIN_ADMIN
You seem pretty stupid since you've used the two first peices of code already.
The third can be found in the .inc's, other plugins, et.c.

Last edited by [ --<-@ ] Black Rose; 06-21-2009 at 12:09.
[ --<-@ ] Black Rose is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 06-21-2009 , 13:10   Re: I need help, to add imunity for admins and fix some stuff...
Reply With Quote #6

admincmd.sma Line 209. Error messages are all done for you.
__________________
fysiks 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 15:27.


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