Difference between revisions of "Talk:Left 4 Voting 2"
(Use a hook into "VoteRegistered" instead of hooking the vote command?) |
|||
Line 1: | Line 1: | ||
Wouldn't it be a better idea to hook the user message "VoteRegistered" and use const players[] (which length would be 1 and would contain the userid or clientid(?)) to determine which player did the vote? This would be more accurate than parsing the vote command and filtering out who has already voted since "VoteRegistered" would only be sent when the vote was actually accepted and not when someone attempts to vote (again or isn't allowed to). | Wouldn't it be a better idea to hook the user message "VoteRegistered" and use const players[] (which length would be 1 and would contain the userid or clientid(?)) to determine which player did the vote? This would be more accurate than parsing the vote command and filtering out who has already voted since "VoteRegistered" would only be sent when the vote was actually accepted and not when someone attempts to vote (again or isn't allowed to). | ||
+ | :If you're manually creating the vote, the game server won't handle the vote processing for you and ''you'' will be responsible for sending the VoteRegistered UserMessage yourself based on what Vote command they send to you. | ||
+ | |||
+ | :Granted, at this point you might as well use the SourceMod NativeVotes plugin as it's a wrapper for the L4D, L4D2, TF2, and CS:GO vote systems. | ||
+ | :--[[User:Powerlord|Powerlord]] ([[User talk:Powerlord|talk]]) 22:46, 12 June 2013 (CDT) |
Revision as of 21:46, 12 June 2013
Wouldn't it be a better idea to hook the user message "VoteRegistered" and use const players[] (which length would be 1 and would contain the userid or clientid(?)) to determine which player did the vote? This would be more accurate than parsing the vote command and filtering out who has already voted since "VoteRegistered" would only be sent when the vote was actually accepted and not when someone attempts to vote (again or isn't allowed to).
- If you're manually creating the vote, the game server won't handle the vote processing for you and you will be responsible for sending the VoteRegistered UserMessage yourself based on what Vote command they send to you.