Gloante care explodeaza

Categoria cu cereri de pluginuri si nu numai.

Moderators: Moderatori ajutatori, Moderatori, Echipa eXtreamCS.com

Forum rules
Accesează link-ul pentru a putea vedea regulile forumului

Daca doriti sa vi se modifice un plugin, va rugam postati aici .
Post Reply
User avatar
last.bllu3
Membru, skill +1
Membru, skill +1
Posts: 121
Joined: 30 Jul 2010, 18:32
Detinator Steam: Nu
CS Status: Citesc forumul eXtreamCS.com!
Has thanked: 19 times
Contact:

31 Aug 2010, 14:08

Salut am vazut pe un server un plugin care facea urmatorul lucru:D
cand cineva tragea in perete in er undeva , la impact ii exploda ca niste ertificii dinacelea mici ... am mai laut de la altii dar nu era bun nu functiona sau in alt caz nu era ce vroiam eu :D
cine ma poate ajuta are un +Multumesc :D:D

Multumeste Anticipat
Image - [ HNS Clasic]
Image - [ HNS Clasic]
RoyalServer
User avatar
Remusf
Fost moderator
Fost moderator
Posts: 1928
Joined: 31 Aug 2010, 12:32
Detinator Steam: Da
CS Status: retras
SteamID: STEAM_0:0:6903143
Reputatie: Fost Moderator
Castigator Cupa eXtreamCS 2vs2
Fost Membru Club (2 luni)
0.6/3
Location: Baia Mare
Has thanked: 9 times
Been thanked: 119 times

31 Aug 2010, 14:32

Voucher reducere PC Garage : 5HYDA9ZJ
Inchid pleoapele când ceilalți se-nchină,că mă dor ochii,de la prea multă lumină
Poate că-s vinovat ce vrea să scape de vină sau,poate că-s obosit de la atâta rutină

ImageRMS1708's Channel
User avatar
last.bllu3
Membru, skill +1
Membru, skill +1
Posts: 121
Joined: 30 Jul 2010, 18:32
Detinator Steam: Nu
CS Status: Citesc forumul eXtreamCS.com!
Has thanked: 19 times
Contact:

31 Aug 2010, 14:36

ALA are si RESPAWN eu am nevoie doar sa imi expodeze gloantele !
Image - [ HNS Clasic]
Image - [ HNS Clasic]
User avatar
b[L]u
Membru, skill +1
Membru, skill +1
Posts: 314
Joined: 31 May 2010, 14:27
Detinator Steam: Nu
Has thanked: 26 times
Been thanked: 8 times

31 Aug 2010, 16:44

uite aici :P sa-mi lasi post daca merge
| Afiseaza codul
[code]/*
==========================================================================================
*** Exploding bullets ***
author:		Nightscream
msn:		[email protected]
		
Version:	1.3
==========================================================================================
Credits:	AssKicR( for making greenarrow i used some stuff from there )
		Kleenex( for fixing some stuff )
		Xavior( adding the BLOCK_SET & BLOCK_NOT deathmessage)
		Tupla( for the idea )
		Herbster ( telled me the invisible bug)
==========================================================================================
### how to use ###
admin with level A types amx_bullets and everyone gets exploding bullets for a scout
==========================================================================================
### Cvars ###
exploding_bullets <number> here you can set how much exploding bullets everyone gets
sv_sprites	0	now there will be no exploding or tracer sprites
		1	now there will be exploding or tracer sprites (default)
==========================================================================================
### Modules ###
Engine required
Fun required
==========================================================================================
### Tested On ###
Listen server | Condition zero | Windows XP | AMXX 1.1
Dedicated server | Counter-Strike 1.6 | Windows XP | AMXX 1.1
==========================================================================================
### Suggestions ###
Got some suggestions
post them in the topic or in pm me
==========================================================================================
### Changelog ###
1.0 Release
1.1 Fixed invisible bug
1.2 You get a frag when you kill someone & sprite disable cvar
1.3 Fixed some minor stuff
*/

#include <amxmodx>
#include <amxmisc>
#include <engine>
#include <fun>

#define PLUGINNAME	"Exploding Bullets"
#define VERSION		"1.3"
#define AUTHOR		"Nightscream"

new bool:has_explbullets = false
new LastWeapon[33] = 0
new LastClipCount[33] = 0
new lastammo[33] 
new lastweapon[33]

new bulletsfired[33]

new spr_laser 
new spr_laser_impact 
new spr_blast_shroom 

public plugin_init() {
	register_plugin( PLUGINNAME, VERSION, AUTHOR )
	register_concmd( "amx_bullets", "bullets_on", ADMIN_LEVEL_A, "Everyone gets exlpoding bullets" )
	register_concmd( "amx_unbullets", "unbullets", ADMIN_LEVEL_A, "nobody has exploding bullets" )
	
	register_event( "CurWeapon", "changeweapon", "be", "1=1" )
	register_event( "Damage", "EventDamage", "be" )
	register_logevent( "event_roundend", 2, "0=World triggered", "1=Round_End" )
	register_event( "CurWeapon", "make_tracer", "be", "1=1", "3>0" ) 
	
	register_cvar( "exploding_bullets", "10" )
	register_cvar( "sv_sprites", "1" )
}

public plugin_precache() {
	
	if ( get_cvar_num( "sv_sprites") == 1 ) {
		
		spr_laser = precache_model( "sprites/laserbeam.spr" ) 
		spr_laser_impact = precache_model( "sprites/zerogxplode.spr" ) 
		spr_blast_shroom = precache_model( "sprites/mushroom.spr" )
	}
	
	return PLUGIN_CONTINUE
}
public plugin_modules() {
	require_module( "Engine" )
	require_module( "Fun" )
}

public event_roundend(id) {
	if ( has_explbullets == true ) {
		new message [200]
		format( message, 199, "You have lost your exploding bullets" )
		set_hudmessage( 255, 0, 0, 0.35, 0.5, 0, 5.0, 5.0, 0.1, 0.2, 350 )
		show_hudmessage( id, message )
		bulletsfired[id] = 0
		LastWeapon[id]= -1
		has_explbullets = false
	}
	
	return PLUGIN_HANDLED
}

public unbullets( id, level, cid ) {
	if ( !cmd_access( id, level, cid, 1 ) && !is_user_alive( id ) ) {
		return PLUGIN_HANDLED
	}
	has_explbullets = false
	new message[200]
	format( message, 199, "The ADMIN has taken your exploding bullets away" )
	set_hudmessage( 255, 0, 0, 0.35, 0.5, 0, 5.0, 5.0, 0.1, 0.2, 350 )
	show_hudmessage( id, message )
	
	return PLUGIN_HANDLED
}

public bullets_on( id, level, cid ) {
	if ( !cmd_access( id, level, cid, 1 ) ) {
		return PLUGIN_HANDLED
	}
	if( !is_user_alive( id ) ) return PLUGIN_HANDLED
	
	new clip, ammo, wpnid = get_user_weapon( id, clip, ammo )
	
	if ( wpnid != CSW_SCOUT ) {
		new message1[200]
		format( message1, 199, "You need a scout to use it" )
		set_hudmessage( 255, 0, 0, 0.35, 0.5, 0, 5.0, 5.0, 0.1, 0.2, 350 )
		show_hudmessage( id, message1 )

	}

	has_explbullets = true
	bulletsfired[id] = 0
	new message2[200]	
	new bullets = ( get_cvar_num ( "exploding_bullets" ) )
	format( message2, 199, "The Admin has given you %d explosion bullets", bullets )
	set_hudmessage( 255, 0, 0, 0.35, 0.5, 0, 5.0, 5.0, 0.1, 0.2, 350 )
	show_hudmessage( id, message2 )
	
	return PLUGIN_HANDLED
}

public make_tracer(id) {
	
	new weap = read_data(2)
	new ammo = read_data(3)
	
	if ( weap == CSW_SCOUT && is_user_alive(id) && has_explbullets == true ) {
		
		if ( lastweapon[id] == 0 ) lastweapon[id] = weap 
		
		if ( get_cvar_num( "sv_sprites") == 1 ) {
			
			if ( ( lastammo[id] > ammo ) && ( lastweapon[id] == weap ) ) { 
				new vector1[3], vector2[3]
				get_user_origin( id, vector1, 1 )
				get_user_origin( id, vector2, 4 )
			
				// tracer beam 
				message_begin( MSG_PAS, SVC_TEMPENTITY, vector1 ) 
				write_byte( 0 )			// TE_BEAMPOINTS 
				write_coord( vector1[0] ) 
				write_coord( vector1[1] ) 
				write_coord( vector1[2] ) 
				write_coord( vector2[0] ) 
				write_coord( vector2[1] ) 
				write_coord( vector2[2] ) 
				write_short( spr_laser )	// laserbeam sprite 
				write_byte( 0 )			// starting frame 
				write_byte( 10 )		// frame rate 
				write_byte( 2 )			// life in 0.1s 
				write_byte( 4 )			// line width in 0.1u 
				write_byte( 1 )			// noise in 0.1u 
				write_byte( 0 )			// red
				write_byte( 153 )		// green 
				write_byte( 0 )			// blue
				write_byte( 80 )		// brightness 
				write_byte( 100 )		// scroll speed 
				message_end() 
			
				// bullet impact explosion 
				message_begin( MSG_PAS, SVC_TEMPENTITY, vector2 ) 
				write_byte( 3 )			// TE_EXPLOSION 
				write_coord( vector2[0] )	// end point of beam 
				write_coord( vector2[1] ) 
				write_coord( vector2[2] ) 
				write_short( spr_laser_impact )	// blast sprite 
				write_byte( 10 )		// scale in 0.1u 
				write_byte( 30 )			// frame rate 
				write_byte( 8 )			// TE_EXPLFLAG_NOPARTICLES 
				message_end()			// ..unless i'm mistaken, noparticles helps avoid a crash 
			}
		}
		
		lastammo[id] = ammo 
		lastweapon[id] = weap 
		
		return PLUGIN_CONTINUE 
	}
	return PLUGIN_CONTINUE 
}	

public changeweapon(id) {
	
	new weap = read_data(2)
	new ammo = read_data(3)
	
	if ( has_explbullets == true && is_user_alive( id ) && weap == CSW_SCOUT ) {
		if ( ammo >= LastClipCount[id] ) {
			LastClipCount[id]=ammo
			return PLUGIN_CONTINUE
		}
		LastClipCount[id] = ammo
		weap = LastWeapon[id]
		
		bulletsfired[id] = ( bulletsfired[id]+1 )
		new bullets = ( get_cvar_num ( "exploding_bullets" ) - bulletsfired[id] )
		if ( bullets == 0 ) {
			new message[200]	
			format( message, 199, "You have 0 bullets left" )
			set_hudmessage( 255, 0, 0, 0.35, 0.5, 0, 5.0, 5.0, 0.1, 0.2, 147 )
			show_hudmessage( id, message )
			has_explbullets = false
			} else {
			new message[200]	
			format( message, 199, "You have %d exploding bullets left", bullets )
			set_hudmessage( 255, 0, 0, 0.35, 0.5, 0, 5.0, 5.0, 0.1, 0.2, 147 )
			show_hudmessage( id, message )
		}
	}
	return PLUGIN_CONTINUE
}



public EventDamage(id) {
	new weapon, bodypart, attacker_id = get_user_attacker( id, weapon, bodypart )
	if( !is_user_alive( attacker_id ) ) return PLUGIN_CONTINUE
	if ( get_cvar_num ( "exploding_bullets" ) < 0 )	return PLUGIN_CONTINUE
		
	new damage = read_data(2)
	
	if (get_cvar_num( "sv_sprites") == 1 ) {
	
		if( has_explbullets == true && weapon == CSW_SCOUT ) {
		
			new health = get_user_health( id )
		
			if (!is_user_connected( attacker_id ) ) return PLUGIN_CONTINUE 
			if ( attacker_id == id ) return PLUGIN_CONTINUE
			if ( ( ( 1.0 * damage ) / ( 1.0 * (health + damage ) ) ) < 0.01 ) return PLUGIN_CONTINUE 
			
			new origin[3]
		
			get_user_origin( id, origin ) 
		
			set_user_rendering( id, kRenderFxFadeSlow, 255, 255, 255, kRenderTransColor, 250 ); 
		
			message_begin( MSG_ALL, SVC_TEMPENTITY ) 
			write_byte( 3 )				// TE_EXPLOSION 
			write_coord( origin[0] ) 
			write_coord( origin[1] ) 
			write_coord( origin[2]-22 ) 
			write_short( spr_blast_shroom )		// mushroom cloud 
			write_byte( 40 )			// scale in 0.1u 
			write_byte( 12 )			// frame rate 
			write_byte( 12 )			// TE_EXPLFLAG_NOPARTICLES & TE_EXPLFLAG_NOSOUND 
			message_end() 
		
			message_begin( MSG_ALL, SVC_TEMPENTITY ) 
			write_byte( 10 )			// TE_LAVASPLASH 
			write_coord( origin[0] ) 
			write_coord( origin[1] ) 
			write_coord( origin[2]-26 ) 
			message_end()
			}
		}
		
	if( has_explbullets == true && weapon == CSW_SCOUT ) {
		set_msg_block(get_user_msgid("DeathMsg"), BLOCK_SET)
		user_kill(id, 1)
		
		set_msg_block(get_user_msgid("DeathMsg"), BLOCK_NOT)
		
		message_begin( MSG_ALL, get_user_msgid( "DeathMsg" ),{ 0,0,0 },0 )
		write_byte( attacker_id )
		write_byte( id )
		write_byte( 0 )
		write_string( "scout" )
		message_end()
	}
	
	//new deaths = get_user_deaths( id );
	//set_user_deaths( id, deaths+1 )
		
	return PLUGIN_HANDLED
}
/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang2067\\ f0\\ fs16 \n\\ par }
*/
[/code]
Last edited by Ciprian on 31 Aug 2010, 16:48, edited 1 time in total.
Reason: Foloseste sursa in loc de code/quote pt. texte lungi.
Nick: MiSteR D
Image
User avatar
last.bllu3
Membru, skill +1
Membru, skill +1
Posts: 121
Joined: 30 Jul 2010, 18:32
Detinator Steam: Nu
CS Status: Citesc forumul eXtreamCS.com!
Has thanked: 19 times
Contact:

31 Aug 2010, 17:08

Pei eu trebuie s astiu sigur daca merge pentru ca e picat GAmeCp de la firma si daca nu e bun nu o sa mai pot porni serverul ..
Image - [ HNS Clasic]
Image - [ HNS Clasic]
User avatar
Ciprian
Fost administrator
Fost administrator
Posts: 5172
Joined: 10 May 2008, 21:29
Detinator Steam: Da
CS Status: ^^
SteamID: crazycipry
Reputatie: Fost administrator
Fost Scripter eXtreamCS
Fost Supervizor CS.eXtreamCS.com
Fost Unbanner ZM.eXtreamCS.com
Fost Contribuitor
Nume anterior: crazy.cipry
Location: Baia Mare
Has thanked: 177 times
Been thanked: 405 times

01 Sep 2010, 14:10

| Afiseaza codul
[code=php]/*
*    Weapon Sprites by Vet(3TT3V)
*    For DOD 1.3
*
*    This plugin will create an explosion sprite for grenades, mortars and rockets.
*        It will render the explosion sprite even if cl_particlefx is off.
*
*    It will also create a sparks sprite when a player's melee weapon strikes an object.
*
*    It works by hooking the creation of a world or entity decal and creates a sprite at
*        the same location. So server/client decal settings MAY affect renderability.
*
*    CVar (Optional - Will default to Enable)
*        weaponsprites_enable <0|1>    // plugin enable/disable (Default = 1 <enable>)
*/

#include <amxmodx>
#include <fakemeta>

#define PLUGIN "DOD_WeaponSprites"
#define VERSION "1.2"
#define AUTHOR "Vet(3TT3V)"
#define SVARIABLE "DOD_WeaponSprites"
#define SVALUE "v1.2 by Vet(3TT3V)"

new g_enabled
new g_spriteID

public plugin_precache()
{
    g_spriteID = engfunc(EngFunc_PrecacheModel, "sprites/grenade_flash.spr")
}

public plugin_init()
{
    register_plugin(PLUGIN, VERSION, AUTHOR)
    register_cvar(SVARIABLE, SVALUE, FCVAR_SERVER|FCVAR_SPONLY)

    //tempentity event - decal applied to world or entity
    register_event("23", "weapon_sprite", "a", "1=116", "1=104")

    g_enabled = register_cvar("weaponsprites_enable","1")
}

public weapon_sprite()
{
    static Float:origin[3]
    if (!get_pcvar_num(g_enabled))
        return

    switch (read_data(5)) {
        case 60, 61: {        // is decal scorch1 or 2?
            read_data(2, origin[0])
            read_data(3, origin[1])
            read_data(4, origin[2])
            message_begin(MSG_BROADCAST,SVC_TEMPENTITY)
            write_byte(TE_EXPLOSION)
            write_coord(floatround(origin[0]))
            write_coord(floatround(origin[1]))
            write_coord(floatround(origin[2]))
            write_short(g_spriteID)
            write_byte(10)
            write_byte(30)
            write_byte(4)
            message_end()
        }
        case 54..58: {        // is decal shot1-5?
            read_data(2, origin[0])
            read_data(3, origin[1])
            read_data(4, origin[2])
            message_begin(MSG_BROADCAST,SVC_TEMPENTITY)
            write_byte(TE_SPARKS)
            write_coord(floatround(origin[0]))
            write_coord(floatround(origin[1]))
            write_coord(floatround(origin[2]))
            message_end()
        }
        default: {
            return
        }
    }    
}
 [/code]
User avatar
b[L]u
Membru, skill +1
Membru, skill +1
Posts: 314
Joined: 31 May 2010, 14:27
Detinator Steam: Nu
Has thanked: 26 times
Been thanked: 8 times

01 Sep 2010, 15:10

da o err la server ne trebuie spr grenade_flash.spr :P daca il ai dani l si noua :)
Nick: MiSteR D
Image
User avatar
Ciprian
Fost administrator
Fost administrator
Posts: 5172
Joined: 10 May 2008, 21:29
Detinator Steam: Da
CS Status: ^^
SteamID: crazycipry
Reputatie: Fost administrator
Fost Scripter eXtreamCS
Fost Supervizor CS.eXtreamCS.com
Fost Unbanner ZM.eXtreamCS.com
Fost Contribuitor
Nume anterior: crazy.cipry
Location: Baia Mare
Has thanked: 177 times
Been thanked: 405 times

01 Sep 2010, 15:55

Pai sprite-ul il cauti pe fpsbanana si-l alegi pe cel care-ti place :)
User avatar
b[L]u
Membru, skill +1
Membru, skill +1
Posts: 314
Joined: 31 May 2010, 14:27
Detinator Steam: Nu
Has thanked: 26 times
Been thanked: 8 times

01 Sep 2010, 18:29

ciprian am o intrebare gloantele explodeaza la contactul cu peretele sau cu oameni?
Nick: MiSteR D
Image
User avatar
Ciprian
Fost administrator
Fost administrator
Posts: 5172
Joined: 10 May 2008, 21:29
Detinator Steam: Da
CS Status: ^^
SteamID: crazycipry
Reputatie: Fost administrator
Fost Scripter eXtreamCS
Fost Supervizor CS.eXtreamCS.com
Fost Unbanner ZM.eXtreamCS.com
Fost Contribuitor
Nume anterior: crazy.cipry
Location: Baia Mare
Has thanked: 177 times
Been thanked: 405 times

01 Sep 2010, 19:16

b[L]u wrote:ciprian am o intrebare gloantele explodeaza la contactul cu peretele sau cu oameni?
La contactul cu peretii si pamantul cred :-?
User avatar
b[L]u
Membru, skill +1
Membru, skill +1
Posts: 314
Joined: 31 May 2010, 14:27
Detinator Steam: Nu
Has thanked: 26 times
Been thanked: 8 times

01 Sep 2010, 19:18

pai am o nelamurire l-am bagat pe sv si nu se intampla nmk cand trag in pereti ,pamant etc.. :-?
Nick: MiSteR D
Image
User avatar
Ciprian
Fost administrator
Fost administrator
Posts: 5172
Joined: 10 May 2008, 21:29
Detinator Steam: Da
CS Status: ^^
SteamID: crazycipry
Reputatie: Fost administrator
Fost Scripter eXtreamCS
Fost Supervizor CS.eXtreamCS.com
Fost Unbanner ZM.eXtreamCS.com
Fost Contribuitor
Nume anterior: crazy.cipry
Location: Baia Mare
Has thanked: 177 times
Been thanked: 405 times

01 Sep 2010, 19:23

b[L]u wrote:pai am o nelamurire l-am bagat pe server si nu se intampla nmk cand trag in pereti ,pamant etc.. :-?
Ooops ^^ My Fault.
Face efecte numai pentru grenada si cutit parca :-?
Post Reply

Return to “Cereri”

  • Information