Raised This Month: $32 Target: $400
 8% 

SHOP Menu


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
cHeesY.
Member
Join Date: Nov 2013
Old 08-31-2014 , 12:18   SHOP Menu
Reply With Quote #1

Hello

I created a HP Shop today, and everything alright, but it was a problem !!
Players HP in many rounds they buy, how to make only one round to buy ?
__________________
cHeesY. is offline
mottzi
Veteran Member
Join Date: May 2010
Location: Switzerland
Old 08-31-2014 , 13:28   Re: SHOP Menu
Reply With Quote #2

using variables.
mottzi is offline
Send a message via MSN to mottzi
aron9forever
Veteran Member
Join Date: Feb 2013
Location: Rromania
Old 09-01-2014 , 08:29   Re: SHOP Menu
Reply With Quote #3

new g_usedshop[33]

right after you give HP, g_usedshop[id]=1

right before you show the shop menu, if(g_usedshop[id]) return PLUGIN_CONTINUE

on round start, or on user spawn, g_usedshop[id]=0
__________________
Meanwhile, in 2050:
Quote:
Originally Posted by aron9forever
useless small optimizations
Quote:
Originally Posted by Black Rose View Post
On a map that is 512x512x128 units you end up with 3,355,443,200,000 different "positions". To store each one of those positions individually in the variable "user_or" you need 12 terabytes of memory.

Last edited by aron9forever; 09-01-2014 at 08:30.
aron9forever is offline
indraraj striker
Veteran Member
Join Date: Mar 2014
Location: Under the water
Old 09-02-2014 , 06:09   Re: SHOP Menu
Reply With Quote #4

Quote:
Originally Posted by aron9forever View Post
new g_usedshop[33]

right after you give HP, g_usedshop[id]=1

right before you show the shop menu, if(g_usedshop[id]) return PLUGIN_CONTINUE

on round start, or on user spawn, g_usedshop[id]=0
@aron

its bool function na for true and false

new bool:g_usershop[33]
__________________
Thanks everyone. #miss_you_all
indraraj striker is offline
mottzi
Veteran Member
Join Date: May 2010
Location: Switzerland
Old 09-02-2014 , 07:10   Re: SHOP Menu
Reply With Quote #5

Theres no difference. Well besides readability.
mottzi is offline
Send a message via MSN to mottzi
aron9forever
Veteran Member
Join Date: Feb 2013
Location: Rromania
Old 09-02-2014 , 07:23   Re: SHOP Menu
Reply With Quote #6

Quote:
Originally Posted by indraraj striker View Post
@aron

its bool function na for true and false

new bool:g_usershop[33]
true = 1
false = 0

not just by my means but if you'd try to print a bool that's what you'd get
__________________
Meanwhile, in 2050:
Quote:
Originally Posted by aron9forever
useless small optimizations
Quote:
Originally Posted by Black Rose View Post
On a map that is 512x512x128 units you end up with 3,355,443,200,000 different "positions". To store each one of those positions individually in the variable "user_or" you need 12 terabytes of memory.
aron9forever is offline
mottzi
Veteran Member
Join Date: May 2010
Location: Switzerland
Old 09-02-2014 , 08:05   Re: SHOP Menu
Reply With Quote #7

0 = false
Everything else = true
mottzi is offline
Send a message via MSN to mottzi
aron9forever
Veteran Member
Join Date: Feb 2013
Location: Rromania
Old 09-02-2014 , 08:07   Re: SHOP Menu
Reply With Quote #8

Quote:
Originally Posted by mottzi View Post
0 = false
Everything else = true

i was talking about booleans not applying the if statement to an integer
__________________
Meanwhile, in 2050:
Quote:
Originally Posted by aron9forever
useless small optimizations
Quote:
Originally Posted by Black Rose View Post
On a map that is 512x512x128 units you end up with 3,355,443,200,000 different "positions". To store each one of those positions individually in the variable "user_or" you need 12 terabytes of memory.
aron9forever is offline
Fuck For Fun
Veteran Member
Join Date: Nov 2013
Old 09-02-2014 , 10:34   Re: SHOP Menu
Reply With Quote #9

You can do that you can use the command once in Round 1 ..
Code:
new Float:g_iUseTimes[ 33 ]
and in public
Code:
if ( g_iUseTimes[ client ] >= 1 )
Fuck For Fun is offline
Send a message via Skype™ to Fuck For Fun
xDoctor
Member
Join Date: Jul 2013
Old 09-10-2014 , 10:42   Re: SHOP Menu
Reply With Quote #10

Quote:
Originally Posted by Fuck For Fun View Post
You can do that you can use the command once in Round 1 ..
Code:
new Float:g_iUseTimes[ 33 ]
and in public
Code:
if ( g_iUseTimes[ client ] >= 1 )
Thats wrong

Float its with .0 in the end

Its new g_iUseTimes[ 33 ];

.....
xDoctor 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 13:40.


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