Raised This Month: $51 Target: $400
 12% 

Custom Votes v0.5.6 (1/07)


Post New Thread Reply   
 
Thread Tools Display Modes
chundo
Senior Member
Join Date: May 2008
Old 01-26-2009 , 00:39   Re: Custom Votes v0.5.6 (1/07)
Reply With Quote #271

Sorry, I don't have time to test every custom vote people ask about, so I'm only providing the general structure - I'm not guaranteeing they'll be flawless. In this case, now that you've isolated the problem you can see from the configuration docs that you should just use @1, @2, @3, etc instead of #1, #2, #3. The difference is that one is quoted, the other isn't.
__________________
chundo is offline
Guardia Republicano
Member
Join Date: Dec 2006
Location: Buenos Aires, Argentina
Old 01-27-2009 , 07:45   Re: Custom Votes v0.5.6 (1/07)
Reply With Quote #272

Quote:
Originally Posted by chundo View Post
Sorry, I don't have time to test every custom vote people ask about, so I'm only providing the general structure - I'm not guaranteeing they'll be flawless. In this case, now that you've isolated the problem you can see from the configuration docs that you should just use @1, @2, @3, etc instead of #1, #2, #3. The difference is that one is quoted, the other isn't.
Thanks chundo. Now it works changing parameters:

Code:
"3mapvote"
 {
   "title"        "Which map should be next?"
   "type"         "list"
   "admin"        "sm_admin"
   "cmd"          "sm_setnextmap #4"
   "options"
   {
      "@1"      "@1"
      "@2"      "@2"
      "@3"      "@3"
   }
   "params"
   {
      "1" "mapcycle"
      "2" "mapcycle"
      "3" "mapcycle"
   }
 }
I have replaced command "sm_setnextmap #4" by "sm_cvar sm_nextmap #4" because I do not want to load mapchooser plugin.
This solution was tested on my dods server.

Finally.
__________________

Last edited by Guardia Republicano; 01-27-2009 at 07:54.
Guardia Republicano is offline
madmervin
New Member
Join Date: Feb 2009
Old 02-01-2009 , 09:41   Re: Custom Votes v0.5.6 (1/07)
Reply With Quote #273

Hey
I have this mod on my server and i must hand it to you, its extremely good and useful. There is one downside though. When doing a custom vote e.g. Shall we have a 30 grav match? i have to use underscores instead of spaces cause if i typed /vote Shall we have a 30 grav match? it will use each word as a seperate param. Is there any way to make it so that i could type something like this in chat - /vote <Shall we have a 30 grav match?><Yes><No> - If something like that is possible i highly advise it as an update because it will really improve your custom votes plugin

Madmervin
madmervin is offline
robertwarner
Junior Member
Join Date: Jan 2009
Old 02-01-2009 , 17:40   Re: Custom Votes v0.5.6 (1/07)
Reply With Quote #274

Yes madmervin having the peramiters like <> would be a very good idea. Allowing players to create realistic votes with out putting _ or what ever in. This would be a good thing to work on.
__________________

Steam account robertwarner96 or MSN [email protected]

Monster Projects. Vist now!

robertwarner is offline
Crap
Senior Member
Join Date: Aug 2008
Old 02-03-2009 , 09:52   Re: Custom Votes v0.5.6 (1/07)
Reply With Quote #275

I haven't tried it, but can't you use "" quotes?
Crap is offline
imported_Anth0ny
Senior Member
Join Date: Jan 2005
Location: Saturn
Old 02-04-2009 , 09:18   Re: Custom Votes v0.5.6 (1/07)
Reply With Quote #276

10x fir plugin! nice work!

but need to report a bug...

config:

Code:
"Votes"
    {
    	"voteban"
    	{
    		"title"		"Ban #1 for 30 minutes?"
    		"type"		"chat"
    		"command"	"a_ban #1 30 \"Banned by Vote.\""
    		"trigger"
    		{
    			"command"	"voteban"
    			"notice"	"%u voted to ban #1"
    			"percent"	"70"
    			"count"		"4"
    		}
    		"params"
    		{
    			"1"			"player"
    		}
result (SM log):

Code:
L 02/03/2009 - 19:26:52: [customvotes.smx] Vote succeeded with 75% of the vote (9 votes)
   L 02/03/2009 - 19:26:55: [customvotes.smx] Executing "a_ban "#STEAM_0:1:15183753"0 "Banned by Vote for 30 minutes!""
   L 02/03/2009 - 19:26:55: [adminsystem.smx] PruneBans: SQL_TQuery(bd00b9, " INSERT INTO `sb_banhistory` (`Type`, `RemovedOn`, `RemovedBy`, `IP`, `AuthId`, `Name`, `Created`, `Ends`, `Length`, `Reason`, `AdminId`, `AdminIp`, `SId`) SELECT 'E', UNIX_TIMESTAMP(), '0', `ip`, `authid`, `name`, `Created`, `Ends`, `Length`, `Reason`, `aid`, `adminIp`, `sid` FROM `sb_bans` WHERE `Length` != '0' AND `Ends` < UNIX_TIMESTAMP()")
   L 02/03/2009 - 19:26:55: [adminsystem.smx] ProcessBan: SQL_TQuery(bd00b9, "INSERT INTO `sb_bans` (`ip`, `authid`, `name`, `created`, `ends`, `length`, `reason`, `aid`, `adminIp`, `sid`) VALUES ('69.251.246.76', 'STEAM_0:1:15183753', "Anonymous ", UNIX_TIMESTAMP(), UNIX_TIMESTAMP() + 0, '0', 'Banned by Vote for 30 minutes!', (SELECT `aid` FROM `sb_admins` WHERE `authid` = 'STEAM_ID_SERVER'), '127.0.0.1', 7)")
   L 02/03/2009 - 19:26:55: [adminsystem.smx] "Console<0><Console><Console>" banned "Anonymous <294><STEAM_0:1:15183753><>" (minutes "0") (reason "Banned by Vote for 30 minutes!")
   L 02/03/2009 - 19:26:55: [adminsystem.smx] CommandBan: SQL_TQuery(3c003b, "INSERT INTO bans VALUES ('STEAM_0:1:15183753', 0, 1233678415)")
Very strange phrase...

[customvotes.smx] Executing "a_ban "#STEAM_0:1:15183753"0 "Banned by Vote for 30 minutes!""

# (part of #1 parameter) - present and number "3" is cutted off from time amount "30"...
__________________
aka Mad.Eagle
Creator\Owner\Admin of
www.megatron.ws
imported_Anth0ny is offline
Send a message via ICQ to imported_Anth0ny
robertwarner
Junior Member
Join Date: Jan 2009
Old 02-05-2009 , 02:26   Re: Custom Votes v0.5.6 (1/07)
Reply With Quote #277

Oh i found out how to use this now. You put "Does this work" "yes" "no" and then it works without the _. =P
__________________

Steam account robertwarner96 or MSN [email protected]

Monster Projects. Vist now!

robertwarner is offline
Binksy
Member
Join Date: Jun 2008
Location: UK
Old 02-05-2009 , 14:03   Re: Custom Votes v0.5.6 (1/07)
Reply With Quote #278

We are getting bugs with the !votemenu or sm_votemenu

We have defualt votes problem is when someone uses the !votemenu it will trigger of 1 vote so anyone can use the votes just by them self ? how can we disable the votemenu ?

anyone else get this problem ? public player can type !votemenu and trigger setnextmap ?

Help appreciated or we have to change plugin i tried even installing the plugin again same problem!!!
Binksy is offline
imported_Anth0ny
Senior Member
Join Date: Jan 2005
Location: Saturn
Old 02-06-2009 , 02:23   Re: Custom Votes v0.5.6 (1/07)
Reply With Quote #279

problem is still here......
UP.
__________________
aka Mad.Eagle
Creator\Owner\Admin of
www.megatron.ws
imported_Anth0ny is offline
Send a message via ICQ to imported_Anth0ny
imported_Anth0ny
Senior Member
Join Date: Jan 2005
Location: Saturn
Old 02-09-2009 , 02:24   Re: Custom Votes v0.5.6 (1/07)
Reply With Quote #280

found a problem source:

Code:
/**
    * Given a string, replaces all occurrences of a search string with a 
    * replacement string.
    *
    * @param text	  String to perform search and replacements on.
    * @param maxlength   Maximum length of the string buffer.
    * @param search	String to search for.
    * @param replace   String to replace the search string with.
    * @return		Number of replacements that were performed.
    */
   native ReplaceString(String:text[], maxlength, const String:search[], const String:replace[]);
this function not right replace LONG SteamID.
__________________
aka Mad.Eagle
Creator\Owner\Admin of
www.megatron.ws
imported_Anth0ny is offline
Send a message via ICQ to imported_Anth0ny
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 08:12.


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