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

Subplugin Submission [ZP43|ZP50] Item: New Jetpack & Bazooka.


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
yokomo
Surprise Ascot!
Join Date: May 2010
Location: Malaysia
Old 11-09-2013 , 11:33   [ZP43|ZP50] Item: New Jetpack & Bazooka.
Reply With Quote #1

Some server use amxx module for Jetpack, but it was private, i found a leaked cpp code then i try to convert into pawn.

Features:

Spoiler


Screenshots:


Modules:
#include <hamsandwich>
#include <fakemeta>
#include <engine>

Customization:
Spoiler


Enable/Disable:
Spoiler


Client Commands:
drop_jp -- drop jetpack (available only if you allow drop jetpack).

Changes Log:
Spoiler

Attached Files
File Type: zip new_resource.zip (217.7 KB, 2164 views)
File Type: sma Get Plugin or Get Source (zp_item_jp_bazooka.sma - 3771 views - 18.2 KB)

Last edited by yokomo; 04-04-2015 at 15:06. Reason: Update to version 0.1.2
yokomo is offline
plazma
Senior Member
Join Date: Oct 2013
Old 11-09-2013 , 12:18   Re: [ZP43] New Jetpack & Bazooka
Reply With Quote #2

Good job,
plazma is offline
serjaka
Senior Member
Join Date: Oct 2011
Old 11-11-2013 , 10:07   Re: [ZP43] New Jetpack & Bazooka
Reply With Quote #3

set please Drop "G" and add this code THX!

Code:
stock jp_radius_damage(entity) {
	new id = entity_get_edict(entity,EV_ENT_owner)
	new packs,name[32];
	for(new i = 1; i < 33; i++) {
		if(is_user_alive(i)) {
			new dist = floatround(entity_range(entity,i))
			
			if(dist <= get_pcvar_num(cvar_Dmg_range)) {
				new hp = get_user_health(i)
				new Float:damage = get_pcvar_float(cvar_RocketDmg)-(get_pcvar_float(cvar_RocketDmg)/get_pcvar_float(cvar_Dmg_range))*float(dist)
				
				new Origin[3]
				get_user_origin(i,Origin)
				
				if(zp_get_user_zombie(id) != zp_get_user_zombie(i)) {
						get_user_name(i,name,31);
						if(damage>=800)
							packs = 2;
						else
							packs = 1;
							
						if(hp > damage)
						{
							
							zp_set_user_ammo_packs ( id, zp_get_user_ammo_packs ( id ) + packs );
							jp_take_damage(i,floatround(damage),Origin,DMG_BLAST)
							ColorChat(id,RED,"^x04[Zp]^x03 Damage to ^x04%s^x03 :: ^x04%i^x03 Damage !!", name, floatround(damage));

						}
						else
						{
							log_kill(id,i,"Jetpack Rocket",0)
							//zp_set_user_ammo_packs ( id, zp_get_user_ammo_packs ( id ) + 5 );
							ColorChat(id,RED,"^x04[Zp]^x03 You killed ^x03 %s^x01 with Bazooka ", name);
						}
					}
			}
		}
	}
}

Last edited by serjaka; 11-11-2013 at 10:11.
serjaka is offline
yokomo
Surprise Ascot!
Join Date: May 2010
Location: Malaysia
Old 11-11-2013 , 10:29   Re: [ZP43] New Jetpack & Bazooka
Reply With Quote #4

Quote:
Originally Posted by serjaka View Post
set please Drop "G" and add this code THX!

Code:
stock jp_radius_damage(entity) {
	new id = entity_get_edict(entity,EV_ENT_owner)
	new packs,name[32];
	for(new i = 1; i < 33; i++) {
		if(is_user_alive(i)) {
			new dist = floatround(entity_range(entity,i))
			
			if(dist <= get_pcvar_num(cvar_Dmg_range)) {
				new hp = get_user_health(i)
				new Float:damage = get_pcvar_float(cvar_RocketDmg)-(get_pcvar_float(cvar_RocketDmg)/get_pcvar_float(cvar_Dmg_range))*float(dist)
				
				new Origin[3]
				get_user_origin(i,Origin)
				
				if(zp_get_user_zombie(id) != zp_get_user_zombie(i)) {
						get_user_name(i,name,31);
						if(damage>=800)
							packs = 2;
						else
							packs = 1;
							
						if(hp > damage)
						{
							
							zp_set_user_ammo_packs ( id, zp_get_user_ammo_packs ( id ) + packs );
							jp_take_damage(i,floatround(damage),Origin,DMG_BLAST)
							ColorChat(id,RED,"^x04[Zp]^x03 Damage to ^x04%s^x03 :: ^x04%i^x03 Damage !!", name, floatround(damage));

						}
						else
						{
							log_kill(id,i,"Jetpack Rocket",0)
							//zp_set_user_ammo_packs ( id, zp_get_user_ammo_packs ( id ) + 5 );
							ColorChat(id,RED,"^x04[Zp]^x03 You killed ^x03 %s^x01 with Bazooka ", name);
						}
					}
			}
		}
	}
}
Sorry i wont use your code, it not efficient.
__________________
Team-MMG CS1.6 Servers:
✅ MultiMod -- 103.179.44.152:27016
✅ Zombie Plague -- 103.179.44.152:27015
✅ Zombie Escape -- 103.179.44.152:27017
✅ Klassik Kombat -- 103.179.44.152:27018
✅ Boss-Battle -- 103.179.44.152:27019
yokomo is offline
serjaka
Senior Member
Join Date: Oct 2011
Old 11-11-2013 , 10:31   Re: [ZP43] New Jetpack & Bazooka
Reply With Quote #5

please if you can help me , to show damage in printchat

like this :
Code:
ColorChat(id,RED,"^x04[Zp]^x03 Damage to ^x04%s^x03 :: ^x04%i^x03 Damage !!", name, floatround(damage));

Last edited by serjaka; 11-11-2013 at 10:39.
serjaka is offline
yokomo
Surprise Ascot!
Join Date: May 2010
Location: Malaysia
Old 11-11-2013 , 10:37   Re: [ZP43] New Jetpack & Bazooka
Reply With Quote #6

Quote:
Originally Posted by serjaka View Post
please if you can help me , to show damage in printchat

like this :
Code:
ColorChat(id,RED,"^x04[Zp]^x03 Damage to ^x04%s^x03 :: ^x04%i^x03 Damage !!", name, floatround(damage));
Open the .sma file search for this:
PHP Code:
                    if(damage 0.0)
                    {
                        
ExecuteHamB(Ham_TakeDamagevictimentattackerdamageDMG_BULLET)
                        
//client_print(attacker, print_chat, "[JpDebug] Rocket damage: %.1f", damage)
                    

remove the //, why need to show damage? this will spam client chat in server and can cause overflow because of colorchat. Do yourself, i won't add this feature in my plugin.
__________________
Team-MMG CS1.6 Servers:
✅ MultiMod -- 103.179.44.152:27016
✅ Zombie Plague -- 103.179.44.152:27015
✅ Zombie Escape -- 103.179.44.152:27017
✅ Klassik Kombat -- 103.179.44.152:27018
✅ Boss-Battle -- 103.179.44.152:27019
yokomo is offline
serjaka
Senior Member
Join Date: Oct 2011
Old 11-11-2013 , 10:39   Re: [ZP43] New Jetpack & Bazooka
Reply With Quote #7

but how to activate Drop JetPack un button 'G'?
and how to add
Code:
 Damage to [player name] , Damage to [player name2].....
thx for helping man

Last edited by serjaka; 11-11-2013 at 11:03.
serjaka is offline
yokomo
Surprise Ascot!
Join Date: May 2010
Location: Malaysia
Old 11-11-2013 , 14:08   Re: [ZP43] New Jetpack & Bazooka
Reply With Quote #8

Quote:
Originally Posted by serjaka View Post
but how to activate Drop JetPack un button 'G'?
and how to add
Code:
 Damage to [player name] , Damage to [player name2].....
thx for helping man
You want to spam JetPack in server right? that is bad idea. If people want your JetPack then they must infect/kill you, so JetPack will be dropped.

So i won't add any useless function anymore.
__________________
Team-MMG CS1.6 Servers:
✅ MultiMod -- 103.179.44.152:27016
✅ Zombie Plague -- 103.179.44.152:27015
✅ Zombie Escape -- 103.179.44.152:27017
✅ Klassik Kombat -- 103.179.44.152:27018
✅ Boss-Battle -- 103.179.44.152:27019
yokomo is offline
serjaka
Senior Member
Join Date: Oct 2011
Old 11-11-2013 , 14:24   Re: [ZP43] New Jetpack & Bazooka
Reply With Quote #9

bro 1 more thing , how to add static name[32] , to work correctly? thx!

and when you have weapon in hands , you can't fly or shoot with roket

Last edited by serjaka; 11-11-2013 at 14:34.
serjaka is offline
DonKisgot
Senior Member
Join Date: Dec 2010
Old 11-11-2013 , 17:38   Re: [ZP43] New Jetpack & Bazooka
Reply With Quote #10

Quote:
Originally Posted by yokomo View Post
Hi, i've done modifying an original Jetpack plugin by Bad_Bud. Now it only work with ZP.

Different from original plugin:
Code:
- No cs team check.
- Auto earn ammopack for attacker.
- I see many people want EF_LIGHT on rocket entity so this plugin add it.
- Use interval to draw sprites and playing sound so it will decrease lag both server/client side.
- Has an option to fully disable flame trail and ring effect.
- Many code has been deleted.
Modules:
Code:
#include <fakemeta>
#include <hamsandwich>
Cvars:
Code:
jp_maxfuel - Max fuel in Jetpack.
jp_radius - Rocket explosion radius.
jp_damage - Rocket damage.
jp_speed - Jetpack flying speed.
jp_cooldown - Rocket cooldown.
jp_regen - Fuel regen rate. 
jp_rocket_speed - Rocket flying speed.
Screenshots:



How to disable flame effect?
Code:
//Uncomment this to draw flame effect
//#define DrawFlame
How to disable ring effect?
Code:
//Uncomment this to draw ring effect
//#define DrawRing
yokomo I really appritiated (dunno if ı wrote it correct srry ) your reworks! Your corrections really make servers more playable (less lag , loss & problems).

Can I suggest you something? Just making ammopack reward with a cvar instead of "AUTO" ? Because in my server zombies have +10.000 Health so ı have to make jetpacks bazooka damage Higher but ı don't want humans get more ammo pack because of damage.

So please can you bound it to a cvar value please ? Thanks anyway. Also waiting your rework for THİS PLUGİN Also
DonKisgot 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 10:11.


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