This site is a testing version, but all data is shared with the live forum.


Raised This Month: $ Target: $400
 0% 

CS Shop 3.0


Post New Thread Reply   
 
Thread Tools Display Modes
anakin_cstrike
Veteran Member
Join Date: Nov 2007
Location: Romania
Old 07-26-2008 , 09:35   Re: Buy Gravity 2.1
Reply With Quote #11

Quote:
Interesting
__________________

anakin_cstrike is offline
PvtSmithFSSF
Senior Member
Join Date: Jul 2008
Old 07-26-2008 , 09:41   Re: Buy Gravity 2.1
Reply With Quote #12

Glad you think so =)
PvtSmithFSSF is offline
IneedHelp
Veteran Member
Join Date: Mar 2007
Location: Argentina
Old 07-26-2008 , 13:42   Re: Buy Gravity 2.1
Reply With Quote #13

You release it! Thanks for put me in the credits.

Some ideas for this plugin:
- No only a menu for gravity, more menus, like minimiller says. (speed,ammo,etc)
- The price of each thing, like Alucard^ say.

- Hook say & say_team to display menu (optimization)
- You can do Pcvars[5] and make the cvar of msg display
- I think you can put set_task in the client_connect, no in plugin_init for show message

That's all, gj
__________________
IneedHelp is offline
PvtSmithFSSF
Senior Member
Join Date: Jul 2008
Old 07-26-2008 , 13:46   Re: Buy Gravity 2.1
Reply With Quote #14

1) Yeah soon I'll start a new plugin with more than just gravity.
2) Can't figure out how to do that. Putting a command in a quote. Hmm.
3) What's hook say? Say_Team is not that big of a deal but I guess I can slip it in...
4) Yah I can but I added it a bit later, and it was easier to just do it seperate
5) I'm PMing you a question. Thanks for the idea btw.
PvtSmithFSSF is offline
PvtSmithFSSF
Senior Member
Join Date: Jul 2008
Old 07-26-2008 , 14:51   Re: Buy Gravity 2.2
Reply With Quote #15

Updated to 2.2
Added a new cvar.
Open for more suggestions/comments/karma
PvtSmithFSSF is offline
Pro Patria Finland
Senior Member
Join Date: Apr 2006
Location: BaronPub.com
Old 07-26-2008 , 15:48   Re: Buy Gravity 2.1
Reply With Quote #16

For future reference, because the speed changes to the weapon speed on a weapon change, you have to change the speed back when this happens. (duh)

To do so, just hook the CurWeapon event. There's no reason to get such info to PM's even though this information is already available in this forum. After all, this is an open source community, and without realizing it, a simple post like this could help someone searching the forums for this info very much.

CurWeapon is called when a client shoots or changes weapon (in another words, when clip / ammo numbers are updated to the HUD). This is why you should propably check if the WeaponID has changed since the last time CurWeapon was called, to prevent your whole function to be called on every shot.

Oh, and INeedHelp is wrong, IMO. You should do the set_task for the message in plugin_init, rather than on every client connect. The message is sent to everybody's chat at once, and it's sufficient for this purpose.

Edit:
The script looks pretty clean, but you should get rid of these errors:
Code:
/home/groups/amxmodx/tmp3/textr7D6NG.sma(139) : warning 217: loose indentation
/home/groups/amxmodx/tmp3/textr7D6NG.sma(169) : warning 217: loose indentation
/home/groups/amxmodx/tmp3/textr7D6NG.sma(199) : warning 217: loose indentation
/home/groups/amxmodx/tmp3/textr7D6NG.sma(233) : warning 217: loose indentation
/home/groups/amxmodx/tmp3/textr7D6NG.sma(246) : warning 204: symbol is assigned a value that is never used: "msg_time"
To fix the last one, change
Code:
set_task(get_cvar_float("msg_time"),"message",0,"",0,"b")

to

Code:
set_task(get_pcvar_float(msg_time),"message",0,"",0,"b")

Urgh, I think that's all. And I also think I should find something to do
__________________
I am not a number. I am Gordon Freeman!

Last edited by Pro Patria Finland; 07-26-2008 at 15:55.
Pro Patria Finland is offline
IneedHelp
Veteran Member
Join Date: Mar 2007
Location: Argentina
Old 07-26-2008 , 16:03   Re: Buy Gravity 2.2
Reply With Quote #17

Quote:
The message is sent to everybody's chat at once
Oh, you are right. Didn't see that part.
__________________
IneedHelp is offline
Styles
Veteran Member
Join Date: Jul 2004
Location: California
Old 07-26-2008 , 17:03   Re: Buy Gravity 2.2
Reply With Quote #18

Suggestions:
Read Hawk552's post about not using set_task and making an entity to "think" instead.
Also, get rid of cstrike, you can make this plugin non-cstrike only and also get rid of fun its outdated. Use FakeMeta.
Styles is offline
Send a message via AIM to Styles
Dr. Jan Itor
Veteran Member
Join Date: Mar 2008
Location: there.
Old 07-26-2008 , 17:05   Re: Buy Gravity 2.2
Reply With Quote #19

Quote:
Originally Posted by styles View Post
Suggestions:
and also get rid of fun its outdated. Use FakeMeta.
i was about to say that lol
__________________
Dr. Jan Itor is offline
Styles
Veteran Member
Join Date: Jul 2004
Location: California
Old 07-26-2008 , 17:12   Re: Buy Gravity 2.2
Reply With Quote #20

First!
Styles is offline
Send a message via AIM to Styles
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 07:29.


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