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

[Extra Item] Grenade Launcher v1.02


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   Counter-Strike        Category:   Fun Stuff       
ezio_auditore
Senior Member
Join Date: May 2013
Old 03-27-2014 , 09:58   [Extra Item] Grenade Launcher v1.02
Reply With Quote #1

SO here is a new plugin,
I know there is an another plugin for a grenade launcher but this one is different

here a user can buy a launcher by saying /gren and launch a grenade by using +USE key

When a player dies and he is having a launcher, the launcher is removed

**Guidelines are made for a grenade launcher**

CVARS:--
Spoiler

Updates coming soon...
Spoiler

New version's code is OPTIMIZED
Attached Files
File Type: sma Get Plugin or Get Source (grenade_launcher.sma - 1164 views - 6.9 KB)
File Type: zip gren.zip (44.4 KB, 240 views)
__________________

Last edited by ezio_auditore; 05-15-2014 at 11:07.
ezio_auditore is offline
Send a message via Skype™ to ezio_auditore
DruGzOG
Veteran Member
Join Date: Nov 2007
Location: Unknown
Old 03-27-2014 , 23:26   Re: [Extra Item] Grenade Launcher
Reply With Quote #2

Extra item for what?

Quote:
#include <amxmodx>
#include <amxmisc>
#include <fakemeta>
#include <fun>
#include <hamsandwich>
#include <cstrike>
#include <engine>
Hmm. Why are you using both engine and fakemeta? Why not pick one?
__________________
DruGzOG is offline
Send a message via AIM to DruGzOG
hornet
AMX Mod X Plugin Approver
Join Date: Mar 2010
Location: Australia
Old 03-28-2014 , 04:19   Re: [Extra Item] Grenade Launcher
Reply With Quote #3

Did you test this? Did you even attempt to compile this?
This will cause several errors and doesn't look like it's going to work as intended.

Quote:
Originally Posted by DruGzOG View Post
Extra item for what?

Hmm. Why are you using both engine and fakemeta? Why not pick one?
A user may include any combination of modules he likes, usually assuming that each of the 2 will provide a better method for one scenario than the other eg. Engine and Fakemeta.
__________________
Quote:
vBulletin Tip #42: Not much would be accomplished by merging this item with itself.

Last edited by hornet; 03-28-2014 at 04:20.
hornet is offline
ezio_auditore
Senior Member
Join Date: May 2013
Old 03-28-2014 , 11:42   Re: [Extra Item] Grenade Launcher
Reply With Quote #4

Quote:
Originally Posted by hornet View Post
Did you test this? Did you even attempt to compile this?
This will cause several errors and doesn't look like it's going to work as intended.



A user may include any combination of modules he likes, usually assuming that each of the 2 will provide a better method for one scenario than the other eg. Engine and Fakemeta.

I dont understand what are you implying,
It works just awesome + I updated it
__________________

Last edited by ezio_auditore; 03-28-2014 at 11:45.
ezio_auditore is offline
Send a message via Skype™ to ezio_auditore
claudiuhks
Yam Inside®™℠
Join Date: Jan 2010
Location: Living Randomly
Old 03-28-2014 , 18:51   Re: [Extra Item] Grenade Launcher v1.01
Reply With Quote #5

PHP Code:
        for (new get_maxplayers() ; i++){ 
What?

Fakemeta contains everything or almost everything that CStrike, Fun and Engine contain.
Fakemeta_UTIL file would be a good header file to use.
Why stock function type in SMA file?
Why AMXMisc header file?
Make sure client is connected when ClientCommand is executed.

Change

PHP Code:
public makeready(id){
    
client_print(idprint_center"Grenade Launcher Ready!")
    
emit_sound(idCHAN_AUTOsnd[1], VOL_NORMATTN_NORM0PITCH_NORM)

to

PHP Code:
public makeready(id){  if (!is_user_connected(id)) return;
    
client_print(idprint_center"Grenade Launcher Ready!")
    
emit_sound(idCHAN_AUTOsnd[1], VOL_NORMATTN_NORM0PITCH_NORM)

PHP Code:
    new owner pev(entpev_owner
Is rocket's (or grenade's) owner always in-game?
__________________

Last edited by claudiuhks; 03-28-2014 at 19:02.
claudiuhks is offline
Send a message via MSN to claudiuhks Send a message via Yahoo to claudiuhks Send a message via Skype™ to claudiuhks
ezio_auditore
Senior Member
Join Date: May 2013
Old 03-29-2014 , 00:08   Re: [Extra Item] Grenade Launcher v1.01
Reply With Quote #6

thanks claudiuhks, I'll do it asap
__________________
ezio_auditore is offline
Send a message via Skype™ to ezio_auditore
hornet
AMX Mod X Plugin Approver
Join Date: Mar 2010
Location: Australia
Old 03-29-2014 , 03:29   Re: [Extra Item] Grenade Launcher v1.01
Reply With Quote #7

Quote:
Originally Posted by ezio_auditore View Post
I dont understand what are you implying,
It works just awesome + I updated it
Quote:
Originally Posted by ezio_auditore View Post
I dont understand what are you implying,
It works just awesome + I updated it
Implying that by looking at the code it would not compile ( until you updated it ) and will not be effective.

-The grenade only does damage if it hits a player.
-Your using CmdStart to hook a simple button press when there are better methods available.
-You have several unnecessary checks when calling damage() function.
-Your stock cvartotime is useless, that's what get_pcvar_float() is for.

You have been told several times to stop posting ( random ) plugins yet you still continue before you have even learnt anything more.

Quote:
Originally Posted by claudiuhks View Post
Fakemeta contains everything or almost everything that CStrike, Fun and Engine contain.
Fakemeta_UTIL file would be a good header file to use.
Just because you can do those things with it doesn't mean that you should. As I said, nearly ( if not ) every module has a native that is better to use, rather than a method provided by some other module.
Fakemeta_Util is a good example of what not to do. ( Good work done by Ven but really only good use for learning purposes ).
__________________
Quote:
vBulletin Tip #42: Not much would be accomplished by merging this item with itself.
hornet is offline
claudiuhks
Yam Inside®™℠
Join Date: Jan 2010
Location: Living Randomly
Old 03-29-2014 , 13:58   Re: [Extra Item] Grenade Launcher v1.01
Reply With Quote #8

Quote:
Originally Posted by hornet View Post
Fakemeta_Util is a good example of what not to do. ( Good work done by Ven but really only good use for learning purposes ).
Why not? Its Fun replacements are almost untouched as I've seen. Of course, it uses more CPU frequency per call, but let's say that grenades launcher doesn't eat so much.
__________________

Last edited by claudiuhks; 03-29-2014 at 13:58.
claudiuhks is offline
Send a message via MSN to claudiuhks Send a message via Yahoo to claudiuhks Send a message via Skype™ to claudiuhks
ezio_auditore
Senior Member
Join Date: May 2013
Old 03-30-2014 , 00:34   Re: [Extra Item] Grenade Launcher v1.01
Reply With Quote #9

I used cmdstart instead of
PHP Code:
register_clcmd("use""plPressedE"
and i think i don't have any other way to display launcher guidelines....
__________________
ezio_auditore is offline
Send a message via Skype™ to ezio_auditore
hornet
AMX Mod X Plugin Approver
Join Date: Mar 2010
Location: Australia
Old 03-30-2014 , 03:27   Re: [Extra Item] Grenade Launcher v1.01
Reply With Quote #10

Quote:
Originally Posted by claudiuhks View Post
Why not? Its Fun replacements are almost untouched as I've seen.
Some of them are okay, and some of them are just macros. But take fm_give_item() for example, look how many more natives are used to achieve that. It's 13 natives, vs 1 ( give_item() ). The more tasks you allow the module to handle, the more efficient the plugin will be.

Quote:
Originally Posted by ezio_auditore View Post
I used cmdstart instead of
PHP Code:
register_clcmd("use""plPressedE"
and i think i don't have any other way to display launcher guidelines....
You mean +use? A rather reliable method is FM_EmitSound.
__________________
Quote:
vBulletin Tip #42: Not much would be accomplished by merging this item with itself.
hornet is offline
Old 03-30-2014, 04:02
swapped
This message has been deleted by swapped. Reason: nvm
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 12:48.


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