Raised This Month: $32 Target: $400
 8% 

Multi Vote


Post New Thread Reply   
 
Thread Tools Display Modes
Xanimos
Veteran Member
Join Date: Apr 2005
Location: Florida
Old 03-28-2007 , 17:29   Re: Multi Vote
Reply With Quote #11

Your problem is right here:
Code:
	for(new a = 1; a < get_playersnum(); a++)
		menu_display(a, menu, 0)
Use this instead.
Code:
	new Players[32],iNum
	get_players(Players,iNum,"ch")
	for(new a = 1; a < iNum; a++)
		menu_display(Players[a], menu, 0)
Xanimos is offline
Send a message via AIM to Xanimos Send a message via MSN to Xanimos
Old 03-28-2007, 18:36
Angelina
This message has been deleted by Angelina.
Old 03-29-2007, 03:48
Da_sk8rboy
This message has been deleted by Da_sk8rboy.
Da_sk8rboy
Veteran Member
Join Date: Jul 2006
Old 03-29-2007 , 03:52   Re: Multi Vote
Reply With Quote #12

maybe add an optional cvar that allows all votes/answers logged into a .ini would be nice.
__________________
i stop around here and there.
Da_sk8rboy is offline
Deviance
Veteran Member
Join Date: Nov 2004
Location: Sweden
Old 03-29-2007 , 05:37   Re: Multi Vote
Reply With Quote #13

Quote:
Originally Posted by Xanimos View Post
Your problem is right here:
Code:
	for(new a = 1; a < get_playersnum(); a++)
		menu_display(a, menu, 0)
Use this instead.
Code:
	new Players[32],iNum
	get_players(Players,iNum,"ch")
	for(new a = 1; a < iNum; a++)
		menu_display(Players[a], menu, 0)
Thanks Xanimos...

@Angelina: Ok i updated so you can have more letters
Deviance is offline
Old 03-29-2007, 09:50
Angelina
This message has been deleted by Angelina.
Deviance
Veteran Member
Join Date: Nov 2004
Location: Sweden
Old 03-29-2007 , 12:39   Re: Multi Vote
Reply With Quote #14

Quote:
Originally Posted by Angelina View Post
" But i've got aproblem:
When i vote, the first vote wins, and the other is not work..
So i vote,
i press 1
its prints : voted option 1 (or something like this)
when other players press one of the options,
its dont print anything
and the result will be the
Option 1 was the first winner with 1 vote
and none of the options was the second highest..

So, only one player can vote"

after the update, i have the same problem...
after the second voting, plugin dont work !!!
Try this
Attached Files
File Type: sma Get Plugin or Get Source (multi_vote_beta.sma - 738 views - 3.2 KB)

Last edited by Deviance; 03-29-2007 at 12:52.
Deviance is offline
Old 03-29-2007, 13:19
Angelina
This message has been deleted by Angelina.
Deviance
Veteran Member
Join Date: Nov 2004
Location: Sweden
Old 03-29-2007 , 13:22   Re: Multi Vote
Reply With Quote #15

ok good, i updated the plugin. Should work now
Deviance is offline
Old 03-29-2007, 14:16
Angelina
This message has been deleted by Angelina.
Old 03-29-2007, 14:22
Deviance
This message has been deleted by Deviance. Reason: nvm
Old 03-29-2007, 14:37
Angelina
This message has been deleted by Angelina.
Old 03-29-2007, 14:56
Deviance
This message has been deleted by Deviance. Reason: nvm
Old 03-29-2007, 15:46
Angelina
This message has been deleted by Angelina.
_Master_
Senior Member
Join Date: Dec 2006
Old 03-30-2007 , 04:22   Re: Multi Vote
Reply With Quote #16

PHP Code:
public cmd_vote(idlevelcid)
{
    if(!
cmd_access(idlevelcid2))
    return 
PLUGIN_HANDLED
    
    
new arg1[56]              <------------------- PROBLEM HERE
    read_argv
(1arg155)
    
    
num_of_answers = (read_argc() - 2)
    
    new 
2    
    
for(new 0num_of_answersc++)
    {        
        
read_argv(ianswers[c], 63)
        
i++
    }
    
    
display_menu(arg1num_of_answers)
    return 
PLUGIN_HANDLED

_Master_ is offline
Old 03-30-2007, 04:43
Angelina
This message has been deleted by Angelina.
_Master_
Senior Member
Join Date: Dec 2006
Old 03-30-2007 , 04:48   Re: Multi Vote
Reply With Quote #17

Replace
PHP Code:
new arg1[56]
read_argv(1arg155
with
PHP Code:
new arg1[91]
read_argv(1arg190
Should be able to have questions up to 90 chars.

Last edited by _Master_; 03-30-2007 at 04:54.
_Master_ is offline
Old 03-30-2007, 04:53
Angelina
This message has been deleted by Angelina.
Deviance
Veteran Member
Join Date: Nov 2004
Location: Sweden
Old 03-30-2007 , 04:57   Re: Multi Vote
Reply With Quote #18

Side-note: PM me next time...
Deviance is offline
_Master_
Senior Member
Join Date: Dec 2006
Old 03-30-2007 , 05:07   Re: Multi Vote
Reply With Quote #19

@Angelina cu placere
@Deviance sorry bout messing with your code
_Master_ is offline
Deviance
Veteran Member
Join Date: Nov 2004
Location: Sweden
Old 03-30-2007 , 05:16   Re: Multi Vote
Reply With Quote #20

Quote:
Originally Posted by _Master_ View Post
@Deviance sorry bout messing with your code
Np, thanks anyway
Deviance 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 02:49.


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