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

[request] Infection Bomb


Post New Thread Reply   
 
Thread Tools Display Modes
nicekill
Junior Member
Join Date: Dec 2011
Old 12-13-2011 , 01:51   Re: [request] Infection Bomb
Reply With Quote #11

I've attached the updated script. I still can't get it to compile though. I'll have to fix it later.
Attached Files
File Type: txt zr_infect_nade.txt (459 Bytes, 177 views)
File Type: sp Get Plugin or Get Source (zr_infect_nade.sp - 157 views - 5.7 KB)
__________________

Last edited by nicekill; 12-13-2011 at 01:55.
nicekill is offline
nicekill
Junior Member
Join Date: Dec 2011
Old 12-13-2011 , 03:11   Re: [request] Infection Bomb
Reply With Quote #12

I fixed and compiled it. I was using a "Handle" type where it should have been "Function". I've attached the script and the plugin.

I haven't tested it out yet though.
zr_infect_nade.txt goes into the "cstrike\addons\sourcemod\translations" folder.

To get a nade, just say /nade in the game.
Attached Files
File Type: sp Get Plugin or Get Source (zr_infect_nade.sp - 171 views - 5.7 KB)
File Type: txt zr_infect_nade.txt (459 Bytes, 165 views)
File Type: smx zr_infect_nade.smx (3.9 KB, 134 views)
__________________
nicekill is offline
rhelgeby
Veteran Member
Join Date: Oct 2008
Location: 0x4E6F72776179
Old 12-13-2011 , 09:44   Re: [request] Infection Bomb
Reply With Quote #13

It crashes, there are a few changes required in zr_nade_RestrictCanUse:

PHP Code:
    // If the player is a zombie
    
if (ZR_IsClientZombie(client)){
        return 
Plugin_Continue;      // you need to return an action, not return nothing.
    

PHP Code:
    new Action:result;
    
Call_Finish(result);            // get the result from ZR's function and return it.
    
return result
I've also removed the hook/unhook functions in zr_nade_RestrictCanUse. One of those caused the crashes - and they aren't really needed.

Once I got it running, it spawned a grenade, but doesn't seem to actually unhook ZR's hook. Weapons are still blocked for zombies. I added a few print statements to see if your plugins hook worked. It did and returned Plugin_Continue (allow pickup) as expected. But ZR's hook was also called (after your plugin), which blocked pickup.

The SDKUnhook function doesn't tell if it actually unhooked something. This would be nice to know. A debug build of SDK Hooks should print this to the console though.
__________________
Richard Helgeby

Zombie:Reloaded | PawnUnit | Object Library
(Please don't send private messages for support, they will be ignored. Use the forum.)

Last edited by rhelgeby; 12-13-2011 at 09:46.
rhelgeby is offline
Send a message via MSN to rhelgeby
nicekill
Junior Member
Join Date: Dec 2011
Old 12-13-2011 , 17:56   Re: [request] Infection Bomb
Reply With Quote #14

I think maybe SDKHooks has a security feature which prevents a plugin from unhooking another plugin's callbacks.

So in the meantime, we have a nade which humans can buy to infect other humans. Might be useful to someone.

The new version I've attached doesn't cause a server crash anymore when I tested it.
Attached Files
File Type: sp Get Plugin or Get Source (zr_infect_nade.sp - 235 views - 6.3 KB)
File Type: smx zr_infect_nade.smx (7.0 KB, 172 views)
File Type: txt zr_infect_nade.txt (459 Bytes, 186 views)
__________________

Last edited by nicekill; 12-13-2011 at 17:59.
nicekill is offline
TnTSCS
AlliedModders Donor
Join Date: Oct 2010
Location: Undisclosed...
Old 12-13-2011 , 18:58   Re: [request] Infection Bomb
Reply With Quote #15

could you use something like Greyscale's grenadepack to give a zombie a grenade?

Code:
GiveClientGrenade(client) {     new offsNades = FindDataMapOffs(client, "m_iAmmo") + (11 * 4);         new count = GetEntData(client, offsNades);     SetEntData(client, offsNades, ++count); }
TnTSCS is offline
andrew13
AlliedModders Donor
Join Date: Jul 2010
Old 12-19-2011 , 16:35   Re: [request] Infection Bomb
Reply With Quote #16

Would This be what you kinda want?

http://forums.alliedmods.net/showthread.php?p=1490933
andrew13 is offline
Despirator
Senior Member
Join Date: Jun 2011
Location: Kazakhstan ->Shymkent
Old 12-20-2011 , 03:47   Re: [request] Infection Bomb
Reply With Quote #17

Quote:
Originally Posted by andrew13 View Post
no
Despirator is offline
gpadmin
Member
Join Date: Oct 2006
Old 12-28-2011 , 19:51   Re: [request] Infection Bomb
Reply With Quote #18

Ty for plugin.
BUG - Humans can buy nade too also on strat up.
gpadmin is offline
ehsank1768
Member
Join Date: Aug 2022
Old 08-08-2023 , 14:37   Re: [request] Infection Bomb
Reply With Quote #19

i finally managed to make Zombie Infect bomb thanks to you mate
ehsank1768 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 09:33.


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