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

[ZP] Zombie Class : Invisible Cat


Post New Thread Reply   
 
Thread Tools Display Modes
YamiKaitou
Has a lovely bunch of coconuts
Join Date: Apr 2006
Location: Texas
Old 04-14-2009 , 09:51   Re: [ZP] Zombie Class : Invisible Cat
Reply With Quote #11

Remove the RAR file and upload it as a ZIP file
__________________
ProjectYami Laboratories

I do not browse the forums regularly anymore. If you need me for anything (asking questions or anything else), then PM me (be descriptive in your PM, message containing only a link to a thread will be ignored).
YamiKaitou is offline
joaquimandrade
Veteran Member
Join Date: Dec 2008
Location: Portugal
Old 04-14-2009 , 13:35   Re: [ZP] Zombie Class : Invisible Cat
Reply With Quote #12

This:

PHP Code:
 #define MOVE_BUTTONS ( IN_ATTACK | IN_ATTACK2 | IN_BACK | IN_FORWARD | IN_RUN | IN_JUMP | IN_MOVELEFT | IN_MOVERIGHT | IN_LEFT | IN_RIGHT ) 
its better as

PHP Code:
const MOVE_BUTTONS IN_ATTACK IN_ATTACK2 IN_BACK IN_FORWARD IN_RUN IN_JUMP IN_MOVELEFT IN_MOVERIGHT IN_LEFT IN_RIGHT 
With #define it will be computed on every use of it. Instead of only once.
__________________
joaquimandrade is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 04-14-2009 , 13:48   Re: [ZP] Zombie Class : Invisible Cat
Reply With Quote #13

So with const, if I use const test = 2 + 1, test is evaluated before and all "test" will be replaced by 3 ? I did not know that. Can you somehow prove it ?
Arkshine is offline
joaquimandrade
Veteran Member
Join Date: Dec 2008
Location: Portugal
Old 04-14-2009 , 13:52   Re: [ZP] Zombie Class : Invisible Cat
Reply With Quote #14

Quote:
Originally Posted by arkshine View Post
So with const, if I use const test = 2 + 1, test is evaluated before and all "test" will be replaced by 3 ? I did not know that. Can you somehow prove it ?
"test" will not be replaced by 3. The variable named "test" will hold the value 3.

What will be evaluated is 2+1
__________________
joaquimandrade is offline
DruGzOG
Veteran Member
Join Date: Nov 2007
Location: Unknown
Old 04-14-2009 , 13:55   Re: [ZP] Zombie Class : Invisible Cat
Reply With Quote #15

That skin looks....
but the plugin is nice
__________________
DruGzOG is offline
Send a message via AIM to DruGzOG
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 04-14-2009 , 14:42   Re: [ZP] Zombie Class : Invisible Cat
Reply With Quote #16

Quote:
Originally Posted by joaquimandrade View Post
"test" will not be replaced by 3. The variable named "test" will hold the value 3.

What will be evaluated is 2+1
I was meant, since #define is a pre-processor directive the value is replaced at the compilation.

Sorry for my noobness, if I understand well :

#define TEST 2 + 1
const TEST = 2 + 1;

With #define all the variables named "TEST" will be replaced by 2 + 1 at the compilation.
With const all the variables named "TEST" will be replaced by 3 at the compilation.

Am I right ? Because just tried to dump a plugin with that and I get the same output.

Last edited by Arkshine; 04-14-2009 at 14:52.
Arkshine is offline
joaquimandrade
Veteran Member
Join Date: Dec 2008
Location: Portugal
Old 04-14-2009 , 14:54   Re: [ZP] Zombie Class : Invisible Cat
Reply With Quote #17

Quote:
Originally Posted by arkshine View Post
I was meant, since #define is a pre-processor directive the value is replaced at the compilation.

Sorry if I don't understand well :

#define TEST 2 + 1
const TEST = 2 + 1;

With #define all the variables named "TEST" will be replaced by 2 + 1 at the compilation.
With const all the variables named "TEST" will be replaced by 3 at the compilation.

Am I right ? Because just tried to dump a plugin with that and I get the same output.
Code:
With #define all the variables named "TEST" will be replaced by 2 + 1 at the compilation.
Yes.

Code:
With const all the variables named "TEST" will be replaced by 3 at the compilation.
You got the point but, there is only a variable named "test".
__________________
joaquimandrade is offline
Anggara_nothing
Veteran Member
Join Date: Jan 2009
Location: Indonesia
Old 04-14-2009 , 19:48   Re: [ZP] Zombie Class : Invisible Cat
Reply With Quote #18

Quote:
Originally Posted by YamiKaitou View Post
Remove the RAR file and upload it as a ZIP file
i known. because rar not support with linux.
Anggara_nothing is offline
Anggara_nothing
Veteran Member
Join Date: Jan 2009
Location: Indonesia
Old 04-17-2009 , 04:45   Re: [ZP] Zombie Class : Invisible Cat
Reply With Quote #19

Quote:
Originally Posted by arkshine View Post
- You should use set_user_rendering() from fun instead of fakemeta, it will be more efficient.
- You should use FM_CmdStart instead of PlayerPreThink, but is really need just to glow ?
- Like said Nextra, you should move pev_button, but I would reorganize like this to avoid returs :

Code:
const MOVE_BUTTONS = ( IN_ATTACK | IN_ATTACK2 | IN_BACK | IN_FORWARD | IN_RUN | IN_JUMP | IN_MOVELEFT | IN_MOVERIGHT | IN_LEFT | IN_RIGHT );

Code:
    if ( is_user_alive( id ) && zp_get_user_zombie( id ) && zp_get_user_zombie_class(id) == g_cat_class )     {         pev( id, pev_button ) & MOVE_BUTTONS ?                     set_user_rendering(id, kRenderFxNone, 0,0,0,kRenderNormal, 255) :             set_user_rendering(id, kRenderFxGlowShell,0,0,0,kRenderTransAlpha, 45);     }
so, what different of FM_CmdStart and FM_PlayerPreThink ???
Anggara_nothing is offline
vermillioN25
Member
Join Date: Apr 2009
Location: Brazil
Old 05-04-2009 , 13:18   Re: [ZP] Zombie Class : Invisible Cat
Reply With Quote #20

I've found a bug in yout class, ALL zombies can be Invisible in Shadow.

Can you fix it?
__________________
vermillioN25 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 08:46.


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