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

Shop System + API


Post New Thread Reply   
 
Thread Tools Display Modes
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 05-05-2012 , 20:21   Re: Shop System + API
Reply With Quote #21

Quote:
Originally Posted by yokomo View Post
Ok nice, v.0.0.5 is working fine with no bug. But at your 1st post:

It should be 0.0.5
typos.
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
Jockey
Member
Join Date: Nov 2008
Location: Germany
Old 05-19-2012 , 03:41   Re: Shop System + API
Reply With Quote #22

Is there a way to save the points ?

So if you disconnect and connect again the points will be there.

Because i think its a nice way to make it with points but every mapchange

the points will be cleared.

Mfg

Jockey
Jockey is offline
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 07-16-2012 , 11:24   Re: Shop System + API
Reply With Quote #23

Updated to v0.0.6:

Quote:
Originally Posted by Exolent[jNr] View Post
Changelog

0.0.6
  • Added support for handling reset timers and events
New cvars are generated for items, new parameters for shop_add_item(), and a new forward shop_item_reset().
All example plugins have been updated that were affected by this update.

Also, requests for shop items are being taken here:
https://forums.alliedmods.net/showthread.php?t=189981
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
CS-A-Roland
Member
Join Date: Jul 2009
Old 07-17-2012 , 09:13   Re: Shop System + API
Reply With Quote #24

Is it possible to make a .ini file for it like:

Code:
shop_item_place "1"
shop_item_plugin "shop_item_gravity"
shop_item_enabled "1"
shop_item_cost "100"
shop_item_team "0"
shop_item_delay "0"
shop_item_reset_option "death"
shop_item_reset_time "0"

shop_item_place "2"
shop_item_plugin "shop_item_napalm_nades"
shop_item_enabled "1"
shop_item_cost "100"
shop_item_team "0"
shop_item_delay "-1"
shop_item_reset_option "round,death"
shop_item_reset_time "0"

by the way, don't laught, i don't know how i can set the items into the shop api, the multi example is not bad but, it seems that i have to insert the whole item into it?! Is it right, or can they run out of their own amxx and ive just to set the "parameters" into it?!
If it so, how it sort?! By first, second and so on entry?!

Hope you can help me a lot, im still testing how it work's! If i find it out i will make an "How to" or dummies... (like me by the way... )
__________________
oOOOoooh it's www.Cs-Attack.de
New World of Warcraft Mod Beta 0.5(based on WC3FT 3.5)
Counterstrike 1.6 SERVER:
Server IP: 193.192.58.154:27200

CONDITION ZERO SERVER:
Server IP: 193.192.58.154:27016

Last edited by CS-A-Roland; 07-17-2012 at 09:15.
CS-A-Roland is offline
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 07-17-2012 , 10:27   Re: Shop System + API
Reply With Quote #25

Updated to v0.0.7 and added more information in the first post:

Quote:
Originally Posted by Exolent[jNr] View Post
Installation
When installing sub-plugins, they must be AFTER shop_api.amxx in the plugins.ini to work!
Shop items appear in the menu in the order of the plugins in the plugins.ini.

Generated Cvars
There are cvars generated for every item in the menu.
To see these cvars, run the plugin and sub-plugins on your server once so a config file is generated.
Then, you can go to addons/amxmodx/configs/shop.cfg.
Be sure to read the comments in the file!

Changelog
0.0.7
  • Added support for handling reset on disconnect
  • Changed shop_item_register_cvar() from stock to native and to use item id instead of short name, and allowed "flags" and "fvalue" parameters.
  • Added generated config file for server owners to see the full cvar list from these plugins.]
All affected sub-plugins have been updated.
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
CS-A-Roland
Member
Join Date: Jul 2009
Old 07-17-2012 , 11:44   Re: Shop System + API
Reply With Quote #26

First it works now with the api!!!! Big thanks!!!

Then...
Compile errors with medic and armor both with:

Armor got at Line 23: Error 035: argument type mismatch (argument 1)
Medic got at Line 99, 100, 101, 102, 103, 104: Error 035: argument type mismatch (argument 1)

Glow works fine but if i turn it to "100" $ and i have 800 $ i got the glow but also my 800$
Good deal but i think ther is a bug... (but it was a first test with it, i will do more test's to look if it's a cvar problem)

By the way, is it possible to make just one item buyable? I can buy both at a time. And it would be nice if there like WC3FT a small information at the left or right site where i see wich item i bought.


There is in the amx_logs again somting wrong too:
L 07/17/2012 - 18:16:08: Invalid cellvector handle provided (17:1:1)
L 07/17/2012 - 18:16:08: [AMXX] Run time error 10 (plugin "shop_api.amxx") (native "ArrayGetArray") - debug not enabled!
L 07/17/2012 - 18:16:08: [AMXX] To enable debug mode, add "debug" after the plugin name in plugins.ini (without quotes).
__________________
oOOOoooh it's www.Cs-Attack.de
New World of Warcraft Mod Beta 0.5(based on WC3FT 3.5)
Counterstrike 1.6 SERVER:
Server IP: 193.192.58.154:27200

CONDITION ZERO SERVER:
Server IP: 193.192.58.154:27016

Last edited by CS-A-Roland; 07-17-2012 at 12:19.
CS-A-Roland is offline
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 07-17-2012 , 12:21   Re: Shop System + API
Reply With Quote #27

Quote:
Originally Posted by CS-A-Roland View Post
Compile errors with medic and armor both with:

Armor got at Line 23: Error 035: argument type mismatch (argument 1)
Medic got at Line 99, 100, 101, 102, 103, 104: Error 035: argument type mismatch (argument 1)
Update your shop.inc file.

Quote:
Originally Posted by CS-A-Roland View Post
Glow works fine but if i turn it to "100" $ and i have 800 $ i got the glow but also my 800$
Good deal but i think ther is a bug... (but it was a first test with it, i will do more test's to look if it's a cvar problem)
So, you're saying the money system (detecting if enough money, and subtracting cost from money) isn't working?

Quote:
Originally Posted by CS-A-Roland View Post
By the way, is it possible to make just one item buyable? I can buy both at a time.
I can add support for shop_item_selected() forward where any return besides PLUGIN_CONTINUE would stop the plugin from allowing the player to buy it.
Then a sub-plugin could be written to handle all shop_item_selected() calls.

Quote:
Originally Posted by CS-A-Roland View Post
And it would be nice if there like WC3FT a small information at the left or right site where i see wich item i bought.
I could write that, but I think a menu like /items or an option in the shop to open a menu to show what items you have would be best.
My reason for this is you can have infinite items and they all won't fit in a StatusText message or a HUD message if you have too many.
But in a menu, you can browse through them and possibly have it so when you select one in your menu it tells you a description about the item.
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
CS-A-Roland
Member
Join Date: Jul 2009
Old 07-17-2012 , 12:45   Re: Shop System + API
Reply With Quote #28

Ok... updatet shop_api and inc:

Code:
L 07/17/2012 - 18:42:47: Start of error session.
L 07/17/2012 - 18:42:47: Info (map "de_dust2_cz") (file "addons/amxmodx/logs/error_20120717.log")
L 07/17/2012 - 18:42:47: Invalid callback specified for allowed!
L 07/17/2012 - 18:42:47: [AMXX] Displaying debug trace (plugin "shop_item_titanium_armor.amxx")
L 07/17/2012 - 18:42:47: [AMXX] Run time error 27: unknown error 
L 07/17/2012 - 18:42:47: [AMXX]    [0] shop_item_titanium_armor.sma::plugin_init (line 21)
L 07/17/2012 - 18:42:47: Invalid CVAR pointer
L 07/17/2012 - 18:42:47: [AMXX] Displaying debug trace (plugin "shop_api.amxx")
L 07/17/2012 - 18:42:47: [AMXX] Run time error 10: native error (native "get_pcvar_string")
L 07/17/2012 - 18:42:47: [AMXX]    [0] shop_api.sma::plugin_cfg (line 139)
L 07/17/2012 - 18:42:52: Invalid cellvector handle provided (19:1:1)
L 07/17/2012 - 18:42:52: [AMXX] Displaying debug trace (plugin "shop_api.amxx")
L 07/17/2012 - 18:42:52: [AMXX] Run time error 10: native error (native "ArrayGetArray")
L 07/17/2012 - 18:42:52: [AMXX]    [0] shop_api.sma::CheckResets (line 470)
L 07/17/2012 - 18:42:52: [AMXX]    [1] shop_api.sma::EventNewRound (line 462)
I will test if the buy funcion works now, and wich item could make problems on the server. I'l report it here again then...
__________________
oOOOoooh it's www.Cs-Attack.de
New World of Warcraft Mod Beta 0.5(based on WC3FT 3.5)
Counterstrike 1.6 SERVER:
Server IP: 193.192.58.154:27200

CONDITION ZERO SERVER:
Server IP: 193.192.58.154:27016
CS-A-Roland is offline
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 07-17-2012 , 13:02   Re: Shop System + API
Reply With Quote #29

Updated to v0.0.8:

Quote:
Originally Posted by Exolent[jNr] View Post
Changelog
0.0.8
  • Fixed bug with new cvar register method
  • Fixed bug with reset data not being prepared on items added
  • Added support for return in shop_item_selected() to be able to disable the purchase
Quote:
Originally Posted by CS-A-Roland View Post
Ok... updatet shop_api and inc:

Code:
L 07/17/2012 - 18:42:47: Start of error session.
L 07/17/2012 - 18:42:47: Info (map "de_dust2_cz") (file "addons/amxmodx/logs/error_20120717.log")
L 07/17/2012 - 18:42:47: Invalid callback specified for allowed!
L 07/17/2012 - 18:42:47: [AMXX] Displaying debug trace (plugin "shop_item_titanium_armor.amxx")
L 07/17/2012 - 18:42:47: [AMXX] Run time error 27: unknown error 
L 07/17/2012 - 18:42:47: [AMXX]    [0] shop_item_titanium_armor.sma::plugin_init (line 21)
L 07/17/2012 - 18:42:47: Invalid CVAR pointer
L 07/17/2012 - 18:42:47: [AMXX] Displaying debug trace (plugin "shop_api.amxx")
L 07/17/2012 - 18:42:47: [AMXX] Run time error 10: native error (native "get_pcvar_string")
L 07/17/2012 - 18:42:47: [AMXX]    [0] shop_api.sma::plugin_cfg (line 139)
L 07/17/2012 - 18:42:52: Invalid cellvector handle provided (19:1:1)
L 07/17/2012 - 18:42:52: [AMXX] Displaying debug trace (plugin "shop_api.amxx")
L 07/17/2012 - 18:42:52: [AMXX] Run time error 10: native error (native "ArrayGetArray")
L 07/17/2012 - 18:42:52: [AMXX]    [0] shop_api.sma::CheckResets (line 470)
L 07/17/2012 - 18:42:52: [AMXX]    [1] shop_api.sma::EventNewRound (line 462)
I will test if the buy funcion works now, and wich item could make problems on the server. I'l report it here again then...
Use the new updated API and I also updated the armor plugin.
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
CS-A-Roland
Member
Join Date: Jul 2009
Old 07-17-2012 , 13:28   Re: Shop System + API
Reply With Quote #30

It's getting better... for the plugins! ;)
Must test something more, it could be there is something missing or something else that napalm interrupts, because i get no damage if i stand in the grenade and i dont burn and dont scream.

Glow works fine nothing to say about it, titanium also now!!! Great work!!! I test more with medic (untestet because i dont know the key as i play) and napalm with debug and so on.

But your shop api needs more fixxes:
Code:
L 07/17/2012 - 18:55:58: Invalid cellvector handle provided (19:1:1)
L 07/17/2012 - 18:55:58: [AMXX] Displaying debug trace (plugin "shop_api.amxx")
L 07/17/2012 - 18:55:58: [AMXX] Run time error 10: native error (native "ArrayGetArray")
L 07/17/2012 - 18:55:58: [AMXX]    [0] shop_api.sma::CheckResets (line 470)
L 07/17/2012 - 18:55:58: [AMXX]    [1] shop_api.sma::EventNewRound (line 462)
L 07/17/2012 - 18:57:08: Invalid cellvector handle provided (19:1:1)
L 07/17/2012 - 18:57:08: [AMXX] Displaying debug trace (plugin "shop_api.amxx")
L 07/17/2012 - 18:57:08: [AMXX] Run time error 10: native error (native "ArrayGetArray")
L 07/17/2012 - 18:57:08: [AMXX]    [0] shop_api.sma::CheckResets (line 470)
L 07/17/2012 - 18:57:08: [AMXX]    [1] shop_api.sma::EventNewRound (line 462)
but you do a great job, it's crazy how fast you are!
I'll report if i got something new!
__________________
oOOOoooh it's www.Cs-Attack.de
New World of Warcraft Mod Beta 0.5(based on WC3FT 3.5)
Counterstrike 1.6 SERVER:
Server IP: 193.192.58.154:27200

CONDITION ZERO SERVER:
Server IP: 193.192.58.154:27016
CS-A-Roland 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 22:00.


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