This site is a testing version, but all data is shared with the live forum.


Raised This Month: $ Target: $400
 0% 

[ZP] I am the Iron Man 1.2


Post New Thread Reply   
 
Thread Tools Display Modes
abdul-rehman
Veteran Member
Join Date: Jan 2010
Location: Khi, Pakistan
Old 12-31-2010 , 09:14   Re: [ZP] I am the Iron Man 1.1
Reply With Quote #11

It would be better if you would just cache whether the user is connected or not:
Code:
// Using bits will be far more effecient new g_bitConnectedPlayers #define MarkUserConnected(%0)   ( g_bitConnectedPlayers |= ( 1 << ( %0 & 31 ) ) ) #define ClearUserConnected(%0)  ( g_bitConnectedPlayers &= ~( 1 << ( %0 & 31 ) ) ) #define IsUserConnected(%0)     ( g_bitConnectedPlayers & ( 1 << ( %0 & 31 ) ) ) // Put this in thos forwards public client_connect(id) MarkUserConnected(id) public client_disconnect(id) ClearUserConnected(id) some_function( id ) {     // To check if user is connected     if ( IsUserConnected(id) )     {         // ...     } }
__________________

My Plugins For ZP

Inactive due to College and Studies
abdul-rehman is offline
Send a message via Yahoo to abdul-rehman Send a message via Skype™ to abdul-rehman
Nightfall1
Senior Member
Join Date: Aug 2008
Old 12-31-2010 , 09:35   Re: [ZP] I am the Iron Man 1.1
Reply With Quote #12

abdul-rehman I lose my brain some where, I don't understand anything :O, that is hard level slow down a bit
__________________
SIGNATURE
Nightfall1 is offline
NiHiLaNTh
Way Past Expiration
Join Date: May 2009
Location: Latvia
Old 12-31-2010 , 11:13   Re: [ZP] I am the Iron Man 1.1
Reply With Quote #13

Bit-shifts are not so hard.Maybe this tutorial will help you to understand bit shift stuff.

Edit.
Code:
public reset_cvar()
{
    for(new i = 1; i <= g_maxplayer; i++)
    {
    g_IronJump[i] = false
    g_IronMan[i] = false
    }
}
could be also done like this
Code:
public reset_cvar()
{
    arrayset( g_IronJump, false, 33 )
    arrayset( g_IronMan, false, 33 )
}
__________________


Last edited by NiHiLaNTh; 12-31-2010 at 11:16.
NiHiLaNTh is offline
Send a message via Skype™ to NiHiLaNTh
abdul-rehman
Veteran Member
Join Date: Jan 2010
Location: Khi, Pakistan
Old 12-31-2010 , 12:14   Re: [ZP] I am the Iron Man 1.1
Reply With Quote #14

Quote:
Originally Posted by Nightfall1 View Post
abdul-rehman I lose my brain some where, I don't understand anything :O, that is hard level slow down a bit
If you dont understand bits, then use booleans instead to cache when da player was connected:
Code:
new bool:g_bIsConnected[33] public client_connect( id ) g_bIsConnected[ id ] = true public client_disconnect( id ) g_bIsConnected[ id ] = false // To check is player is connected some_function( id ) {     if ( g_bIsConnected[id] )     {          // do something     } }
__________________

My Plugins For ZP

Inactive due to College and Studies
abdul-rehman is offline
Send a message via Yahoo to abdul-rehman Send a message via Skype™ to abdul-rehman
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 12-31-2010 , 12:36   Re: [ZP] I am the Iron Man 1.1
Reply With Quote #15

Caching the value for that is pointless. That's not like the forward will be called very often and all the time, so it's fine as it is. He should concentrate first to clean up the code, fixing things as suggested, etc, before trying to optimize the plugin.
__________________
Arkshine is offline
ANTICHRISTUS
kingdom of weird stuff
Join Date: Jun 2010
Location: My kingdom is not in thi
Old 12-31-2010 , 19:06   Re: [ZP] I am the Iron Man 1.2
Reply With Quote #16

there is a iron man model in this pack http://www.mediafire.com/?1brhtdl6a5zjodt#1
it will be nice with this plugin
__________________
ANTICHRISTUS is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 02-20-2011 , 11:38   Re: [ZP] I am the Iron Man 1.2
Reply With Quote #17

.Don't use engfunc(EngFunc_PrecacheXXX
.Use Ham_Deploy to set knife model or at list put filters in the register_event line

PHP Code:
    RegisterHam(Ham_Touch"player""fw_IronTouch")
    
RegisterHam(Ham_Touch"worldspawn""fw_IronTouch"
.I'm curious how you can use the same handler for those 1 forwards, fix it.




PHP Code:
    register_logevent("ResetStuffs"2"1=Round_Start")
    
RegisterHam(Ham_Spawn"player""ResetStuffs"
.Same here, you can't use the same callback, fix it.



.use_iron function doesn't need to be public, it shouldn't even be an extra function as it is only called from one place, fplease fix it.

PHP Code:
set_ucUC_HandleUC_Buttons, (buttons IN_ATTACK IN_ATTACK2)); 
.You don't understand what you are doing here.




PHP Code:
        for(new victim 1victim <= g_maxplayervictim++)
        {
            
IronDamage(victimironpointer1pointer2)
            
IronKnockback(victimironoriginFloat:pointer3pointer1pointer2// LOL THIS IS REALY WORK ? or.... NOT :))
            
IronKnockback2(victimironpointer3pointer1pointer2// assumed this one it work
        

.Use get_players native, then you don't have to check in all the used functions is victim is alive.
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 03-05-2011 , 18:46   Re: [ZP] I am the Iron Man 1.2
Reply With Quote #18

No changes nor confirmation you work on it, unapproved.
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
newzombieserveruk
Junior Member
Join Date: Jan 2014
Old 02-20-2014 , 11:13   Re: [ZP] I am the Iron Man 1.2
Reply With Quote #19

Has anybody got a fix for this
__________________
http://www.gametracker.com/server_in...163.214:27015/
UK SERVER ZOMBIE CONNECT 2014 ZOMBIE PLAGE
newzombieserveruk 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 13:09.


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