Raised This Month: $ Target: $400
 0% 

Knife Deathmatch Shop


Post New Thread Reply   
 
Thread Tools Display Modes
xEhsaan
Member
Join Date: Mar 2015
Location: Isfahan, Iran
Old 05-12-2015 , 03:43   Re: Knife Deathmatch Shop
Reply With Quote #11

Updated to Version 3.4
Full changelog is available.

Thanks to Kia & Arkshine for their awesome plugin page
__________________
* Wait for something awesome...
* AMX Mod X Plugin Translation Repository [Paused Temporarily]
* Knife Deathmatch Shop
* Knife CFG Detector
* Looking for an idea...
xEhsaan is offline
Send a message via Skype™ to xEhsaan
Kia
AlliedModders Donor
Join Date: Apr 2010
Location: In a world of madness
Old 05-12-2015 , 06:55   Re: Knife Deathmatch Shop
Reply With Quote #12

Code:
iPrice = g_Items[0][0];     iTime = g_Items[0][1];     bCanBuy = ( iFrags >= iPrice ) ? true : false;     formatex( tItem , charsmax( tItem ), "%L", LANG_PLAYER, "GLOW_ITEM", ( bCanBuy ? "\w" : "\d" ), ( bCanBuy ? "\y" : "\d" ), iPrice, ( bCanBuy ? "\r" : "\d" ), iTime );     menu_additem( g_Menu, tItem, "Glow" );         iPrice = g_Items[1][0];     iTime = g_Items[1][1];     bCanBuy = ( iFrags >= iPrice ) ? true : false;     formatex( tItem , charsmax( tItem ), "%L", LANG_PLAYER, "HP_ITEM", ( bCanBuy ? "\w" : "\d" ), iTime, ( bCanBuy ? "\y" : "\d" ), iPrice, ( bCanBuy ? "\r" : "\d" ) );     menu_additem( g_Menu, tItem, "HP" );         iPrice = g_Items[2][0];     iTime = g_Items[2][1];     bCanBuy = ( iFrags >= iPrice ) ? true : false;     formatex( tItem , charsmax( tItem ), "%L", LANG_PLAYER, "SPEED_ITEM", ( bCanBuy ? "\w" : "\d" ), ( bCanBuy ? "\y" : "\d" ), iPrice, ( bCanBuy ? "\r" : "\d" ), iTime );     menu_additem( g_Menu, tItem, "Speed" );         iPrice = get_pcvar_num( g_pHookPrice );     iTime = get_pcvar_num( g_pHookTime );     bCanBuy = ( iFrags >= iPrice ) ? true : false;     formatex( tItem , charsmax( tItem ), "%L", LANG_PLAYER, "HOOK_ITEM", ( bCanBuy ? "\w" : "\d" ), ( bCanBuy ? "\y" : "\d" ), iPrice, ( bCanBuy ? "\r" : "\d" ), iTime );     menu_additem( g_Menu, tItem, "Hook" );         iPrice = get_pcvar_num( g_pGodModePrice );     iTime = get_pcvar_num( g_pGodModeTime );     bCanBuy = ( iFrags >= iPrice ) ? true : false;     formatex( tItem , charsmax( tItem ), "%L", LANG_PLAYER, "GOD_ITEM", ( bCanBuy ? "\w" : "\d" ), ( bCanBuy ? "\y" : "\d" ), iPrice, ( bCanBuy ? "\r" : "\d" ), iTime );     menu_additem( g_Menu, tItem, "God" );

Why not putting all items into an array (use an enum to define structure) and loop then? See Furien V64 for reference.
__________________
Kia is offline
xEhsaan
Member
Join Date: Mar 2015
Location: Isfahan, Iran
Old 05-12-2015 , 08:25   Re: Knife Deathmatch Shop
Reply With Quote #13

I saw it and I got it how did you do that.
But, What's the difference now between the way you've done and the way I've done?
The best method is the easiest one ;)
__________________
* Wait for something awesome...
* AMX Mod X Plugin Translation Repository [Paused Temporarily]
* Knife Deathmatch Shop
* Knife CFG Detector
* Looking for an idea...
xEhsaan is offline
Send a message via Skype™ to xEhsaan
Shiina.Mashiro
Senior Member
Join Date: Sep 2014
Location: Vietnam
Old 05-12-2015 , 09:28   Re: Knife Deathmatch Shop
Reply With Quote #14

@xEhsaan:
but it makes your code looks much neater, and easier for us to read.
__________________
Shiina.Mashiro is offline
xEhsaan
Member
Join Date: Mar 2015
Location: Isfahan, Iran
Old 05-12-2015 , 12:45   Re: Knife Deathmatch Shop
Reply With Quote #15

@Shiina:
But harder for me
OK, Thanks to you two, I'll do it for next release.

When a plugin gonna to be approved? What's needed?
__________________
* Wait for something awesome...
* AMX Mod X Plugin Translation Repository [Paused Temporarily]
* Knife Deathmatch Shop
* Knife CFG Detector
* Looking for an idea...
xEhsaan is offline
Send a message via Skype™ to xEhsaan
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 05-12-2015 , 12:54   Re: Knife Deathmatch Shop
Reply With Quote #16

Quote:
Originally Posted by xEhsaan View Post
I saw it and I got it how did you do that.
But, What's the difference now between the way you've done and the way I've done?
The best method is the easiest one ;)
The best method is not the easiest one everytime. The best method is the one that can to the job better than any other.
A plugin will be checked when an approver have time. There isn't a specific time.
__________________
HamletEagle is offline
Jhob94
AMX Mod X Donor
Join Date: Jul 2012
Old 05-12-2015 , 13:40   Re: Knife Deathmatch Shop
Reply With Quote #17

Quote:
Originally Posted by xEhsaan View Post
@Shiina:
But harder for me
OK, Thanks to you two, I'll do it for next release.

When a plugin gonna to be approved? What's needed?
I think this kind of plugin won't get approved even if the code is ok.
There is a shop api by exolent for example, and it's global. You could make sub items for it's shop. So yeah.. This kind of plugin is more for suggestion/request than approved plugins section.
__________________
Jhob94 is offline
xEhsaan
Member
Join Date: Mar 2015
Location: Isfahan, Iran
Old 05-12-2015 , 14:37   Re: Knife Deathmatch Shop
Reply With Quote #18

Quote:
Originally Posted by Jhob94 View Post
I think this kind of plugin won't get approved even if the code is ok.
There is a shop api by exolent for example, and it's global. You could make sub items for it's shop. So yeah.. This kind of plugin is more for suggestion/request than approved plugins section.
The code is okay and what Kia is saying is just a little performance tip, not a code problem.
My plugin is different than exolent's API anyway, If everyone had to use his API, half of approved plugins shouldn't approve.

Anyway, my plugin approve isn't so important for me. I did my best
And last note is PLEASE READ MY CODE COMPLETELY AND THEN COMMENT

Thanks
__________________
* Wait for something awesome...
* AMX Mod X Plugin Translation Repository [Paused Temporarily]
* Knife Deathmatch Shop
* Knife CFG Detector
* Looking for an idea...
xEhsaan is offline
Send a message via Skype™ to xEhsaan
Shiina.Mashiro
Senior Member
Join Date: Sep 2014
Location: Vietnam
Old 05-13-2015 , 02:06   Re: Knife Deathmatch Shop
Reply With Quote #19

Quote:
Originally Posted by xEhsaan View Post
The code is okay and what Kia is saying is just a little performance tip, not a code problem.
My plugin is different than exolent's API anyway, If everyone had to use his API, half of approved plugins shouldn't approve.

Anyway, my plugin approve isn't so important for me. I did my best
And last note is PLEASE READ MY CODE COMPLETELY AND THEN COMMENT

Thanks
You need to accept the fact that there are many shop plugins exists, and your have nothing ordinary, so it is kinda hard for the approver to approve this.
__________________
Shiina.Mashiro is offline
xEhsaan
Member
Join Date: Mar 2015
Location: Isfahan, Iran
Old 05-13-2015 , 08:12   Re: Knife Deathmatch Shop
Reply With Quote #20

Done! Accepted that fact
But I already searched the whole AlliedModders and I didn't find anything that works just like this plugin.
I say that again, It does NOT matter for me to approve, I'm just asking when.

Also, Spanish Translate added. Thanks a lot, Jujitosis.
__________________
* Wait for something awesome...
* AMX Mod X Plugin Translation Repository [Paused Temporarily]
* Knife Deathmatch Shop
* Knife CFG Detector
* Looking for an idea...
xEhsaan is offline
Send a message via Skype™ to xEhsaan
Reply


Thread Tools
Display Modes

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 20:48.


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