AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Zombie Plague Mod (https://forums.alliedmods.net/forumdisplay.php?f=126)
-   -   Subplugin Submission [ZP] Addon : Easy First Zombie Sorting. (https://forums.alliedmods.net/showthread.php?t=186592)

DSASDFGH 06-01-2012 13:55

[ZP] Addon : Easy First Zombie Sorting.
 
1 Attachment(s)
Just a Simple Plug-in, Give a random colors glow to first zombie every 3.0 Seconds.

Credit:
Function to First Zombie Tutorial

Update
2012.6.2 : Removed fakemeta requirement.

H.RED.ZONE 06-01-2012 14:12

Re: [ZP] Addon : Easy First Zombie Sorting.
 
More simple and not so much includes.
PHP Code:

#include <amxmodx> 
#include <fakemeta_util>
#include <zombieplague> 

#define PLUGIN    "[ZP] FirstZombie Glow" 
#define AUTHOR    "DSASDFGH" 
#define VERSION    "1.25" 

const TASK_GLOW 3356;

public 
plugin_init() { 
    
register_plugin(PLUGINVERSIONAUTHOR
    
register_forward(FM_ClientDisconnect"fw_ClientDisconnect")    


public 
zp_user_infected_post(id) { 
    if(!
is_user_alive(id) || !zp_get_user_first_zombie(id))
        return;
    
    
GlowEffects(id)
    
set_task(3.0"GlowEffects"id_,_,"b"


public 
fw_ClientDisconnect(id) {
    
remove_task(id)
}

public 
GlowEffects(id) { 
    
fm_set_rendering(idkRenderFxGlowShellrandom_num(0,255), random_num(0,255), random_num(0,255), kRenderNormal16)
}  

public 
zp_user_unfrozen(id) {
    if(
is_user_connected(id) && zp_get_user_first_zombie(id)) {
        
fm_set_rendering(idkRenderFxGlowShellrandom_num(0,255), random_num(0,255), random_num(0,255), kRenderNormal16)
    }



micapat 06-01-2012 14:20

Re: [ZP] Addon : Easy First Zombie Sorting.
 
set_user_rendering is better than fm_set_rendering.

H.RED.ZONE 06-01-2012 14:39

Re: [ZP] Addon : Easy First Zombie Sorting.
 
If he is useing FM_ClientDisconnect
Then its better to use fm_set_rendering and not include fun.

In case useing only fun this would be the best way.
PHP Code:

#include <amxmodx> 
#include <fun>
#include <zombieplague> 

#define PLUGIN    "[ZP] FirstZombie Glow" 
#define AUTHOR    "DSASDFGH" 
#define VERSION    "1.25" 

const TASK_GLOW 3356;

public 
plugin_init() { 
    
register_plugin(PLUGINVERSIONAUTHOR


public 
zp_user_infected_post(id) { 
    if(!
is_user_alive(id) || !zp_get_user_first_zombie(id))
        return;
        
    
GlowEffects(id)
        
    
set_task(3.0"GlowEffects"id_,_,"b"


public 
client_disconnect(id) {
    
remove_task(id)
}

public 
GlowEffects(id) { 
    
set_user_rendering(idkRenderFxGlowShellrandom_num(0,255), random_num(0,255), random_num(0,255), kRenderNormal16)
}  

public 
zp_user_unfrozen(id) {
    if(
is_user_connected(id) && zp_get_user_first_zombie(id)) {
        
set_user_rendering(idkRenderFxGlowShellrandom_num(0,255), random_num(0,255), random_num(0,255), kRenderNormal16)
    }



micapat 06-01-2012 14:45

Re: [ZP] Addon : Easy First Zombie Sorting.
 
"better" in what ? Not in performance anyway.

And yes in this case fakemeta is useless.

H.RED.ZONE 06-01-2012 14:54

Re: [ZP] Addon : Easy First Zombie Sorting.
 
"Better" yes in performance.
No need to use fakemeta and fun.

DSASDFGH 06-01-2012 15:08

Re: [ZP] Addon : Easy First Zombie Sorting.
 
Thanks all, I will remove "fakemeta" requirement.
But,
I Should be going to sleep because now is dawn in some asian countries :D

micapat 06-01-2012 15:09

Re: [ZP] Addon : Easy First Zombie Sorting.
 
Fakemeta Stock > Fun Module ? L0L.

Maybe read this ...

http://forums.alliedmods.net/showpos...6&postcount=19
http://forums.alliedmods.net/showpos...14&postcount=1

I don't know why all zp developers like fakemeta stocks when there are more efficient things ...

H.RED.ZONE 06-01-2012 15:27

Re: [ZP] Addon : Easy First Zombie Sorting.
 
I think you miss judged this, in plugins that are huge, if you are use fakemeta and fun you would not need it, just to call rendering or maybe some other small functions? In this case its better to use fun because fun > fakemeta
In case that i was talking about --> http://forums.alliedmods.net/showthread.php?p=571256
So again
-->
Quote:

Originally Posted by H.RED.ZONE (Post 1720887)
In case useing only fun this would be the best way.
PHP Code:

#include <amxmodx>
#include <fun>
#include <zombieplague>

#define PLUGIN    "[ZP] FirstZombie Glow"
#define AUTHOR    "DSASDFGH"
#define VERSION    "1.25"

const TASK_GLOW 3356;

public 
plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR)
}

public 
zp_user_infected_post(id) {
    if(!
is_user_alive(id) || !zp_get_user_first_zombie(id))
        return;
        
    
GlowEffects(id)
        
    
set_task(3.0"GlowEffects"id_,_,"b")
}

public 
client_disconnect(id) {
    
remove_task(id)
}

public 
GlowEffects(id) {
    
set_user_rendering(idkRenderFxGlowShellrandom_num(0,255), random_num(0,255), random_num(0,255), kRenderNormal16)
}  

public 
zp_user_unfrozen(id) {
    if(
is_user_connected(id) && zp_get_user_first_zombie(id)) {
        
set_user_rendering(idkRenderFxGlowShellrandom_num(0,255), random_num(0,255), random_num(0,255), kRenderNormal16)
    }




DSASDFGH 06-01-2012 15:27

Re: [ZP] Addon : Easy First Zombie Sorting.
 
Quote:

Originally Posted by micapat (Post 1720906)
Fakemeta Stock > Fun Module ? L0L.

Maybe read this ...

http://forums.alliedmods.net/showpos...6&postcount=19
http://forums.alliedmods.net/showpos...14&postcount=1

I don't know why all zp developers like fakemeta stocks when there are more efficient things ...

In My Guess, ZP Author uses only fakemeta stocks + cstrike.
Who cares? I'm too sleepy okay, Now I'm on the my bed.


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

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