Raised This Month: $ Target: $400
 0% 

Subplugin Submission [New Natives]ZP 4.3[v3.6] | ZPA 1.6.1[v3.6]


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
albert123
Veteran Member
Join Date: Mar 2009
Location: VietNam, Hai Phong
Old 08-16-2010 , 11:03   Re: [New Natives] Zombie Plague 4.3 - v1.5 - 08/03/2010
Reply With Quote #1

Quote:
Originally Posted by Excalibur.007 View Post
Finally someone would post :X. Might probably optimize the codes as well after i get everything of my other plugins fixed.
So, i must to recode to set unlimited ammo for pistol ?
__________________
albert123 is offline
Russiaboy
BANNED
Join Date: May 2009
Location: ZombiePlague is my Home
Old 02-21-2010 , 07:09   Re: [New Natives] Zombie Plague 4.3
Reply With Quote #2

GJ
Russiaboy is offline
Send a message via MSN to Russiaboy Send a message via Skype™ to Russiaboy
NiHiLaNTh
Way Past Expiration
Join Date: May 2009
Location: Latvia
Old 02-21-2010 , 08:19   Re: [New Natives] Zombie Plague 4.3 - v1.1 - 21/02/2010
Reply With Quote #3

Code:
new g_isburning [ 33 ]

// Then you have to set g_isburning true or false everywhere at the code

public plugin_natives ( )
{
     register_native ( "zp_get_user_burning",  "native_get_user_burning", 1 )
}

public native_get_user_burning ( player )
{
     return g_isburning [ player ] 
}
P.S That's just the easiest way...
__________________

NiHiLaNTh is offline
Send a message via Skype™ to NiHiLaNTh
Old 02-21-2010, 08:34
georgik57
This message has been deleted by georgik57.
georgik57
Veteran Member
Join Date: Oct 2008
Location: 🎧Music World
Old 02-21-2010 , 10:03   Re: [New Natives] Zombie Plague 4.3 - v1.1 - 21/02/2010
Reply With Quote #5

excalibur...at zp_set_user_frozen native do u really have to specify all those things? cause those actions are allready defined once in the plugin...if you just set g_frozen[id] = true wouldn't they automatically apply from the rest of the plugin? pls reply as soo as u can
__________________
georgik57 is offline
Send a message via MSN to georgik57 Send a message via Yahoo to georgik57 Send a message via Skype™ to georgik57
NiHiLaNTh
Way Past Expiration
Join Date: May 2009
Location: Latvia
Old 02-21-2010 , 10:47   Re: [New Natives] Zombie Plague 4.3 - v1.1 - 21/02/2010
Reply With Quote #6

Quote:
Originally Posted by georgik57 View Post
excalibur...at zp_set_user_frozen native do u really have to specify all those things? cause those actions are allready defined once in the plugin...if you just set g_frozen[id] = true wouldn't they automatically apply from the rest of the plugin? pls reply as soo as u can
Everything is correct
__________________

NiHiLaNTh is offline
Send a message via Skype™ to NiHiLaNTh
georgik57
Veteran Member
Join Date: Oct 2008
Location: 🎧Music World
Old 02-21-2010 , 10:53   Re: [New Natives] Zombie Plague 4.3 - v1.1 - 21/02/2010
Reply With Quote #7

Quote:
Originally Posted by NiHiLaNTh View Post
Everything is correct
well i sure hope so...thanks for replying
oh and to find out whether a user is burning or not can we use g_burning_duration[33]? if it's 0 it means user isn't burning and if you want to set a user on fire just set it to a number and make it decrease( g_burning_duration[id]-- )...
__________________
georgik57 is offline
Send a message via MSN to georgik57 Send a message via Yahoo to georgik57 Send a message via Skype™ to georgik57
NiHiLaNTh
Way Past Expiration
Join Date: May 2009
Location: Latvia
Old 02-21-2010 , 11:18   Re: [New Natives] Zombie Plague 4.3 - v1.1 - 21/02/2010
Reply With Quote #8

That's actually great idea.Not sure about code...

Code:
new g_burning_duration [ 33 ]

public plugin_natives ( )
{
    register_native ( "zp_get_user_burning", "_zp_get_user_burning", 1 )
    register_native ( "zp_set_user_burning", "_zp_set_user_burning", 1 )
}

// A lot of code....

public _zp_get_user_burning ( player )
{
    if ( g_burning_duration [ player ] <= 0 )
        return false

    return true    
}

public _zp_set_user_burning ( player, bool:isburning )
{
    switch ( isburning )
    {
        case true: // Force to burn
        {
            if ( !task_exists ( player+TASK_BURN ) )
            {
                set_task ( 0.2, "burning_flame", player+TASK_BURN, _, _, "b" )
            }
            else
            {
                g_burning_duration [ player ]--
            }
        }
        case false:
        {
            if ( task_exists ( player+TASK_BURN ) )
            {
                static origin [ 3 ]
                get_user_origin ( player, origin )
                
                // Smoke sprite
                message_begin(MSG_PVS, SVC_TEMPENTITY, origin)
                write_byte(TE_SMOKE) // TE id
                write_coord(origin[0]) // x
                write_coord(origin[1]) // y
                write_coord(origin[2]-50) // z
                write_short(g_smokeSpr) // sprite
                write_byte(random_num(15, 20)) // scale
                write_byte(random_num(10, 20)) // framerate
                message_end()
                
                remove_task ( player+TASK_BURN )
                g_burning_duration [ player ] = 0
            }
        }
    }
}
__________________

NiHiLaNTh is offline
Send a message via Skype™ to NiHiLaNTh
georgik57
Veteran Member
Join Date: Oct 2008
Location: 🎧Music World
Old 02-21-2010 , 11:22   Re: [New Natives] Zombie Plague 4.3 - v1.1 - 21/02/2010
Reply With Quote #9

Quote:
Originally Posted by NiHiLaNTh View Post
That's actually great idea.Not sure about code...

Code:
new g_burning_duration [ 33 ]

public plugin_natives ( )
{
    register_native ( "zp_get_user_burning", "_zp_get_user_burning", 1 )
    register_native ( "zp_set_user_burning", "_zp_set_user_burning", 1 )
}

// A lot of code....

public _zp_get_user_burning ( player )
{
    if ( g_burning_duration [ player ] <= 0 )
        return false

    return true    
}

public _zp_set_user_burning ( player, bool:isburning )
{
    switch ( isburning )
    {
        case true: // Force to burn
        {
            if ( !task_exists ( player+TASK_BURN ) )
            {
                set_task ( 0.2, "burning_flame", player+TASK_BURN, _, _, "b" )
            }
            else
            {
                g_burning_duration [ player ]--
            }
        }
        case false:
        {
            if ( task_exists ( player+TASK_BURN ) )
            {
                static origin [ 3 ]
                get_user_origin ( player, origin )
                
                // Smoke sprite
                message_begin(MSG_PVS, SVC_TEMPENTITY, origin)
                write_byte(TE_SMOKE) // TE id
                write_coord(origin[0]) // x
                write_coord(origin[1]) // y
                write_coord(origin[2]-50) // z
                write_short(g_smokeSpr) // sprite
                write_byte(random_num(15, 20)) // scale
                write_byte(random_num(10, 20)) // framerate
                message_end()
                
                remove_task ( player+TASK_BURN )
                g_burning_duration [ player ] = 0
            }
        }
    }
}
wow...i'm gonna try using this code
then i'm gonna make 2 zombie classes...1 immune to freezing and 1 immune to fire
if they work and i don't get any crash i'm gonna tell you guys
__________________
georgik57 is offline
Send a message via MSN to georgik57 Send a message via Yahoo to georgik57 Send a message via Skype™ to georgik57
meTaLiCroSS
Gaze Upon My Hat
Join Date: Feb 2009
Location: Viņa del Mar, Chile
Old 02-21-2010 , 12:19   Re: [New Natives] Zombie Plague 4.3 - v1.1 - 21/02/2010
Reply With Quote #10

And now what?... this isn't official :-/
__________________
Quote:
Originally Posted by joropito View Post
You're right Metalicross
meTaLiCroSS 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 15:27.


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