Plugin Available [ZP] Extra Item: Infection Storm for [ZE] Extra Item

Unpaid Requests, Public Plugins
Post Reply
User avatar
konno
Member
Member
Brazil
Posts: 44
Joined: 2 Years Ago
Location: Brazil
Has thanked: 2 times
Been thanked: 1 time
Age: 28
Contact:

[ZP] Extra Item: Infection Storm for [ZE] Extra Item

#1

Post by konno » 2 Years Ago

Hi guys, follows a great extra item to convert to our mod ZE, follow the link and sma.

https://forums.alliedmods.net/showthrea ... 7?t=139447
These users thanked the author konno for the post:
lucaslinux (2 Years Ago)

User avatar
Raheem
Mod Developer
Mod Developer
Egypt
Posts: 2016
Joined: 3 Years Ago
Location: Egypt
Has thanked: 34 times
Been thanked: 117 times
Age: 22
Contact:

#2

Post by Raheem » 2 Years Ago

Here you are:
  • Code: Select all

    #include <zombie_escape>
    
    new g_storm
    new light
    
    public plugin_init() 
    {	
    	register_plugin("[ZE] Extra Item: Infection Storm","1.0","fiendshard")
    	g_storm = ze_register_item("Infection Storm", 15, 0)
    }
    
    public plugin_precache() 
    { 
    	light = precache_model("sprites/lgtning.spr")
    }
    
    public ze_select_item_pre(id, itemid)
    {
        // Return Available and we will block it in Post, So it dosen't affect other plugins
        if (itemid != g_storm)
            return ZE_ITEM_AVAILABLE
       
        // Available for Zombies only, So don't show it for Humans
        if (!ze_is_user_zombie(id))
            return ZE_ITEM_DONT_SHOW
       
        return ZE_ITEM_AVAILABLE
    }
    
    public ze_select_item_post(id, itemid)
    {
        if (itemid != g_storm)
            return
       
    	set_task(0.5,"lightning0",id+1,"",0,"a",60)
    	set_task(1.0,"lightning1",id+2,"",0,"a",60)
    	set_task(1.5,"lightning2",id+3,"",0,"a",60)
    	set_task(2.0,"lightning3",id+4,"",0,"a",60)
    	set_task(2.5,"lightning4",id+5,"",0,"a",60)
    	set_task(3.0,"lightning5",id+6,"",0,"a",60)
    }
    
    public lightning0(id)
    {
    	new xy[2]
    	xy[0] = random_num(-2000,2200)
    	xy[1] = random_num(-2000,2200)
    	message_begin(MSG_BROADCAST,SVC_TEMPENTITY) 
    	write_byte(0) 
    	write_coord(xy[0]) 
    	write_coord(xy[1]) 
    	write_coord(4000) 
    	write_coord(xy[0]) 
    	write_coord(xy[1]) 
    	write_coord(-2000) 
    	write_short(light) 
    	write_byte(1) // framestart 
    	write_byte(5) // framerate 
    	write_byte(2) // life 
    	write_byte(200) // width 
    	write_byte(100) // noise 
    	write_byte(0) // r, g, b 
    	write_byte(255) // r, g, b 
    	write_byte(0) // r, g, b 
    	write_byte(200) // brightness 
    	write_byte(200) //  
    	message_end() 
    	
    	new origin[3];
    	get_user_origin(id, origin, 0)
    	{
    		if((origin[0] = xy[0]) && (origin[1] = xy[1]))
    		ze_set_user_zombie(id)
    	}
    }
    
    public lightning1(id)
    {
    	new xy[2]
    	xy[0] = random_num(-2000,2200)
    	xy[1] = random_num(-2000,2200)
    	message_begin(MSG_BROADCAST,SVC_TEMPENTITY) 
    	write_byte(0) 
    	write_coord(xy[0]) 
    	write_coord(xy[1]) 
    	write_coord(4000) 
    	write_coord(xy[0]) 
    	write_coord(xy[1]) 
    	write_coord(-2000) 
    	write_short(light) 
    	write_byte(1) // framestart 
    	write_byte(5) // framerate 
    	write_byte(2) // life 
    	write_byte(10) // width 
    	write_byte(10) // noise 
    	write_byte(0) // r, g, b 
    	write_byte(255) // r, g, b 
    	write_byte(0) // r, g, b 
    	write_byte(200) // brightness 
    	write_byte(200) //  
    	message_end() 
    	
    	new origin[3];
    	get_user_origin(id, origin)
    	{
    		if((origin[0] = xy[0]) && (origin[1] = xy[1]))
    		ze_set_user_zombie(id)
    	}
    }
    
    public lightning2(id)
    {
    	new xy[2]
    	xy[0] = random_num(-2000,2200)
    	xy[1] = random_num(-2000,2200)
    	message_begin(MSG_BROADCAST,SVC_TEMPENTITY) 
    	write_byte(0) 
    	write_coord(xy[0]) 
    	write_coord(xy[1]) 
    	write_coord(4000) 
    	write_coord(xy[0]) 
    	write_coord(xy[1]) 
    	write_coord(-2000) 
    	write_short(light) 
    	write_byte(1) // framestart 
    	write_byte(5) // framerate 
    	write_byte(2) // life 
    	write_byte(50) // width 
    	write_byte(50) // noise 
    	write_byte(0) // r, g, b 
    	write_byte(255) // r, g, b 
    	write_byte(0) // r, g, b 
    	write_byte(200) // brightness 
    	write_byte(200) //  
    	message_end() 
    	
    	new origin[3];
    	get_user_origin(id, origin)
    	{
    		if((origin[0] = xy[0]) && (origin[1] = xy[1]))
    		ze_set_user_zombie(id)
    	}
    }
    
    public lightning3(id)
    {
    	new xy[2]
    	xy[0] = random_num(-2000,2200)
    	xy[1] = random_num(-2000,2200)
    	message_begin(MSG_BROADCAST,SVC_TEMPENTITY) 
    	write_byte(0) 
    	write_coord(xy[0]) 
    	write_coord(xy[1]) 
    	write_coord(4000) 
    	write_coord(xy[0]) 
    	write_coord(xy[1]) 
    	write_coord(-2000) 
    	write_short(light) 
    	write_byte(1) // framestart 
    	write_byte(5) // framerate 
    	write_byte(2) // life 
    	write_byte(200) // width 
    	write_byte(150) // noise 
    	write_byte(0) // r, g, b 
    	write_byte(255) // r, g, b 
    	write_byte(0) // r, g, b 
    	write_byte(200) // brightness 
    	write_byte(200) //  
    	message_end() 
    	
    	new origin[3];
    	get_user_origin(id, origin)
    	{
    		if((origin[0] = xy[0]) && (origin[1] = xy[1]))
    		ze_set_user_zombie(id)
    	}
    }
    
    public lightning4(id)
    {
    	new xy[2]
    	xy[0] = random_num(-2000,2200)
    	xy[1] = random_num(-2000,2200)
    	message_begin(MSG_BROADCAST,SVC_TEMPENTITY) 
    	write_byte(0) 
    	write_coord(xy[0]) 
    	write_coord(xy[1]) 
    	write_coord(4000) 
    	write_coord(xy[0]) 
    	write_coord(xy[1]) 
    	write_coord(-2000) 
    	write_short(light) 
    	write_byte(1) // framestart 
    	write_byte(5) // framerate 
    	write_byte(2) // life 
    	write_byte(220) // width 
    	write_byte(50) // noise 
    	write_byte(0) // r, g, b 
    	write_byte(255) // r, g, b 
    	write_byte(0) // r, g, b 
    	write_byte(200) // brightness 
    	write_byte(200) //  
    	message_end() 
    	
    	new origin[3];
    	get_user_origin(id, origin)
    	{
    		if((origin[0] = xy[0]) && (origin[1] = xy[1]))
    		ze_set_user_zombie(id)
    	}
    }
    
    public lightning5(id)
    {
    	new xy[2]
    	xy[0] = random_num(-2000,2200)
    	xy[1] = random_num(-2000,2200)
    	message_begin(MSG_BROADCAST,SVC_TEMPENTITY) 
    	write_byte(0) 
    	write_coord(xy[0]) 	// Start X
    	write_coord(xy[1]) 	// Start Y
    	write_coord(4000) 	// Start Z
    	write_coord(xy[0]) 	// End X
    	write_coord(xy[1]) 	// End Y
    	write_coord(-2000) 	// End Z
    	write_short(light) 
    	write_byte(1) // framestart 
    	write_byte(5) // framerate 
    	write_byte(2) // life 
    	write_byte(180) // width 
    	write_byte(70) // noise 
    	write_byte(0) // r, g, b 
    	write_byte(255) // r, g, b 
    	write_byte(0) // r, g, b 
    	write_byte(200) // brightness 
    	write_byte(200) //  
    	message_end() 
    	
    	new origin[3];
    	get_user_origin(id, origin)
    	{
    		if((origin[0] = xy[0]) && (origin[1] = xy[1]))
    		ze_set_user_zombie(id)
    	}	
    }
    
    public ze_user_humanized(id) 
    { 
    	if(task_exists(id+1))
    		remove_task(id+1)
    	if(task_exists(id+2))
    		remove_task(id+2)
    	if(task_exists(id+3))
    		remove_task(id+3)
    	if(task_exists(id+4))
    		remove_task(id+4)
    	if(task_exists(id+5))
    		remove_task(id+5)
    	if(task_exists(id+6))
    		remove_task(id+6)
    }
Screenshot:
  • Image
Loading Raheem's signature, Please wait...
Image

User avatar
konno
Member
Member
Brazil
Posts: 44
Joined: 2 Years Ago
Location: Brazil
Has thanked: 2 times
Been thanked: 1 time
Age: 28
Contact:

#3

Post by konno » 2 Years Ago

presented an error, it is only falling several rays in the same player in a small interval

User avatar
Raheem
Mod Developer
Mod Developer
Egypt
Posts: 2016
Joined: 3 Years Ago
Location: Egypt
Has thanked: 34 times
Been thanked: 117 times
Age: 22
Contact:

#4

Post by Raheem » 2 Years Ago

Hmm, Give me your server ip so i join and see error myself.
Loading Raheem's signature, Please wait...
Image

Post Reply

Who is online

Users browsing this forum: No registered users and 4 guests