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

Drop Grenades


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   ALL        Category:   Admin Commands       
fl0werD
Senior Member
Join Date: May 2011
Old 10-09-2021 , 15:23   Drop Grenades
Reply With Quote #1

Author: fl0wer
Version: 1.0.2

Description
The player can drop grenades from their inventory just like weapons.

Settings
amx_candrop_hegrenade "1" // Player can drop HE grenade. (Default: 1)
amx_candrop_flasbang "1" // Player can drop flashbang. (Default: 1)
amx_candrop_smokegrenade "1" // Player can drop smoke grenade. (Default: 1)

Requirements
AmxModX 1.9.0 and higher
HamSandwich
FakeMeta
ReAPI
Attached Files
File Type: sma Get Plugin or Get Source (drop_grenades.sma - 377 views - 5.2 KB)

Last edited by fl0werD; 10-11-2021 at 15:33.
fl0werD is offline
Send a message via ICQ to fl0werD
Cristian505
Senior Member
Join Date: Oct 2020
Old 10-10-2021 , 12:25   Re: Drop Grenades
Reply With Quote #2

very cool
Cristian505 is offline
Cristian505
Senior Member
Join Date: Oct 2020
Old 10-10-2021 , 12:26   Re: Drop Grenades
Reply With Quote #3

but not all users use reapi
Cristian505 is offline
fl0werD
Senior Member
Join Date: May 2011
Old 10-10-2021 , 15:26   Re: Drop Grenades
Reply With Quote #4

Quote:
Originally Posted by Cristian505 View Post
but not all users use reapi
I sympathize with them
fl0werD is offline
Send a message via ICQ to fl0werD
Mordekay
Squirrel of Fortune
Join Date: Apr 2006
Location: Germany
Old 10-10-2021 , 18:25   Re: Drop Grenades
Reply With Quote #5

https://forums.alliedmods.net/showthread.php?t=23340
Already approved
works
more features
no re-shit needed.
__________________

Mordekay is offline
Celena Luna
Veteran Member
Join Date: Aug 2013
Location: Nagazora
Old 10-10-2021 , 22:31   Re: Drop Grenades
Reply With Quote #6

1.
PHP Code:
Grenades_world_model[MAX_GRENADES][] 
=>
PHP Code:
grenades_world_model[MAX_GRENADES-1][] 
2.
Code:
new grenades[][] = {         "weapon_hegrenade",         "weapon_flashbang",
        "weapon_smokegrenade",
    }

3. bind_pcvar_* type of native only exist in 1.9+ so 1.8.2 won't work. You need to say specifically which version of AMXX is required

Also, most of this could be archive within AMXX so I don't see the reason to make it exclusively for ReAPI like this.

Quote:
Originally Posted by Mordekay View Post
https://forums.alliedmods.net/showthread.php?t=23340
Already approved
works
more features
no re-shit needed.
There is no need to talk shit to reHLDS, it is a really good things that the community come together and try to fix those problem that Value left there for ages

P/S: it is funny that when I try to compile with AMXX 1.10, there ain't any error when there is writing error there
__________________
My plugin:

Last edited by Celena Luna; 10-11-2021 at 23:26.
Celena Luna is offline
fl0werD
Senior Member
Join Date: May 2011
Old 10-11-2021 , 15:31   Re: Drop Grenades
Reply With Quote #7

1. What?
2. What?)
3. Thanks. I don't follow old versions. I added to require.

Last edited by fl0werD; 10-11-2021 at 15:32.
fl0werD is offline
Send a message via ICQ to fl0werD
Celena Luna
Veteran Member
Join Date: Aug 2013
Location: Nagazora
Old 10-11-2021 , 23:24   Re: Drop Grenades
Reply With Quote #8

1. Ahh my mistake it actually here
Code:
enum {     GRENADE_HEGRENADE,     GRENADE_FLASHBANG,     GRENADE_SMOKEGRENADE,
    MAX_GRENADES,
}

you left out that comma at the last one which normally an basic writing error.
idk why 1.10 compiler allow it but it should not be allow like that.

2. Same as 1
__________________
My plugin:

Last edited by Celena Luna; 10-11-2021 at 23:25.
Celena Luna is offline
fl0werD
Senior Member
Join Date: May 2011
Old 10-12-2021 , 13:12   Re: Drop Grenades
Reply With Quote #9

Quote:
Originally Posted by Celena Luna View Post
1. Ahh my mistake it actually here
Code:
enum {     GRENADE_HEGRENADE,     GRENADE_FLASHBANG,     GRENADE_SMOKEGRENADE,
    MAX_GRENADES,
}

you left out that comma at the last one which normally an basic writing error.
idk why 1.10 compiler allow it but it should not be allow like that.

2. Same as 1
It code style is good for edit and moving lines between themselves.
fl0werD is offline
Send a message via ICQ to fl0werD
Celena Luna
Veteran Member
Join Date: Aug 2013
Location: Nagazora
Old 10-12-2021 , 22:17   Re: Drop Grenades
Reply With Quote #10

Quote:
Originally Posted by fl0werD View Post
It code style is good for edit and moving lines between themselves.
but it fundamentally wrong
It create a bad habit and it get error in most of the programing language.

Edit: Well, I guess it is your choice of style and the Approver accept it or not, not mine after all.
__________________
My plugin:

Last edited by Celena Luna; 10-12-2021 at 22:55.
Celena Luna 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 04:57.


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