View Single Post
Powerlord
AlliedModders Donor
Join Date: Jun 2008
Location: Seduce Me!
Old 07-30-2011 , 13:10   Re: [WIP] Builtin Votes
Reply With Quote #11

Quote:
Originally Posted by GoD-Tony View Post
Sorry if this has already been answered, but couldn't this be done in pawn (still providing natives) since it's based on usermessages?
It can, but in doing so, you lose:
  1. Handle type checking.
  2. The ability to return things via multi-dimensional arrays.
The decision to make this an extension was made by me in order to make it as close to a drop-in replacement for the current voting system as possible.

#2 causes huge problems because of how the current VoteHandler callback works, which is used with SetVoteResultsCallback. Specifically, it takes two multi-dimensional arrays. Which means the BuiltinVotes equivalent would have to return adt_arrays and the vote processing would have to be different.
__________________
Not currently working on SourceMod plugin development.

Last edited by Powerlord; 07-30-2011 at 13:40.
Powerlord is offline