Raised This Month: $ Target: $400
 0% 

Subplugin Submission [New Natives] Zombie Plague 4.3 Fix 5a


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Excalibur.007
Veteran Member
Join Date: Sep 2009
Location: Singapore
Old 07-25-2011 , 05:42   [New Natives] Zombie Plague 4.3 Fix 5a
Reply With Quote #1

Description:
This adds additional natives to help scripters to create more plugins. This is not a plugin but a modified version of Zombie Plague 4.3 Fix 5a

Currently natives:
  • zp_get_user_frozen(id)
  • zp_set_user_frozen(id, bool:IsFrozen, Float:duration)
  • zp_user_has_infect_nade(id)
  • zp_get_user_burning(id)
  • zp_set_user_burning(id, bool:IsBurning)
  • zp_get_user_unlimited_clip(id)
  • zp_set_user_unlimited_clip(id, bool:IsUnlimitedClip)
  • zp_get_user_painshockfree(id)
  • zp_set_user_painshockfree(id, bool:IsPainShockFree)
  • zp_set_gamemode(gamemode)

Note: From the previous versions, you see some removal of natives in this newer version as they don't do much help.

Note 2: You also see changes at zp_set_user_frozen. It now supports duration of freeze.

Note 3: Natives are now changed to boolean(true/false) to add more readability to plugins.

To test the new natives:
PHP Code:
#include <amxmodx>
#include <zombieplague>
#include <zombieplague_newnatives>

public plugin_init()
{
    
register_plugin("[ZP] New Natives Test""1.0""eXcalibur.007")
    
    
register_clcmd("say /isfrozen""return_isfrozen")
    
register_clcmd("say /setfrozen""set_frozen")
    
    
register_clcmd("say /hasinfectnade""return_hasinfectnade")
    
    
register_clcmd("say /isburning""return_isburning")
    
register_clcmd("say /setburning""set_burning")
    
    
register_clcmd("say /isunlimitedclip""return_isunlimitedclip")
    
register_clcmd("say /setunlimitedcip""set_unlimitedclip")
    
    
register_clcmd("say /ispainshockfree""return_ispainshockfree")
    
register_clcmd("say /setpainshockfree""set_painshockfree")
    
    
register_clcmd("say /setrandomgamemode""set_randomgamemode")
}

public 
return_isfrozen(id)
{
    if(!
is_user_alive(id))
        return
        
    
client_print(idprint_chat"You are %s"zp_get_user_frozen(id) ? "frozen" "not frozen")
}

public 
set_frozen(id)
{
    if(!
is_user_alive(id))
        return
        
    
zp_set_user_frozen(idtrue5.0)
}

public 
return_hasinfectnade(id)
{
    if(!
is_user_alive(id) || !zp_get_user_zombie(id))
        return
        
    
client_print(idprint_chat"You %s a infection nade"zp_user_has_infect_nade(id) ? "have" "do not have")
}

public 
return_isburning(id)
{
    if(!
is_user_alive(id))
        return
        
    
client_print(idprint_chat"You are %s"zp_get_user_burning(id) ? "burning" "not burning")
}

public 
set_burning(id)
{
    if(!
is_user_alive(id))
        return
        
    
zp_set_user_burning(idtrue)
}

public 
return_isunlimitedclip(id)
{
    if(!
is_user_alive(id))
        return
        
    
client_print(idprint_chat"You %s unlimited clip"zp_get_user_unlimited_clip(id) ? "have" "do not have")
}

public 
set_unlimitedclip(id)
{
    if(!
is_user_alive(id))
        return
        
    
zp_set_user_unlimited_clip(idtrue)
}

public 
return_ispainshockfree(id)
{
    if(!
is_user_alive(id))
        return
        
    
client_print(idprint_chat"You %s pain shock free"zp_get_user_painshockfree(id) ? "have" "do not have")
}

public 
set_painshockfree(id)
{
    if(!
is_user_alive(id))
        return
        
    
zp_set_user_painshockfree(idtrue)
}

public 
set_randomgamemode()
{
    new 
iRandom random_num(02)
    
    switch(
iRandom)
    {
        case 
0:
        {
            
zp_set_gamemode(MODE_SWARM)
        }
        case 
1:
        {
            
zp_set_gamemode(MODE_MULTI)
        }
        case 
2:
        {
            
zp_set_gamemode(MODE_PLAGUE)
        }

    }

Type the command and see whether if works. If it's broken, please post on this thread.
Attached Files
File Type: zip Zombie Plague 4.3 Fix 5a New Natives.zip (72.6 KB, 5057 views)

Last edited by Excalibur.007; 07-26-2011 at 04:01.
Excalibur.007 is offline
abdul-rehman
Veteran Member
Join Date: Jan 2010
Location: Khi, Pakistan
Old 07-25-2011 , 06:34   Re: [New Natives] Zombie Plague 4.3 Fix 5a
Reply With Quote #2

You should PM MeRcyLeZZ to add these natives to his upcoming patch, since his codes are much optimized etc. btw nice work in keeping them updated.
__________________

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
Excalibur.007
Veteran Member
Join Date: Sep 2009
Location: Singapore
Old 07-25-2011 , 07:24   Re: [New Natives] Zombie Plague 4.3 Fix 5a
Reply With Quote #3

Will do. Suggestions are welcomed as long they do much help on creating plugins.
Excalibur.007 is offline
bibu
Veteran Member
Join Date: Sep 2010
Old 07-25-2011 , 16:12   Re: [New Natives] Zombie Plague 4.3 Fix 5a
Reply With Quote #4

Quote:
Originally Posted by abdul-rehman View Post
You should PM MeRcyLeZZ to add these natives to his upcoming patch.
Agreed. He will for sure add some/all natives, since they're really useful. Keep up the good work.
__________________
Selling tons of my own private works.
Accepting paid work for clans and communities.
Don't hesitate to contact me.
bibu is offline
Excalibur.007
Veteran Member
Join Date: Sep 2009
Location: Singapore
Old 07-25-2011 , 19:18   Re: [New Natives] Zombie Plague 4.3 Fix 5a
Reply With Quote #5

Please note that there may be a update to this if I found bugs on the natives, after my school hours =_=...
Excalibur.007 is offline
hellmoss
Senior Member
Join Date: Oct 2009
Location: ZOMBIE PLAGUE
Old 11-11-2011 , 06:41   Re: [New Natives] Zombie Plague 4.3 Fix 5a
Reply With Quote #6

..

Last edited by hellmoss; 11-11-2011 at 19:03. Reason: nvm i figured it out
hellmoss is offline
WaLkMaN
Senior Member
Join Date: Oct 2010
Location: Varna, Bulgaria
Old 10-19-2013 , 08:04   Re: [New Natives] Zombie Plague 4.3 Fix 5a
Reply With Quote #7

Can you create two new natives ? For check multi round and normal infection ? (ex. zp_is_multi_round(), zp_is_normal_round())
WaLkMaN 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 14:49.


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