Raised This Month: $ Target: $400
 0% 

Reason for amx_votekick and voteban


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Arrow
Member
Join Date: Sep 2008
Old 03-08-2009 , 05:35   Reason for amx_votekick and voteban
Reply With Quote #1

How do I add a reason for Amx_votekick and Amx_voteban. I figure I have to add it to adminvote.sma, but what?
Arrow is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 03-08-2009 , 07:20   Re: Reason for amx_votekick and voteban
Reply With Quote #2

Replace this:
Code:
log_amx("Vote: ^"%s<%d><%s><>^" vote %s (target ^"%s^")", name, get_user_userid(id), authid, voteban ? "ban" : "kick", arg)
With this:
Code:
 if(read_argc() == 3)
 {
  new reason[64]
  read_argv(2,reason,63)
  log_amx("Vote: ^"%s<%d><%s><>^" vote %s (target ^"%s^") Reason: %s", name, get_user_userid(id), authid, voteban ? "ban" : "kick", arg,reason)
 } else
 {
  log_amx("Vote: ^"%s<%d><%s><>^" vote %s (target ^"%s^")", name, get_user_userid(id), authid, voteban ? "ban" : "kick", arg)
 }
in the cmdVoteKickBan function.

This makes the reason optional. Be sure to use quotes for the reason

Afterthought:
To be complete, replace
Code:
 register_concmd("amx_votekick", "cmdVoteKickBan", ADMIN_VOTE, "<name or #userid>")
 register_concmd("amx_voteban", "cmdVoteKickBan", ADMIN_VOTE, "<name or #userid>")
With
Code:
 register_concmd("amx_votekick", "cmdVoteKickBan", ADMIN_VOTE, "<name or #userid> [Reason]")
 register_concmd("amx_voteban", "cmdVoteKickBan", ADMIN_VOTE, "<name or #userid> [Reason]")
__________________

Last edited by fysiks; 03-08-2009 at 07:25.
fysiks is offline
Arrow
Member
Join Date: Sep 2008
Old 03-08-2009 , 14:42   Re: Reason for amx_votekick and voteban
Reply With Quote #3

thanks a lot fysiks. I have a small problem tho, i made the changes you gave me, recompiled the adminvote.amxx plugin and put it in the server, it still did the votekick and voteban without the reasons.

Usage:

amx_votekick arrow "test"
amx_votekick "arrow" "test"
amx_votekick arrow test
amx_voteban arrow "test"
amx_voteban "arrow" "test"
amx_voteban arrow test

Each of these the vote just did Vote kick Arrow? or Vote Ban Arrow?

Attached the sma file along with this post.
Attached Files
File Type: sma Get Plugin or Get Source (adminvote.sma - 750 views - 16.5 KB)

Last edited by Arrow; 03-08-2009 at 14:50.
Arrow is offline
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 03-08-2009 , 15:39   Re: Reason for amx_votekick and voteban
Reply With Quote #4

All his additions did was add the reason to the logs, not to the actual vote that players see.
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
Arrow
Member
Join Date: Sep 2008
Old 03-08-2009 , 15:53   Re: Reason for amx_votekick and voteban
Reply With Quote #5

so where do I add it to show up so players can also see? n what?

Is it also possible for i to show up in amx bans when someone is votebanned?
Arrow is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 03-09-2009 , 02:05   Re: Reason for amx_votekick and voteban
Reply With Quote #6

Ok, Reason is now required and displayed in the menu.

I don't know anything about advanced bans.
Attached Files
File Type: sma Get Plugin or Get Source (adminvote.sma - 725 views - 16.4 KB)
__________________

Last edited by fysiks; 03-09-2009 at 02:11.
fysiks is offline
Arrow
Member
Join Date: Sep 2008
Old 03-10-2009 , 21:09   Re: Reason for amx_votekick and voteban
Reply With Quote #7

Thanks fysiks
Arrow 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 11:25.


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