Raised This Month: $ Target: $400
 0% 

Subplugin Submission [ZP] Addon : Easy First Zombie Sorting.


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
DSASDFGH
Senior Member
Join Date: Jul 2011
Location: Facebook
Old 06-01-2012 , 13:55   [ZP] Addon : Easy First Zombie Sorting.
Reply With Quote #1

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.
Attached Files
File Type: sma Get Plugin or Get Source (zp_addon_1stzombi_sort_glow_v2.sma - 1379 views - 1.7 KB)
__________________
Learning SourceMod is happy

Last edited by DSASDFGH; 06-02-2012 at 02:58. Reason: Credit
DSASDFGH is offline
H.RED.ZONE
Veteran Member
Join Date: Sep 2011
Location: Serbia, Belgrade
Old 06-01-2012 , 14:12   Re: [ZP] Addon : Easy First Zombie Sorting.
Reply With Quote #2

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)
    }

__________________
H.RED.ZONE is offline
micapat
Veteran Member
Join Date: Feb 2010
Location: Nyuu, nyuu (France).
Old 06-01-2012 , 14:20   Re: [ZP] Addon : Easy First Zombie Sorting.
Reply With Quote #3

set_user_rendering is better than fm_set_rendering.
__________________
micapat is offline
H.RED.ZONE
Veteran Member
Join Date: Sep 2011
Location: Serbia, Belgrade
Old 06-01-2012 , 14:39   Re: [ZP] Addon : Easy First Zombie Sorting.
Reply With Quote #4

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)
    }

__________________
H.RED.ZONE is offline
micapat
Veteran Member
Join Date: Feb 2010
Location: Nyuu, nyuu (France).
Old 06-01-2012 , 14:45   Re: [ZP] Addon : Easy First Zombie Sorting.
Reply With Quote #5

"better" in what ? Not in performance anyway.

And yes in this case fakemeta is useless.
__________________
micapat is offline
H.RED.ZONE
Veteran Member
Join Date: Sep 2011
Location: Serbia, Belgrade
Old 06-01-2012 , 14:54   Re: [ZP] Addon : Easy First Zombie Sorting.
Reply With Quote #6

"Better" yes in performance.
No need to use fakemeta and fun.
__________________
H.RED.ZONE is offline
DSASDFGH
Senior Member
Join Date: Jul 2011
Location: Facebook
Old 06-01-2012 , 15:08   Re: [ZP] Addon : Easy First Zombie Sorting.
Reply With Quote #7

Thanks all, I will remove "fakemeta" requirement.
But,
I Should be going to sleep because now is dawn in some asian countries
__________________
Learning SourceMod is happy
DSASDFGH is offline
micapat
Veteran Member
Join Date: Feb 2010
Location: Nyuu, nyuu (France).
Old 06-01-2012 , 15:09   Re: [ZP] Addon : Easy First Zombie Sorting.
Reply With Quote #8

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 ...
__________________
micapat is offline
DSASDFGH
Senior Member
Join Date: Jul 2011
Location: Facebook
Old 06-01-2012 , 15:27   Re: [ZP] Addon : Easy First Zombie Sorting.
Reply With Quote #9

Quote:
Originally Posted by micapat View Post
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.
__________________
Learning SourceMod is happy
DSASDFGH is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 06-01-2012 , 15:56   Re: [ZP] Addon : Easy First Zombie Sorting.
Reply With Quote #10

Always better to use modules natives when you can, so yes, cstrike, fun and engine are better to use than fakemeta conversions.
__________________
- tired and retired -

- my plugins -
ConnorMcLeod 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 16:23.


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