AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Plugin not able to kick player with flag A (https://forums.alliedmods.net/showthread.php?t=244968)

proffs 07-26-2014 12:25

Plugin not able to kick player with flag A
 
Hello, I've been looking a around a lot for kicking players with flag A.
But I can't get this working...

PHP Code:

#include <amxmodx> 

#define PLUGIN "Admin No Tag Kick" 
#define VERSION "1.0" 
#define AUTHOR "Flicker" 

#define TAG "[K5]" 

public plugin_init() { 
    
register_plugin(PLUGINVERSIONAUTHOR


public 
client_putinserver(id
    
set_task(3.0"CheckTagOnConnect"id
     
public 
CheckTagOnConnect(id

         
    new 
Name[32
    
get_user_name(idNamecharsmax(Name)) 
    
    
CheckName(idName)
     
    return 
PLUGIN_CONTINUE 
}

public 
client_infochanged(id)
{
    new 
newname[32]
    
get_user_info(id"name"newnamecharsmax(newname))
    
CheckName(idnewname)
}

CheckName(id, const Name[])
{    
    if(
contain(NameTAG) == -1)  
        
server_cmd("kick #%d ^"You were kicked because you don't have our tag: ^"%s^"^"", get_user_userid(id), TAG) 



Eagle07 07-26-2014 13:05

Re: Plugin not able to kick player with flag A
 
look this
https://forums.alliedmods.net/showpo...68&postcount=6

proffs 07-26-2014 13:16

Re: Plugin not able to kick player with flag A
 
Quote:

Originally Posted by Eagle07 (Post 2174205)

I don't get it how I can use that on my plugin.

Flick3rR 07-26-2014 15:09

Re: Plugin not able to kick player with flag A
 
Quote:

Originally Posted by Eagle07 (Post 2174205)

Well, I don't see how it's related to the topic, though...
I'm going to say something, that I'm not sure about.
I think the server_cmd automatically avoids players with immunity flag. As it's with the console commands. But again, I'm not sure...

mottzi 07-26-2014 19:53

Re: Plugin not able to kick player with flag A
 
Quote:

Originally Posted by Flick3rR (Post 2174281)
I think the server_cmd automatically avoids players with immunity flag.

That would be pretty strange though...

proffs 07-26-2014 20:42

Re: Plugin not able to kick player with flag A
 
nvm i forgot somethings, thanks anyway!


All times are GMT -4. The time now is 13:16.

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