AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   ban function isnt working (https://forums.alliedmods.net/showthread.php?t=185312)

Bilal Pro 05-15-2012 14:00

ban function isnt working
 
Hello there,

What am i doing wrong here so that it wont work?

PHP Code:

public EndVote2(id)
{
    new 
total gVotes[0] + gVotes[1]
    
    new 
name[32], authid[40]
    
get_user_name(tempidname31)
    
get_user_authid(tempidauthid31)
    
    if (
gVotes[0] > gVotes[1])
    {
        
ColorChat(0GREY"%s ^1Question: (ban) ^4%s"Prefixname)
        
ColorChat(0GREY"%s ^1Reason: ^4%s^1"PrefixBanReasons[reason])
        
ColorChat(0GREY"%s ^1Length:^4 30^1 minutes"Prefix)
        
ColorChat(0GREY"%s ^1Total votes: ^4%i^1 - Yes: ^4%i"PrefixtotalgVotes[0])
        
server_cmd("amx_ban #%s 30 ^"%s^""authidBanReasons[reason])
    } 


<VeCo> 05-15-2012 14:02

Re: ban function isnt working
 
Use get_user_userid(id) instead of get_user_authid (which gets the Steam ID).

Bilal Pro 05-15-2012 14:07

Re: ban function isnt working
 
Allright

Edit: Doesnt work

Tryed:
PHP Code:

server_cmd("amx_ban #%d 30 ^"%s^""get_user_userid(tempid), BanReasons[reason]) 


Bilal Pro 05-15-2012 14:45

Re: ban function isnt working
 
it kicks me but i can come back without being banned.

Exolent[jNr] 05-15-2012 15:18

Re: ban function isnt working
 
Quote:

Originally Posted by Bilal Pro (Post 1709544)
it kicks me but i can come back without being banned.

The default AMXX ban is broken. Either grab the latest dev build of 1.8.2, or install a different ban method such as AMXBans or Advanced Bans.

Bilal Pro 05-15-2012 15:52

Re: ban function isnt working
 
When will they update this, and do you suggest me to use your bans plugin?

Exolent[jNr] 05-15-2012 16:26

Re: ban function isnt working
 
Quote:

Originally Posted by Bilal Pro (Post 1709576)
When will they update this, and do you suggest me to use your bans plugin?

Just install the latest dev build. Those are the only updates AMXX is getting anymore.

Bilal Pro 05-15-2012 16:42

Re: ban function isnt working
 
Where am I able to download them?

Exolent[jNr] 05-15-2012 16:44

Re: ban function isnt working
 
http://www.amxmodx.org/

Bilal Pro 05-15-2012 16:58

Re: ban function isnt working
 
It does work when im banning someone from the amxmodmenu. but when im trying it with the command "amx_ban" it wont work. and thats what I really need because im trying to add this to my plugin.
PHP Code:

server_cmd("amx_ban #%d 30 ^"%s^""get_user_userid(tempid), BanReasons[reason]) 



All times are GMT -4. The time now is 20:06.

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