AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Zombie Plague Mod (https://forums.alliedmods.net/forumdisplay.php?f=126)
-   -   Subplugin Submission [ZP] Addon: Ice Cube (ZP5.0 + ZP 4.3) (https://forums.alliedmods.net/showthread.php?t=244661)

H.RED.ZONE 07-21-2014 18:00

[ZP] Addon: Ice Cube (ZP5.0 + ZP 4.3)
 
3 Attachment(s)

Description:
This plugin adds ice cube after zombie is frozen, and it is removed after he is unfrozen. I posted this because lot of you asked how to create it. It does not edit your effects and you don't need to edit any frost grenade or else. You can use it for ZP4.3 or ZP5.0.

How to install:
To install this plugin you need to set model's inside model's file (models/zombie_plague/...mdl)
And download plugin and set amxx file inside plugins. (amxmodx/plugins/...amxx)
Write the name of the plugin to activate it inside your plugins-zp.ini file (Diffrent for versions)
Change map or restart server.

Images:

Credits
:
Code:

hornet - For pev_body.
zmd94
- For images and testing.

Changelog:
Spoiler

wicho 07-21-2014 18:53

Re: [ZP5.0] Addon: Ice Cube
 
Gj as always, u can make a version adapting to the frost nade directly..

H.RED.ZONE 07-21-2014 18:58

Re: [ZP5.0] Addon: Ice Cube
 
This is the same as i did. There is nothing diffrent, natives are called the same way, i have no idea why even people add effects inside zp 50 frost nades this way is much better.

Stasi_bg 07-21-2014 19:04

Re: [ZP5.0] Addon: Ice Cube
 
will do you it for ZP 4.3?

H.RED.ZONE 07-21-2014 19:06

Re: [ZP5.0] Addon: Ice Cube
 
Quote:

Originally Posted by Stasi_bg (Post 2171609)
will do you it for ZP 4.3?

I can create a TUT how to make it for zp 4.3 but i don't like supporting old versions (:

Stasi_bg 07-21-2014 19:23

Re: [ZP5.0] Addon: Ice Cube
 
Do you create for me? I want this effect but does not work.

H.RED.ZONE 07-21-2014 19:37

Re: [ZP5.0] Addon: Ice Cube
 
Quote:

Originally Posted by Stasi_bg (Post 2171617)
Do you create for me? I want this effect but does not work.

I will make it for you tomorow and for everyone else, i can't hit my head with a 10.000+ lines of codes from zp4.3 right now. (:

wicho 07-21-2014 21:10

Re: [ZP5.0] Addon: Ice Cube
 
I found a bug when a player freeze a zombie sometimes the model dont appear same when freeze several zombies some zombies dont have the cube model..

zmd94 07-21-2014 22:18

Re: [ZP5.0] Addon: Ice Cube
 
Yes, I have been waiting for this. Thank you for sharing.
Quote:

Originally Posted by wicho (Post 2171647)
I found a bug when a player freeze a zombie sometimes the model don't appear same when freeze several zombies some zombies dont have the cube model.

Please fix it, H.RED.ZONE.

We will wait for the update.

H.RED.ZONE 07-21-2014 22:22

Re: [ZP5.0] Addon: Ice Cube
 
Quote:

Originally Posted by wicho (Post 2171647)
I found a bug when a player freeze a zombie sometimes the model dont appear same when freeze several zombies some zombies dont have the cube model..

Do you get any error logs? And can you specify when that happens?

I would be glad if you can give me more informations about that because i can't really test it out.

PS: Check console please i think i might know what could happen when models are set.

wicho 07-21-2014 22:39

Re: [ZP5.0] Addon: Ice Cube
 
Well happens all the time and no for the moment i dont have errors on log but if i found i will post, another thing remove the entity on client disconnect sometimes when the player disconnect the model stay on a place in all the map and when the zombies turn on human too..

H.RED.ZONE 07-21-2014 23:09

Re: [ZP5.0] Addon: Ice Cube
 
Quote:

Originally Posted by .Dare Devil. (Post 2171677)
Thank you for giving me credits for creating that model.
Oh yeah, and credits for idea ... You did come to this thing by yourself and never saw mod called zp++ ...
You guys didint get the models/sprites from my server, you created them by yourself :)

I don't see anywhere that you created them, and the idea was from a youtube clip, because they all requested ice cube effect, and i think no one seen your ZP++ because you never released it?
However i don't mind adding you in the credits i focuse on the code not a model. And i don't see any sprites here. The code was made from 0, model was taken from here as a request specialy for ZP mod.

Quote:

Originally Posted by wicho (Post 2171674)
Well happens all the time and no for the moment i dont have errors on log but if i found i will post, another thing remove the entity on client disconnect sometimes when the player disconnect the model stay on a place in all the map and when the zombies turn on human too..

Quote:

Originally Posted by wicho (Post 2171647)
I found a bug when a player freeze a zombie sometimes the model dont appear same when freeze several zombies some zombies dont have the cube model..

Ill try to fix it as soon as im able to test it or even faster i know everyone on zp wanted this so ill check more exp users for there suggestions on what could be a problem.

CryWolf 07-22-2014 01:50

Re: [ZP5.0] Addon: Ice Cube
 
Dare please finish once for all this child things, you cry ike a baby omg it's just a model for christ sake.

H.RED.ZONE: Great work really appreciated, add forwards for client_disconnect, client_cured, client_died and then it's all ok :P

H.RED.ZONE 07-22-2014 07:22

Re: [ZP5.0] Addon: Ice Cube
 
Updated it. Report other bugs if you get them. (:

zmd94 07-22-2014 11:19

Re: [ZP5.0] Addon: Ice Cube v1.1
 
Thank you, H.RED.ZONE. I have tested it with ZP5.0.8 and it is working well.

Below is the screenshots:
http://img.ctrlv.in/img/14/07/22/53ce7f8ca172b.jpg

http://img.ctrlv.in/img/14/07/22/53ce7f15eb0b0.jpg

Light_Dark 07-22-2014 12:33

Re: [ZP5.0] Addon: Ice Cube v1.1
 
gg man nice effects and no lag
as always your rock

H.RED.ZONE 07-22-2014 12:50

Re: [ZP5.0] Addon: Ice Cube v1.1
 
Quote:

Originally Posted by Light_Dark (Post 2171908)
gg man nice effects and no lag
as always your rock

Thank you glad to share them. (:

wicho 07-22-2014 14:25

Re: [ZP5.0] Addon: Ice Cube v1.1
 
I found another bug when a player freeze the nemesis the model stay on a place all the map..

H.RED.ZONE 07-22-2014 14:55

Re: [ZP5.0] Addon: Ice Cube v1.1
 
Quote:

Originally Posted by wicho (Post 2171968)
I found another bug when a player freeze the nemesis the model stay on a place all the map..

Updated test it out now (:

zmd94 07-23-2014 03:50

Re: [ZP5.0] Addon: Ice Cube v1.2
 
I have find new problem (I'm not sure whether I'm the only one facing this problem):
Quote:

L 07/23/2014 - 15:42:25: Invalid CVAR pointer
L 07/23/2014 - 15:42:25: [AMXX] Run time error 10 (plugin "zp50_ice_cube.amxx") (native "get_pcvar_num") - debug not enabled!
L 07/23/2014 - 15:42:25: [AMXX] To enable debug mode, add "debug" after the plugin name in plugins.ini (without quotes).
So, after I add debug:
Quote:

L 07/23/2014 - 15:45:22: Invalid CVAR pointer
L 07/23/2014 - 15:45:22: [AMXX] Displaying debug trace (plugin "zp50_ice_cube.amxx", version "1.2")
L 07/23/2014 - 15:45:22: [AMXX] Run time error 10: native error (native "get_pcvar_num")
L 07/23/2014 - 15:45:22: [AMXX] [0] zp50_ice_cube.sma::zp_fw_grenade_frost_pre (line 34)
L 07/23/2014 - 15:45:22: Invalid CVAR pointer
L 07/23/2014 - 15:45:22: [AMXX] Displaying debug trace (plugin "zp50_ice_cube.amxx", version "1.2")
L 07/23/2014 - 15:45:22: [AMXX] Run time error 10: native error (native "get_pcvar_num")
L 07/23/2014 - 15:45:22: [AMXX] [0]
This problem happen, after I have updated my ZP5.0.8 server to AMXX version 1.8.3 and metamod 1.2.1.

wicho 07-23-2014 03:56

Re: [ZP5.0] Addon: Ice Cube v1.2
 
Remove the cvar pointer of plugin_init and put it on plugin_cfg, like this:

PHP Code:

public plugin_init( ) {
    
register_plugin"[ZP] Addon:Ice Cube""1.2""H.RED.ZONE" )
    
    
RegisterHamHam_Killed"player""_fw_PlayerKilled" )
}

public 
plugin_cfg( ) {
    
    
_pCvarNemesisFreeze get_cvar_pointer"zp_grenade_frost_nemesis" )



zmd94 07-23-2014 04:16

Re: [ZP5.0] Addon: Ice Cube v1.2
 
Thank you for helping. However it still giving the same error. I have tested it.

CryWolf 07-23-2014 06:30

Re: [ZP5.0] Addon: Ice Cube v1.2
 
The cvar registration is good where is it now however the problem is that the author has used nemesis cvar from ZP 4.3 this cvar doesn't exists in ZP 5.0 since you enable zp43compat.amxx plugin but not sure will work too :)

So open the .SMA of Ice cube and change
Code:

_pCvarNemesisFreeze = get_cvar_pointer( "zp_grenade_frost_nemesis" )
to
PHP Code:

_pCvarNemesisFreeze get_cvar_pointer"zp_nemesis_grenade_frost" ); 


zmd94 07-23-2014 06:48

Re: [ZP5.0] Addon: Ice Cube v1.2
 
Thank you guys, wicho and CryWolf. I have combined both of your solutions. Now, the plugin is working well.

This line should be changed:
PHP Code:

public plugin_init( ) {
    
register_plugin"[ZP] Addon:Ice Cube""1.2""H.RED.ZONE" )
    
    
RegisterHamHam_Killed"player""_fw_PlayerKilled" )
    
    
_pCvarNemesisFreeze get_cvar_pointer"zp_grenade_frost_nemesis" )


--->
PHP Code:

public plugin_init( ) {
    
register_plugin"[ZP] Addon:Ice Cube""1.2""H.RED.ZONE" )
    
    
RegisterHamHam_Killed"player""_fw_PlayerKilled" )
}

public 
plugin_cfg( ) {
    
    
_pCvarNemesisFreeze get_cvar_pointer"zp_nemesis_grenade_frost" );



H.RED.ZONE 07-23-2014 10:45

Re: [ZP5.0] Addon: Ice Cube v1.4
 
Updated the code.

Dragan015Bre 07-24-2014 03:51

Re: [ZP5.0] Ice Cube
 
Can u make it for zp 4.3 fix5a please

H.RED.ZONE 07-24-2014 07:58

Re: [ZP5.0] Ice Cube
 
Quote:

Originally Posted by Dragan015Bre (Post 2172875)
Can u make it for zp 4.3 fix5a please

I have updated it and now you have version 4.3 it was not tested so report back.

Just4Games 07-24-2014 09:16

Re: [ZP] Addon: Ice Cube (ZP5.0 + ZP 4.3)
 
Tested it on Zombie Plagues Shade and it seems to not work.

H.RED.ZONE 07-24-2014 09:49

Re: [ZP] Addon: Ice Cube (ZP5.0 + ZP 4.3)
 
Quote:

Originally Posted by Just4Games (Post 2172971)
Tested it on Zombie Plagues Shade and it seems to not work.

Friend tested it just now it works. Redownload it i had a mistake in checking for nemesis for version 4.3.

.Dare Devil. 07-24-2014 10:14

Re: [ZP5.0] Addon: Ice Cube
 
( That first message was too kind. )
Right now i dont really see the difference between me and you. We both acting like children yet
i am one, im not sure about you.

If you want that your zp4.3 one will work you should copy/paste exacly the code not just take an idea.
( idea of hooking think. )

You cant just leave out the functions i wrote without knowing what they are for.
2. IF you can make it work somehow ( probably by taking my idea again ... )
What if zombie is near the explosion while having madness?
( This is way i checked pev_maxspeed )

Also, I tested your plugin even tho i was 100% sure that it wont work.

For asherkin:
Sometimes i cant even tell if im serious or not.
Im just really sad that you took away my cute costom title.

For Just4Games
That zp mod you're using might be different from zp4.3. That would be reason why mine did not work for you even tho it is working fine in 4.3.

Just4Games 07-24-2014 10:22

Re: [ZP] Addon: Ice Cube (ZP5.0 + ZP 4.3)
 
Dare, ZPS it's more like a ZP 4.3 but has the new modes + a new one called Bombardier.

.Dare Devil. 07-24-2014 10:27

Re: [ZP] Addon: Ice Cube (ZP5.0 + ZP 4.3)
 
Quote:

Originally Posted by Just4Games (Post 2172994)
Dare, ZPS it's more like a ZP 4.3 but has the new modes + a new one called Bombardier.

I just looked the code and now i have no idea why it doesnt work.
It wont allow compile it or it just wont do anything, even no errors?

Just4Games 07-24-2014 10:33

Re: [ZP] Addon: Ice Cube (ZP5.0 + ZP 4.3)
 
No errors in console, it just doesn't want to work.
Image with your plugin installed dare:

H.RED.ZONE 07-24-2014 12:09

Re: [ZP5.0] Addon: Ice Cube
 
Quote:

Originally Posted by .Dare Devil. (Post 2172992)
( That first message was too kind. )
Right now i dont really see the difference between me and you. We both acting like children yet
i am one, im not sure about you.

Too kind? I don't really get you want to prove that your point is right i want to prove my point is right. Its simple and normal.

Quote:

Originally Posted by .Dare Devil. (Post 2172992)
If you want that your zp4.3 one will work you should copy/paste exacly the code not just take an idea.
( idea of hooking think. )

You cant just leave out the functions i wrote without knowing what they are for.
2. IF you can make it work somehow ( probably by taking my idea again ... )
What if zombie is near the explosion while having madness?
( This is way i checked pev_maxspeed )

You are right i didn't think about zombie madness how ever you spend who knows how much time perfecting and i did this in like an hour...with no testing. How ever for zombie madness you are fully right but inside your code you check for max speed i think there is a better way ill need to check if my idea will work for this. As we both know best way would be to make a native inside zm madness how ever doing this outside the main plugin is starting to complicate things. I will try to check it with one more efficient way if i don't manage i will prob use max speed because that would be normal way to check.


Quote:

Originally Posted by .Dare Devil. (Post 2172992)
Also, I tested your plugin even tho i was 100% sure that it wont work.

For asherkin:
Sometimes i cant even tell if im serious or not.
Im just really sad that you took away my cute costom title.

I don't get really this part.

So in the end i still think stock should not be used and i still don't get why every server has 32 players inside your plugin.

And you told me i used think, look at my plugin that was posted long time ago (Gas Mask) You can check code there its not that well coded and would need to be rewriten, but you can see my point there (I know you seen it).

.Dare Devil. 07-24-2014 12:40

Re: [ZP] Addon: Ice Cube (ZP5.0 + ZP 4.3)
 
What is your point you're trying to prove right?
I did create the code like in 5 minutes, tested and edited code. Thats all i did.

About your gas mask, well. It dont work for zp4.3.
You're pretty much doing the same mistake like in this plugin.
Look at my code and read that line where i register think...

About that maxplayer thing. Well, why dont you just save entity index to variable instead doing loop alot bigger than 32 everytime you need to check entity? :)

You're right about my loop thingy yet its just so small thing that i dont even dare to reupload the sma for this.
If you had anyidea how computers works then you will know that some extra native calls wont to anything at all.
If i would in fact run loop in prethink then ofcourse i would do as you say.


Now, about the madness and the way of hooking it.
If you read the zombieplague40.sma then you will realize that there is just no ohter way around it.

H.RED.ZONE 07-24-2014 13:36

Re: [ZP] Addon: Ice Cube (ZP5.0 + ZP 4.3)
 
Quote:

Originally Posted by .Dare Devil. (Post 2173030)
What is your point you're trying to prove right?
I did create the code like in 5 minutes, tested and edited code. Thats all i did.

I see that because im still saying that it is bad coded but actualy you started telling me that first then all comments where removed...

Quote:

Originally Posted by .Dare Devil. (Post 2173030)
About your gas mask, well. It dont work for zp4.3.
You're pretty much doing the same mistake like in this plugin.
Look at my code and read that line where i register think...

Not really a mistake you want to tell me that you want to precache your grenade think before map is loaded. I think this is not needed.


Quote:

Originally Posted by .Dare Devil. (Post 2173030)
You're right about my loop thingy yet its just so small thing that i dont even dare to reupload the sma for this.

A mistake is a mistake i pointed it because you told me my code is bad (:

Quote:

Originally Posted by .Dare Devil. (Post 2173030)
If you had anyidea how computers works then you will know that some extra native calls wont to anything at all.
If i would in fact run loop in prethink then ofcourse i would do as you say.

Loop is a loop you don't need to run it with 32 players if the server has 24 slots simple if you can fix it then fix it and don't come on this thread just to continue posting how its bad coded and so on (:

Quote:

Originally Posted by .Dare Devil. (Post 2173030)
Now, about the madness and the way of hooking it.
If you read the zombieplague40.sma then you will realize that there is just no ohter way around it.

I will check for ZP 4.3 but now i updated ZP 5.0 And i didn't use your speed check i still need to see about ZP 4.3.

Updated version ZP 5.0

asherkin 07-24-2014 13:47

Re: [ZP] Addon: Ice Cube (ZP5.0 + ZP 4.3)
 
Ladies, take it to PM if you wish to continue the pissing contest about code quality.

Quote:

Originally Posted by .Dare Devil. (Post 2172992)
Im just really sad that you took away my cute costom title..

Unsurprisingly (hopefully), special privileges get lost when you blatantly ignore the forum rules.

H.RED.ZONE 07-24-2014 18:26

Re: [ZP] Addon: Ice Cube (ZP5.0 + ZP 4.3)
 
As i seen the only way for the madness to be set was by getting pev_maxspeed thanks to

Code:

    if (g_frozen[id])
    {
        set_pev(id, pev_maxspeed, 1.0)
    }

So in the end there was no chance to change that and it had to be set, however that is one more reason why people should not use anymore ZP 4.3. I have set everything up Updated ZP4.3 Version. I don't see anymore bugs in any version in case you want my suggestion use ZP5.0.

ghostz0r 07-28-2014 02:46

Re: [ZP] Addon: Ice Cube (ZP5.0 + ZP 4.3)
 
Just4Games Exactly the same problem =(
http://i60.tinypic.com/2py271x.jpg

szafa323 07-28-2014 03:10

Re: [ZP] Addon: Ice Cube (ZP5.0 + ZP 4.3)
 
ghostz0r Which version are you using?


All times are GMT -4. The time now is 16:18.

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