Raised This Month: $ Target: $400
 0% 

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


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
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
 


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:27.


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