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

AMXX Lottery (Plugin/API)


Post New Thread Reply   
 
Thread Tools Display Modes
Mario AR.
Senior Member
Join Date: May 2011
Location: Lima, Perú
Old 07-10-2014 , 08:27   Re: AMXX Lottery
Reply With Quote #11

Quote:
Originally Posted by Backstabnoob View Post
I don't see a point in removing messagemode, it's fine as it is now.

But I have an even better suggestion - rather than having a fixed reward and a fixed amount of numbers in the lottery, why not dynamically generate that based on the amount of players participating? If 10 players participate, the reward could be 10 * cost of an entry. If there are more winners, the reward could be split. That would make it feel less like you're gathering money from thin air (and way more realistic).

The total amount of numbers could be for example participating players * 2. If that's the case, if low amount of players participate (therefore the reward is lower as well), you also get higher chance of winning.

Just my two cents.
Interesting
Working in it.

EDIT: Done.

Last edited by Mario AR.; 07-10-2014 at 09:46.
Mario AR. is offline
klippy
AlliedModders Donor
Join Date: May 2013
Location: Serbia
Old 07-10-2014 , 08:55   Re: AMXX Lottery
Reply With Quote #12

I like Backstabnoob's idea, I am sure it will make plugin even better, but you can go one step further.
How about making a reward forward? For instance
PHP Code:
loto_player_reward(id); // You might need few more parameters, I don't know, that's your own preference 
allowing people to create their own reward. That would be great because it would suit all the custom mods out there having some kind of point system. For instance:
- Ammo Packs on ZP;
- XP on XP mods;
- DRPoints on DR Shop;
- More damage;
- More health;

and a lot of other possibilities!
By the way, great plugin.

Last edited by klippy; 07-10-2014 at 08:56.
klippy is offline
Mario AR.
Senior Member
Join Date: May 2011
Location: Lima, Perú
Old 07-10-2014 , 09:28   Re: AMXX Lottery
Reply With Quote #13

Quote:
Originally Posted by KliPPy View Post
I like Backstabnoob's idea, I am sure it will make plugin even better, but you can go one step further.
How about making a reward forward? For instance
PHP Code:
loto_player_reward(id); // You might need few more parameters, I don't know, that's your own preference 
allowing people to create their own reward. That would be great because it would suit all the custom mods out there having some kind of point system. For instance:
- Ammo Packs on ZP;
- XP on XP mods;
- DRPoints on DR Shop;
- More damage;
- More health;

and a lot of other possibilities!
By the way, great plugin.
You mean... an API?
I like the concept but this seems intended for medium/advanced coders, while this plugin is more intended for beginners. Also, this would cause conflicts with the description, and another forward would be required for "Check and pay". I think it's better to use dynamic natives to communicate the plugins.
Mario AR. is offline
klippy
AlliedModders Donor
Join Date: May 2013
Location: Serbia
Old 07-10-2014 , 10:01   Re: AMXX Lottery
Reply With Quote #14

Quote:
Originally Posted by Mario AR. View Post
You mean... an API?
I like the concept but this seems intended for medium/advanced coders, while this plugin is more intended for beginners. Also, this would cause conflicts with the description, and another forward would be required for "Check and pay". I think it's better to use dynamic natives to communicate the plugins.
Yeah, I would call that an API too.
Anyway, it won't be really medium/advanced, everybody with just a little bit of knowledge could make his reward.
So, instead of calling
PHP Code:
GiveRewards(id
just execute a forward. As for "Check and pay", yeah, you need one more for that if they want to create their own paying methods. So, for "Check and pay" forward you could just check if they returned PLUGIN_HANDLED(unable to buy a ticket) and PLUGIN_CONTINUE(able to buy a ticket).
Now, if they don't want any of this, but just plugin that as it is now, create another download. So, 2 separate plugins, 1 including API and the other without it.
klippy is offline
Mario AR.
Senior Member
Join Date: May 2011
Location: Lima, Perú
Old 07-10-2014 , 10:09   Re: AMXX Lottery
Reply With Quote #15

Quote:
Originally Posted by KliPPy View Post
Yeah, I would call that an API too.
Anyway, it won't be really medium/advanced, everybody with just a little bit of knowledge could make his reward.
So, instead of calling
PHP Code:
GiveRewards(id
just execute a forward. As for "Check and pay", yeah, you need one more for that if they want to create their own paying methods. So, for "Check and pay" forward you could just check if they returned PLUGIN_HANDLED(unable to buy a ticket) and PLUGIN_CONTINUE(able to buy a ticket).
Now, if they don't want any of this, but just plugin that as it is now, create another download. So, 2 separate plugins, 1 including API and the other without it.
Or just a #define inside the source
Btw, I'll do that later, I'm sleepy now! Good night ^^
Mario AR. is offline
xPecie
Senior Member
Join Date: Dec 2012
Location: amxmodx-es.com
Old 07-10-2014 , 10:44   Re: AMXX Lottery
Reply With Quote #16

Good Job Mario ;D

to see if you approve!
xPecie is offline
Groven
AlliedModders Donor
Join Date: Apr 2011
Location: Sweden
Old 07-10-2014 , 11:06   Re: AMXX Lottery
Reply With Quote #17

Looks cool
__________________
Groven is offline
Old 07-10-2014, 11:19
xPecie
This message has been deleted by Backstabnoob. Reason: I'm sure he values your feedback, but you really don't have to post the same thing twice in 30 minutes
DGSFSMM
Member
Join Date: Feb 2014
Old 07-10-2014 , 15:57   Re: AMXX Lottery
Reply With Quote #18

Nice!
DGSFSMM is offline
Mario AR.
Senior Member
Join Date: May 2011
Location: Lima, Perú
Old 07-11-2014 , 03:44   Re: AMXX Lottery (Plugin/API)
Reply With Quote #19

Thank you all for your positive comments! I've finished with the API! It is easier to use and a lot more powerful than the old functions. Read the main post ^^
Mario AR. is offline
klippy
AlliedModders Donor
Join Date: May 2013
Location: Serbia
Old 07-11-2014 , 08:43   Re: AMXX Lottery (Plugin/API)
Reply With Quote #20

Great job now! I'm pretty sure if everything works how it should, your plugin will be approved.
By the way, I've done Serbian translation in Translation thread, take a look at that.
And, you should make macros for bitsum operations, like these ones:
PHP Code:
g_bParticipate &= ~(1<<id-1);
g_bConfirmed &= ~(1<<id-1);
g_bDontAsk &= ~(1<<id-1); 
Here I got some, but you could easily find multiple of these on the forum already.
PHP Code:
#define set_bit(%1,%2)    (%1 |= (1 << (%2 & 31)))
#define clr_bit(%1,%2)    (%1 &= ~(1 << (%2 & 31)))
#define get_bit(%1,%2)    !!(%1 & (1 << (%2 & 31))) 
klippy 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:52.


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