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

Nade Giver v4.8


Post New Thread Reply   
 
Thread Tools Display Modes
ot_207
Veteran Member
Join Date: Jan 2008
Location: Romania The Love Country
Old 04-12-2008 , 16:02   Re: Nade Giver
Reply With Quote #11

I will look into it.
I will leave this plugin as it is and make a bigger one with your suggestion!
ot_207 is offline
Battousai-sama
Veteran Member
Join Date: Jul 2007
Old 04-12-2008 , 16:09   Re: Nade Giver
Reply With Quote #12

Sweet thanks :}
__________________
Battousai-sama is offline
Send a message via MSN to Battousai-sama
ot_207
Veteran Member
Join Date: Jan 2008
Location: Romania The Love Country
Old 04-12-2008 , 17:43   Re: Nade Giver
Reply With Quote #13

Ok, I've done it.
Hopefully it will run without errors...

Battousai can you test it please?
I will work tomorrow on it if i have time.

New cvar:
amx_nade_on_cmd (default 1) | sets if the plugin gives he grenades on time (cvar is set to 0) or on command (cvar is set to 1)

New commands:
say /he
say /smoke
say /flash

The teamsay doesn't work right now.

Btw. I like your idea, it's really great, and makes the plugin original !!!
Attached Files
File Type: sma Get Plugin or Get Source (nade_giver_adv.sma - 993 views - 10.6 KB)
ot_207 is offline
Battousai-sama
Veteran Member
Join Date: Jul 2007
Old 04-12-2008 , 17:45   Re: Nade Giver
Reply With Quote #14

:] nice i will quick test it in dedicate server.


[edit]

Works Great :]
Good Job man this is awesome no errors :]

[/edit]
__________________

Last edited by Battousai-sama; 04-12-2008 at 17:58.
Battousai-sama is offline
Send a message via MSN to Battousai-sama
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 04-12-2008 , 18:37   Re: Nade Giver
Reply With Quote #15

May I suggest a way for better performance?
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
ot_207
Veteran Member
Join Date: Jan 2008
Location: Romania The Love Country
Old 04-13-2008 , 01:27   Re: Nade Giver
Reply With Quote #16

Yes! All the suggestions are welcomed even if they are for the performance or new functions.
ot_207 is offline
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 04-13-2008 , 02:17   Re: Nade Giver
Reply With Quote #17

You can reduce the cpu usage by determining the giving of nades with a different method:

Code:
new const g_sNadeModels[][] = {     "models/w_hegrenade.mdl",     "models/w_flashbang.mdl",     "models/w_smokegrenade.mdl" }; new const g_sNadeNames[][] = {     "weapon_hegrenade",     "weapon_flashbang",     "weapon_smokegrenade" }; new const g_iNadeTaskIds[][] = {     112233,     223344,     334455 }; public plugin_init() {     register_forward(FM_SetModel, "fwd_FM_SetModel", 1); } public fwd_FM_SetModel(ent, const sModel[]) {     if(!pev_valid(ent))     {         return FMRES_IGNORED;     }         static iNadeType, i;     iNadeType = -1;     for(i = 0; i < 3; i++)     {         if(equali(sModel, g_sNadeModels[i]))         {             iNadeType = i;             break;         }     }     if(iNadeType == -1)     {         return FMRES_IGNORED;     }     static iParam[2];     iParam[0] = iNadeType;     set_task(0.1 + /* delay for each nade */, "task_GiveNades", pev(ent, pev_owner) + g_iNadeTaskIds[iNadeType], iParam, sizeof(iParam));     return FMRES_IGNORED; } public task_GiveNades(iParam[], id) {     static iNadeType; iNadeType = iParam[0];     id -= g_iNadeTaskIds[iNadeType];     fm_give_item(id, g_sNadeNames[iNadeType]); }

This way, it is only called when a player throws a grenade.
If you want another way, you can use the csx module and use grenade_throw() forward.
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
ot_207
Veteran Member
Join Date: Jan 2008
Location: Romania The Love Country
Old 04-13-2008 , 02:20   Re: Nade Giver
Reply With Quote #18

Ok, I will look into it today if i have time.

[EDIT]
D:\Software\Server & Streaming\Half-Life Dedicated Server\Pawn Studio\temp774.sma(62) : error 033: array must be indexed (variable "g_iNadeTaskIds")
D:\Software\Server & Streaming\Half-Life Dedicated Server\Pawn Studio\temp774.sma(69) : error 033: array must be indexed (variable "g_iNadeTaskIds")
[/EDIT]

I get this error when i tried your code ...

Last edited by ot_207; 04-13-2008 at 12:21.
ot_207 is offline
Old 04-13-2008, 17:54
Hawk552
This message has been deleted by BAILOPAN.
Battousai-sama
Veteran Member
Join Date: Jul 2007
Old 04-17-2008 , 16:42   Re: Nade Giver
Reply With Quote #19

Congrats on aprooval!!!!! Thanks to Bail!
__________________
Battousai-sama is offline
Send a message via MSN to Battousai-sama
woned boon
Junior Member
Join Date: Aug 2007
Old 08-14-2008 , 19:25   Re: Nade Giver
Reply With Quote #20

which one do I choose?
Lite or Regular? What is the diff man
woned boon 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 21:53.


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