Raised This Month: $ Target: $400
 0% 

Decoy Grenade (1.0.4 - 05.01.2014)


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   ALL        Category:   Admin Commands       
Kia
AlliedModders Donor
Join Date: Apr 2010
Location: In a world of madness
Old 01-04-2014 , 03:57   Decoy Grenade (1.0.4 - 05.01.2014)
Reply With Quote #1

Decoy Grenade
- v1.0.4, last updated : 05.01.2014

Using this plugin any player can type /decoy to get a special smokegrenade. When the smoke explodes, the plugin looks which weapon you have and makes shooting sounds at the explosion position to confuse enemies.


Requirements
  • Steam-only Server

Defines

PHP Code:
// Time in Seconds how long the decoy grenade should make sounds
#define DECOY_FULL_TIME 14.5

// Time in Seconds when decoy should start after default explosion
#define DECOY_FIRST_DELAY 1.5

// Maximum delay between two sounds
#define DECOY_MAX_DELAY 1.6

// Price of Decoy Grenade in $
#define DECOY_PRICE 500 
Credits
Change Log
v1.0.2 : [ 04.01.2014 ]
  • Removed not-used Stock
  • Using CSW_* consts. for Weapon Detection now.

v1.0.4 : [ 05.01.2014 ]
  • Renamed some stuff
  • Optimized Code

Attached Files
File Type: sma Get Plugin or Get Source (decoygrenade.sma - 2200 views - 7.2 KB)
__________________

Last edited by Kia; 01-05-2014 at 06:47.
Kia is offline
TheDS1337
Veteran Member
Join Date: Jun 2012
Old 01-04-2014 , 04:01   Re: Decoy Grenade (1.0.0 - 04.01.2014)
Reply With Quote #2

Nice job, I like this grenade like in CSGO
TheDS1337 is offline
Kia
AlliedModders Donor
Join Date: Apr 2010
Location: In a world of madness
Old 01-04-2014 , 04:03   Re: Decoy Grenade (1.0.0 - 04.01.2014)
Reply With Quote #3

Thanks.
__________________
Kia is offline
oxygen935
Veteran Member
Join Date: Jun 2012
Location: Athens, Greece
Old 01-04-2014 , 05:56   Re: Decoy Grenade (1.0.0 - 04.01.2014)
Reply With Quote #4

Is that i really remember? I was a tester on your test server
__________________
Quote:
Originally Posted by quark View Post
You're a genius
Stopped any pawn work cause of university for computer science
oxygen935 is offline
Send a message via Skype™ to oxygen935
Kia
AlliedModders Donor
Join Date: Apr 2010
Location: In a world of madness
Old 01-04-2014 , 06:15   Re: Decoy Grenade (1.0.0 - 04.01.2014)
Reply With Quote #5

I do not think we tested this together. Deagle was on the Test Server yesterday.
__________________
Kia is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 01-04-2014 , 06:30   Re: Decoy Grenade (1.0.0 - 04.01.2014)
Reply With Quote #6

How do you know that hooked PlaybackEvent is the smoke one ? (you can't know).

You never use getSGExplosionOrigin functions.

I can't understand why you are using weapon names, it is not efficient and you can directly use weapons indexes.
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
Kia
AlliedModders Donor
Join Date: Apr 2010
Location: In a world of madness
Old 01-04-2014 , 06:52   Re: Decoy Grenade (1.0.0 - 04.01.2014)
Reply With Quote #7

I used getSGExplosionOrigin with an other method, but forgot to delete the stock after I switched to the new method.
Will use indexes.

What other method do you suggest for detecting Smoke Explosion?
__________________

Last edited by Kia; 01-04-2014 at 07:07.
Kia is offline
Jhob94
AMX Mod X Donor
Join Date: Jul 2012
Old 01-04-2014 , 07:53   Re: Decoy Grenade (1.0.0 - 04.01.2014)
Reply With Quote #8

Quote:
Originally Posted by Kia View Post
I used getSGExplosionOrigin with an other method, but forgot to delete the stock after I switched to the new method.
Will use indexes.

What other method do you suggest for detecting Smoke Explosion?
Search for Grenade API by connormcleod, it should be fine for what you need.
__________________
Jhob94 is offline
NaimB77
Member
Join Date: Aug 2012
Old 01-04-2014 , 07:56   Re: Decoy Grenade (1.0.0 - 04.01.2014)
Reply With Quote #9

Quote:
Originally Posted by Kia View Post
I do not think we tested this together. Deagle was on the Test Server yesterday.
True that Also, did you fixed the USP Bug ?
__________________
NaimB77 is offline
Kia
AlliedModders Donor
Join Date: Apr 2010
Location: In a world of madness
Old 01-04-2014 , 07:56   AW: Re: Decoy Grenade (1.0.0 - 04.01.2014)
Reply With Quote #10

Quote:
Originally Posted by NaimB77 View Post
True that Also, did you fixed the USP Bug ?
I tested it with USP, and it worked.

Plugin updated to Vers. 1.0.2

Change Log
v1.0.2 : [ 04.01.2014 ]
  • Removed not-used Stock
  • Using CSW_* consts. for Weapon Detection now.
__________________

Last edited by Kia; 01-04-2014 at 08:12.
Kia 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 16:46.


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