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

Award Grenades: Reloaded v1.5


Post New Thread Reply   
 
Thread Tools Display Modes
Lee
AlliedModders Donor
Join Date: Feb 2006
Old 08-14-2008 , 19:54   Re: Award Grenades
Reply With Quote #11

Quote:
Originally Posted by connorr View Post
client_death is a csx forward so you need to include it.
No, you don't.
__________________
No support via PM.

Last edited by Lee; 08-14-2008 at 19:56.
Lee is offline
Sam Tsuki
Senior Member
Join Date: Apr 2008
Location: KoKoRo!
Old 08-14-2008 , 20:01   Re: Award Grenades
Reply With Quote #12

Quote:
Originally Posted by Lee View Post
No, you don't.
I thought so cuz it was working before I included the csx.inc :O
__________________
My Approved Plugins:
Sam Tsuki

HvM XP Mod's addons:
Co-op Maps
Money System
Sam Tsuki is offline
Dores
Veteran Member
Join Date: Jun 2008
Location: You really don't wanna k
Old 08-14-2008 , 22:16   Re: Award Grenades
Reply With Quote #13

i'll test to make sure i'm right and to make you feel better (i'm reffering my other post with the usage)

EDIT: Works fine (the usage at least... haven't checked if plugin itself works..)
__________________
O o
/Ż________________________
| IMMA FIRIN' MAH LAZOR!!!
\_ŻŻŻ

Last edited by Dores; 08-14-2008 at 22:20.
Dores is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 08-14-2008 , 22:20   Re: Award Grenades
Reply With Quote #14

Quote:
Originally Posted by Lee View Post
No, you don't.
Of course you have to !
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
Dores
Veteran Member
Join Date: Jun 2008
Location: You really don't wanna k
Old 08-14-2008 , 22:23   Re: Award Grenades
Reply With Quote #15

Quote:
Originally Posted by connorr View Post
Of course you have to !
The man says it works without it.... any reason he should include it?
__________________
O o
/Ż________________________
| IMMA FIRIN' MAH LAZOR!!!
\_ŻŻŻ
Dores is offline
Lee
AlliedModders Donor
Join Date: Feb 2006
Old 08-14-2008 , 22:23   Re: Award Grenades
Reply With Quote #16

Wow. I'm dumbfounded. How can both you and KWo not know how forwards work? Test it and then tell me otherwise.
__________________
No support via PM.

Last edited by Lee; 08-14-2008 at 23:23.
Lee is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 08-15-2008 , 00:38   Re: Award Grenades
Reply With Quote #17

Well, in order to this forward work, csx module need to run, so if csx module isn't declared in modules.ini, and if no other plugin make it autoload, this plugin won't work unless you include csx.
The only reason that this plugin work is that csx module is already running.
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
Sam Tsuki
Senior Member
Join Date: Apr 2008
Location: KoKoRo!
Old 08-15-2008 , 00:49   Re: Award Grenades
Reply With Quote #18

Quote:
Originally Posted by connorr View Post
Well, in order to this forward work, csx module need to run, so if csx module isn't declared in modules.ini, and if no other plugin make it autoload, this plugin won't work unless you include csx.
The only reason that this plugin work is that csx module is already running.
But I think if you didn't include a module and used one of its forwards then it won't compile O.o

EDIT: No I guess it will comple...
Oh well
Will leave it at this
__________________
My Approved Plugins:
Sam Tsuki

HvM XP Mod's addons:
Co-op Maps
Money System
Sam Tsuki is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 08-15-2008 , 01:00   Re: Award Grenades
Reply With Quote #19

Quote:
Originally Posted by Sam Tsuki View Post
But I think if you didn't include a module and used one of its forwards then it won't compile O.o

EDIT: No I guess it will comple...
Yes, it compiles as your function is declared as 'public'
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
Lee
AlliedModders Donor
Join Date: Feb 2006
Old 08-15-2008 , 01:41   Re: Award Grenades
Reply With Quote #20

Connorr, 'should' is not the same as 'have to'. You were also wrong to say "Value 2 will never be detected" since he was checking two different cvars.

Connorr's not being cocky. He's rightly pointing out that someone with more experience would have done a much better job. There are still numerous errors.
  • Scrap the loop below 'Check player names' in favour of cmd_target() or find_player().
  • Player names can be 31 characters long.
  • The fourth parameter to cmd_access() in give_nade() should be 3.
  • You need to check that str_to_num() doesn't return 0.
  • Don't return PLUGIN_HANDLED in forwards that can't be blocked.
  • award_fb_amount is superfluous.
  • Use 'break' to exit loops.
  • There are many places where you should cache native return values.
  • You should evaluate whether the first element of an array is false rather than using equal() to determine if a string is empty.
  • You overwrite a cvar pointer (award_nades) with a value rather than updating the cvar itself.
Don't be discouraged. Everyone writes shoddy code at first. You should learn more before attempting to release plugins though.
__________________
No support via PM.

Last edited by Lee; 08-15-2008 at 01:50.
Lee is offline
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 18:04.


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