AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Unapproved/Old Plugins (https://forums.alliedmods.net/forumdisplay.php?f=27)
-   -   amx_ban2 (https://forums.alliedmods.net/showthread.php?t=89167)

-VAN- 04-03-2009 05:11

amx_ban2
 
1 Attachment(s)
>: Description :<



This is my first of a series of plug-ban. The plugin has the task of ban player off his game. My english is not consumption goods :mrgreen:



>: Plugin :<

PHP Code:

#include <amxmodx> 
#include <amxmisc> 
 
#define PLUGIN "amx_ban2" 
#define VERSION "1.0" 
#define AUTHOR "VAN" 
 
 
public plugin_init()  

    
register_plugin(PLUGINVERSIONAUTHOR
    
register_clcmd("amx_ban2","find",ADMIN_BAN," <#userid,steamid lub nick> <czas bana> [powod]- Daje bana i wylacza gre"

 
public 
find(idlevelcid

    
    if(!
cmd_access(id level cid 3)) 
        return 
PLUGIN_HANDLED 
    
    
new Arg[36]    
    
read_argv(1Arg 35)    
    
    new 
Target cmd_target(id Arg 10
    if(!
is_user_connected(Target)) 
        return 
PLUGIN_HANDLED 
    
    read_argv
(2Arg 35
    new 
iCzas=str_to_num(Arg
    
read_argv(3Arg 35
    
console_cmd(id,"amx_ban #%d %d ^"%s^"",get_user_userid(Target),iCzas,Arg
    
console_cmd(Target,"exit"
    
    return 
PLUGIN_HANDLED 



Arkshine 04-03-2009 05:46

Re: amx_ban2
 
Don't attach *amxx file, you are not allowed to do it. Plus you should use english as default language here. Also, what is the difference with the original amx_ban command ?

Nextra 04-03-2009 06:21

Re: amx_ban2
 
I believe that the player will exit his game automatically after he has been banned. As you can see he even uses the default amx_ban command so this should be the only difference.

F4RR3LL 04-03-2009 06:31

Re: amx_ban2
 
a for what this? in my opinion idea not much.

anakin_cstrike 04-03-2009 06:32

Re: amx_ban2
 
This plugin won't work without the amx_ban default command so is not that good.

fysiks 04-03-2009 07:42

Re: amx_ban2
 
Why does it matter that the person is still running the game when you ban? This does absolutely nothing more than ban the player from the server and piss off that player. This should not be allowed in my opinion.

You may get a thrill knowing that you pissed someone off that you didn't like but I think this is childish.

BOYSplayCS 04-03-2009 09:16

Re: amx_ban2
 
Default text in your code must be English. You can add multilingual support if you wish though.

YamiKaitou 04-03-2009 09:53

Re: amx_ban2
 
AMXX file removed, do not upload it again.

English is a must. You can use ML for other languages, but all printable text must be viewable in English.

What is the point of this plugin? Give me a good reason of why I shouldn't unapprove this plugin

BOYSplayCS 04-03-2009 10:12

Re: amx_ban2
 
I'm getting better at this ;)

Also,

PHP Code:

    new Target cmd_target(id Arg 10)  
    if(!
is_user_connected(Target))  
        return 
PLUGIN_HANDLED 

You shouldn't return PLUGIN_HANDLED. It would be best to return PLUGIN_CONTINUE.

YamiKaitou 04-03-2009 10:46

Re: amx_ban2
 
Quote:

Originally Posted by BOYSplayCS (Post 796220)
I'm getting better at this ;)

Also,

PHP Code:

    new Target cmd_target(id Arg 10)  
    if(!
is_user_connected(Target))  
        return 
PLUGIN_HANDLED 

You shouldn't return PLUGIN_HANDLED. It would be best to return PLUGIN_CONTINUE.

Returning PLUGIN_CONTINUE will show the "Unknown Command" message. HANDLED is for if you are finished with the command and don't want any other plugin or the engine to do anything with it, which you want on a command you create in a plugin


All times are GMT -4. The time now is 12:32.

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