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

Subplugin Submission [ZP] Extra Item: Gas Mask


Post New Thread Reply   
 
Thread Tools Display Modes
Y060N
BANNED
Join Date: Dec 2011
Location: www.equilibriumcs.com
Old 07-12-2012 , 01:25   Re: [ZP] Extra Item: Gas Mask
Reply With Quote #71

Your link to my profile doesn't work in your opening post. And I think you should give credit to me and micapat with reason (making my plugin more efficient tenfold and removing pre-think completely).
Y060N is offline
H.RED.ZONE
Veteran Member
Join Date: Sep 2011
Location: Serbia, Belgrade
Old 07-12-2012 , 01:29   Re: [ZP] Extra Item: Gas Mask
Reply With Quote #72

Don't worry fixed. Not on purpose i give other people credits if they help just chill o_O .
__________________
H.RED.ZONE is offline
Y060N
BANNED
Join Date: Dec 2011
Location: www.equilibriumcs.com
Old 07-12-2012 , 01:48   Re: [ZP] Extra Item: Gas Mask
Reply With Quote #73

I will chill when you give micapat and I the correct credit. It wasn't just removing a loop and closing the thread, it was optimizing your code by at least 1000x since now it isn't called for every client at an average of 66.6 times per second.
Y060N is offline
H.RED.ZONE
Veteran Member
Join Date: Sep 2011
Location: Serbia, Belgrade
Old 07-12-2012 , 01:49   Re: [ZP] Extra Item: Gas Mask
Reply With Quote #74

micapad did that in his post -.- you only tested message.
__________________

Last edited by H.RED.ZONE; 07-12-2012 at 01:50.
H.RED.ZONE is offline
Y060N
BANNED
Join Date: Dec 2011
Location: www.equilibriumcs.com
Old 07-12-2012 , 01:54   Re: [ZP] Extra Item: Gas Mask
Reply With Quote #75

Quote:
Originally Posted by H.RED.ZONE View Post
Nope it will be removed in 5 sec i think. :/
In this plugin we need to use micapat 's method i think it's much but still...
I believe I was the one that had you remove player_prethink. Correct me if I'm wrong? Micapat's method was creating a 5 second thinking entity.

Last edited by Y060N; 07-12-2012 at 01:54.
Y060N is offline
H.RED.ZONE
Veteran Member
Join Date: Sep 2011
Location: Serbia, Belgrade
Old 07-12-2012 , 01:56   Re: [ZP] Extra Item: Gas Mask
Reply With Quote #76

Nope before that we removed prethink what you did is confirmed message usage.
__________________
H.RED.ZONE is offline
Y060N
BANNED
Join Date: Dec 2011
Location: www.equilibriumcs.com
Old 07-12-2012 , 01:58   Re: [ZP] Extra Item: Gas Mask
Reply With Quote #77

PHP Code:
public client_PreThink(id) {
    if(~
_IsPlayerAlive(id))
        return 
PLUGIN_HANDLED;
    
    if( 
_IsPlayerInMaskid ) ) {

        if(
get_pcvar_num_pcvar_after_icon_on ) == 1) {
            
message_begin(MSG_ONE_UNRELIABLE,g_icon,{0,0,0},id);
            
write_byte(get_pcvar_num(_pcvar_icon_status));
            
write_string("dmg_gas");
            
write_byte(0);
            
write_byte(255);
            
write_byte(0);
            
message_end();
        }                 
    }
    return 
PLUGIN_HANDLED;

Looking at the code it looks like player pre-think was in there with only the message change bud.
Y060N is offline
H.RED.ZONE
Veteran Member
Join Date: Sep 2011
Location: Serbia, Belgrade
Old 07-12-2012 , 01:59   Re: [ZP] Extra Item: Gas Mask
Reply With Quote #78

This closed prethink
http://forums.alliedmods.net/showpos...7&postcount=55
__________________
H.RED.ZONE is offline
micapat
Veteran Member
Join Date: Feb 2010
Location: Nyuu, nyuu (France).
Old 07-12-2012 , 09:34   Re: [ZP] Extra Item: Gas Mask
Reply With Quote #79

You can remove the client_command now if you have registered it as a zp_extra_item.

Don't remove mask in zp_user_infected_pre, maybe one plugin can block the infection. Just remove in post.

I don't know if when a player die, icon is removed. But it's not necessary to remove the icon when he disconnects.

The chat function can be improved (: .
__________________
micapat is offline
H.RED.ZONE
Veteran Member
Join Date: Sep 2011
Location: Serbia, Belgrade
Old 07-12-2012 , 10:53   Re: [ZP] Extra Item: Gas Mask
Reply With Quote #80

Quote:
Originally Posted by micapat View Post
You can remove the client_command now if you have registered it as a zp_extra_item.
I want them to have a command for buying (:

Quote:
Originally Posted by micapat View Post
Don't remove mask in zp_user_infected_pre, maybe one plugin can block the infection. Just remove in post.
Will remove in next updated. Thank you.
Quote:
Originally Posted by micapat View Post
I don't know if when a player die, icon is removed.
Yes will need to register death event.

Quote:
Originally Posted by micapat View Post
But it's not necessary to remove the icon when he disconnects.
Ok will be removed. Thanks.

Quote:
Originally Posted by micapat View Post
The chat function can be improved (: .
Can you show me how to improve it? Thanks
__________________
H.RED.ZONE is offline
Reply


Thread Tools
Display Modes

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 20:33.


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