Cerere plugin arma personalizata

Categoria cu cereri de pluginuri si nu numai.

Moderators: Moderatori ajutatori, Moderatori

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
MaRyuS33
Membru, skill +1
Membru, skill +1
Posts: 222
Joined: 27 Feb 2014, 19:52
Detinator Steam: Da
CS Status: Acasă
Detinator server CS: BB.Freakz.Ro
Been thanked: 2 times
Contact:

22 Jun 2014, 11:23

Descriere plugin cerut: Vreaun un plugin cu care sa pot pune pe un nume o arma privata, doar pentru el si acesta sa o poata lua printr.o comanda "/arma" gratis.
Alte informatii: Eu o sa.i pun modelele care le vrea respectivul! Si voila ... va avea o arma personalizata doar pentru el. :)
eXtreamSHOP
User avatar
w3zoo_RedX
Membru, skill +2
Membru, skill +2
Posts: 792
Joined: 21 Dec 2013, 22:16
Detinator Steam: Da
CS Status: Scripter CS.
Detinator server CS: PM.
SteamID: PM.
Location: Bucuresti sector 2
Has thanked: 46 times
Been thanked: 49 times
Contact:

22 Jun 2014, 12:24

fi mai explicit Da-mi add stefi_stefanutz11
User avatar
MaRyuS33
Membru, skill +1
Membru, skill +1
Posts: 222
Joined: 27 Feb 2014, 19:52
Detinator Steam: Da
CS Status: Acasă
Detinator server CS: BB.Freakz.Ro
Been thanked: 2 times
Contact:

22 Jun 2014, 14:35

cat de explicit? :| ..... vreaun un plugin care sa creeze o arma privata pe un nume...doar cel cu numele ala sa o poata lua cu o comanda pe care o pun eu ... Exemplu: cum e ethereal..are pluginul ei si se ia printr.o comanda.....eu vreau la fel numai ca sa poata fie luata numai de cel cu nickul setat in plugin...si eu o sa vand o astfel de arma pe serverul meu....celor care vor sa fie mai speciali...
mezzzu
Membru eXtream
Membru eXtream
Posts: 2452
Joined: 19 Dec 2010, 17:31
Detinator Steam: Da
CS Status: Working...
Reputatie: Utilizator neserios (tepar)
Fost manager FURIEN.EXTREAMCS.COM
Restrictie moderator
Has thanked: 86 times
Been thanked: 143 times

22 Jun 2014, 14:43

Atunci sari si tu cu niste $$$ daca vrei ca acea arma sa o "vinzi" mai departe la copii pe serverul tau pentru niste bani ;) cine crezi ca-ti baga tie bani in buzunar degeaba?
User avatar
MaRyuS33
Membru, skill +1
Membru, skill +1
Posts: 222
Joined: 27 Feb 2014, 19:52
Detinator Steam: Da
CS Status: Acasă
Detinator server CS: BB.Freakz.Ro
Been thanked: 2 times
Contact:

22 Jun 2014, 14:48

eu v.am cerut ajutorul...daca vreti sa ma ajutati...ajutati.ma...daca nu....inchideti cererea si gata... :|...si daca te uitai vedeai ca am dat doar un exemplu...nu neaparat sa o vand...
User avatar
HamletEagle
Scripter eXtreamCS
Scripter eXtreamCS
Posts: 751
Joined: 21 Sep 2013, 14:05
Detinator Steam: Da
CS Status: Inactiv cateva zile.
SteamID: privat
Reputatie: Scripter eXtreamCS.com
Fost Moderator ajutator
Has thanked: 20 times
Been thanked: 85 times

23 Jun 2014, 16:11

MaRyuS33 wrote:eu v.am cerut ajutorul...daca vreti sa ma ajutati...ajutati.ma...daca nu....inchideti cererea si gata... :|...si daca te uitai vedeai ca am dat doar un exemplu...nu neaparat sa o vand...
Aha,nu vei vinde. Nesimitire curata, vrei ajutor free si tu sa iei bani.
Uite totusi,poate te ajuta asta..
| Afiseaza codul
Ai vrea tu.....
Daca vreti ajutorul meu, nu dati bump la topic, fara intrebari de genu "cat mai dureaza/mai astept mult?".
User avatar
MaRyuS33
Membru, skill +1
Membru, skill +1
Posts: 222
Joined: 27 Feb 2014, 19:52
Detinator Steam: Da
CS Status: Acasă
Detinator server CS: BB.Freakz.Ro
Been thanked: 2 times
Contact:

23 Jun 2014, 20:03

uii...ce dragut estii... Multumeeesc... :* :X
stephano141
Membru, skill +1
Membru, skill +1
Posts: 154
Joined: 11 Apr 2014, 15:40
Detinator Steam: Nu
CS Status: Citesc forumul eXtreamCS.com...!
Contact:

05 Jul 2014, 12:18

Pustiu cauta / cere plugin arme VIP daca vrei cv de genu ;)
Daca te-am ajutat ai un buton in stanga jos pe care scrie Multumesc! :P apasa-l cu incredere ;))
User avatar
L E V I N
Scripter eXtreamCS
Scripter eXtreamCS
Posts: 2308
Joined: 24 Aug 2011, 11:24
Detinator Steam: Da
CS Status:
Detinator server CS: ☯∴
SteamID: riseofevo
Reputatie: Scripter eXtreamCS
Nume anterior: Adryyy
Location: ҳ̸Ҳ̸ҳ
Has thanked: 33 times
Been thanked: 365 times
Contact:

05 Jul 2014, 13:49

Daca ai fi dat mai multe detalii ti-l terminam eu, dar nu ai precizat mai nimic :-j, ti-am facut un ' echipament prea special ' care are ' deagle personalizat ' daca vrei tu mai adaugi si alte arme , sau scoti deagle , vezi tu...am bagat ce mi-a trecut print minte :-? as fi vrut sa pun si parasuta dar nu am timp, tu nu ai zis deloc cum il vrei..

Te uiti prin el, vezi ce am adaugat, daca mai vrei imi zici, daca vrei sa scot imi zici, daca ai intrebari nu ma intrebi =)) glumesc, ma intrebi ;)
Iar de adaugat mai multe arme gen ak47 T | m4a1 CT | awp CT , T e usor, doar sa imi zici , dar nu stiu cand voi raspunde , ca , sunt cam ocupat..
| Afiseaza codul
#include < amxmodx >
#include < cstrike >
#include < engine >
#include < xs >
#include < fun >
#include < fakemeta >
#include < hamsandwich >

#define FALL_VELOCITY 350.0

new v_model [ 66 ] = "models/v_deaglex.mdl";
new p_model [ 66 ] = "models/p_deaglex.mdl";

new bool: HasWeapon [ 33 ];
new bool: falling [ 33 ];

new g_norecoil [ 33 ];
new Float:cl_pushangle [ 33 ] [ 3 ];

const WEAPONS_BITSUM = (1<<CSW_KNIFE|1<<CSW_HEGRENADE|1<<CSW_FLASHBANG|1<<CSW_SMOKEGRENADE|1<<CSW_C4);

new ON , HP , AP , MONEY , AMMO , GLOW , DAMAGE , SPEED , GRAVITY, NO_FALL_DAMAGE , NO_RECOIL, INFINITE_AMMO , RESPAWN , SKIN;
new uammo , uammot;

public plugin_init ( )
{
	register_plugin ( "Special Weapon/*s*/" , "0.1x" , "eVoLuTiOn" );

	register_clcmd ( "say" , "hookSay" );
	register_clcmd ( "say_team" , "hookSay" );

	ON = register_cvar ( "weapon_enable" , "1" );

	DAMAGE = register_cvar ( "weapon_damage" , "5.3" );
	HP = register_cvar ( "weapon_health", "255" );
	AP = register_cvar ( "weapon_armor" , "400" );
	MONEY = register_cvar ( "weapon_money" , "16000" );
	GLOW = register_cvar ( "weapon_glow" , "1" );
	GRAVITY = register_cvar ( "weapon_gravity" , "500" );
	SPEED = register_cvar ( "weapon_speed", "450.0" );
	AMMO = register_cvar ( "weapon_ammo" , "255" );
	RESPAWN = register_cvar ( "weapon_respawn" , "1" );
	SKIN = register_cvar ( "weapon_skin" , "1" );
	NO_RECOIL = register_cvar ( "weapon_no_recoil" , "1" );
	NO_FALL_DAMAGE = register_cvar ( "weapon_no_fall_damage" , "1" );
	INFINITE_AMMO = register_cvar ( "weapon_infinite_ammo" , "1" );

	// AICI NU UMBLA !
	register_event ( "CurWeapon" , "event_weaponb" , "be" , "1=1" );
	uammo = register_cvar ( "amx_unlimitedammo" , "1" );
	uammot = register_cvar ( "amx_unlimitedammotype" , "0" );
	// ---------------------

	register_event ( "CurWeapon" , "RefreshWeapon" , "be" , "1=1" );
	register_event ( "ResetHUD" , "resetModel" , "b" );

	RegisterHam ( Ham_Spawn , "player" , "ham_PlayerSpawnPre" , true ); // 1
	RegisterHam ( Ham_TakeDamage , "player" , "Player_TakeDamage" );

	if ( !cvar_exists ( "mp_falldamage" ) )
	{
		register_cvar ( "mp_falldamage" , "0" );
	}

	new weapon_name [ 24 ];
	for ( new i = 1; i <= 30; i++ )
	{
		if ( ! ( WEAPONS_BITSUM & 1 << i ) && get_weaponname ( i , weapon_name , 23 ) )
		{
			RegisterHam ( Ham_Weapon_PrimaryAttack , weapon_name , "fw_Weapon_PrimaryAttack_Pre" );
			RegisterHam ( Ham_Weapon_PrimaryAttack , weapon_name , "fw_Weapon_PrimaryAttack_Post" , 1 );
		}
	}
}

public plugin_precache( )
{
	if ( get_pcvar_num ( SKIN ) == 1 )
	{
		precache_model ( "models/player/skin_special/skin_special.mdl" );
	}

	precache_model ( v_model );
	precache_model ( p_model );
}

public client_PreThink ( id )
{
	if ( get_pcvar_num ( NO_FALL_DAMAGE ) == 1 )
	{
		if ( get_cvar_num ( "mp_falldamage" ) == 0 && is_user_alive ( id ) && is_user_connected ( id ) && HasWeapon [ id ])
		{
			if ( entity_get_float ( id , EV_FL_flFallVelocity ) >= FALL_VELOCITY )
			{
				falling [ id ] = true;
			}

			else
			{
				falling [ id ] = false;
			}
		}
	}
}

public client_PostThink ( id )
{
	if ( get_pcvar_num ( NO_FALL_DAMAGE ) == 1 )
	{
		if ( get_cvar_num ( "mp_falldamage" ) == 0 && is_user_alive ( id ) && is_user_connected ( id ) && HasWeapon [ id ] )
		{
			if ( falling [ id ] )
			{
				entity_set_int ( id , EV_INT_watertype , -3 );
			}
		}
	}
}

public resetModel ( id )
{
	if ( is_user_alive ( id ) && HasWeapon [ id ] )
	{
		if ( get_pcvar_num ( SKIN ) == 1 )
		{
			if ( get_user_team ( id ) == 1 )
			{
				cs_set_user_model ( id , "skin_special" );
			}

			else if ( get_user_team ( id ) == 2 )
			{
				cs_set_user_model ( id , "skin_special" );
			}

			else
			{
				cs_reset_user_model ( id );
			}
		}
	}
	return PLUGIN_CONTINUE
}

public client_connect ( id )
{
	HasWeapon [ id ] = false;
	g_norecoil [ id ] = false;
}

public client_disconnect ( id )
{
	HasWeapon [ id ] = false;
	g_norecoil [ id ] = false;
}

public event_weaponb ( id )
{
	if ( get_pcvar_num ( INFINITE_AMMO ) == 1 )
	{
		if ( !get_pcvar_num ( uammo ) || !is_user_connected ( id ) )
		{
			return PLUGIN_HANDLED;
		}

		new iClip , iAmmo , iWeapName [ 32 ]
		new iWeap = get_user_weapon ( id , iClip , iAmmo );

		get_weaponname ( iWeap , iWeapName , 31 );
		new iWeapon = fm_find_ent_by_owner ( -1 , iWeapName , id );

		new weaponID= read_data ( 2 );

		if ( weaponID == CSW_C4 || weaponID == CSW_KNIFE || weaponID == CSW_HEGRENADE || weaponID == CSW_SMOKEGRENADE || weaponID == CSW_FLASHBANG )
		{
			return PLUGIN_HANDLED;
		}

		if ( HasWeapon [ id ] )
		{
   			new ammo = cs_get_weapon_ammo ( iWeapon );

			if ( ammo <= 1 && !get_pcvar_num ( uammot ) )
			{
				cs_set_weapon_ammo ( iWeapon , iAmmo + 100 );
			}
		}
	}

	return PLUGIN_HANDLED
}

stock fm_find_ent_by_owner ( index , const classname [ ] , owner , jghgtype = 0 )
{
	new strtype [ 11 ] = "classname" , ent = index;

	switch ( jghgtype )
	{
		case 1: strtype = "target";

		case 2: strtype = "targetname";
	}

	while ( ( ent = engfunc ( EngFunc_FindEntityByString , ent , strtype , classname ) ) && pev ( ent , pev_owner ) != owner ) {}

	return ent;
}

public ham_PlayerSpawnPre ( id )
{
	if ( is_user_alive ( id ) )
	{
		if ( get_pcvar_num ( RESPAWN ) == 1 )
		{
			HasWeapon [ id ] = true;
			g_norecoil [ id ] = true;
		}
	}
}

public fw_Weapon_PrimaryAttack_Pre ( entity )
{
	if ( get_pcvar_num ( NO_RECOIL ) == 1 )
	{
		new id = pev ( entity , pev_owner );

		if ( g_norecoil [ id ] && HasWeapon [ id ] /*get_user_weapon ( id ) == CSW_DEAGLE*/ )
		{
			pev ( id , pev_punchangle , cl_pushangle [ id ] );

			return HAM_IGNORED;
		}
	}

	return HAM_IGNORED;
}

public fw_Weapon_PrimaryAttack_Post ( entity )
{
	if ( get_pcvar_num ( NO_RECOIL ) == 1 )
	{
		new id = pev ( entity ,  pev_owner );

		if ( g_norecoil [ id ] && HasWeapon [ id ] /*get_user_weapon ( id ) == CSW_DEAGLE*/ )
		{
			new Float: push [ 3 ];

			pev ( id , pev_punchangle , push );
			xs_vec_sub ( push , cl_pushangle [ id ] , push );
			xs_vec_mul_scalar ( push , 0.0 , push );
			xs_vec_add ( push , cl_pushangle [ id ] , push );
			set_pev ( id , pev_punchangle , push );

			return HAM_IGNORED;
		}
	}

	return HAM_IGNORED;
}

public RefreshWeapon ( id )
{
	new szWeapon = get_user_weapon ( id );

	if ( HasWeapon [ id ] && szWeapon == CSW_DEAGLE )
	{
		set_pev ( id , pev_viewmodel2 , v_model );
		set_pev ( id , pev_weaponmodel2 , p_model );
	}

	if ( get_pcvar_num ( ON ) == 1 )
	{
		new Float: Gravity = ( ( HasWeapon [ id ] && szWeapon == CSW_DEAGLE ) ? get_pcvar_float( GRAVITY ) : get_pcvar_float( 800 ) ) / 800
		set_user_gravity( id, Gravity );
	}

	new Float: Speed;

	if ( szWeapon != CSW_DEAGLE || !HasWeapon [ id ] )
	{
		return PLUGIN_CONTINUE;
	}

   	else if ( HasWeapon [ id ] )
	{
		Speed = get_pcvar_float ( SPEED );
		set_user_maxspeed ( id , Speed );
	}

	return PLUGIN_HANDLED;
}

public hookSay( )
{
	new szSaid [ 192 ];
	read_args ( szSaid , sizeof ( szSaid ) -1 );
	remove_quotes ( szSaid );

	if ( containi ( szSaid , "/arma" ) != -1 || containi ( szSaid , "arma" ) != -1 )
	{
		GivePack ( );
	}
}

public GivePack ( )
{
	static iPlayers [ 32 ];
	static iPlayersNum;

	get_players ( iPlayers , iPlayersNum , "ch" );

	if ( !iPlayersNum )
	{
		return 1;
	}

	static id , i;
	for ( i = 0; i < iPlayersNum; i++ )
	{
		id = iPlayers [ i ];

		new name [ 33 ];
		get_user_name ( iPlayers [ i ] , name , 31 );

		if ( ! ( equali ( name , "NICK 1" ) ) /*|| ! ( equali ( name , "NICK 2" ) )*/ )
		{
			xCoLoR ( iPlayers [ i ] , "!nNu ai acces la acest!v echipament!n !" );

			return PLUGIN_HANDLED;
		}

		if ( HasWeapon [ iPlayers [ i ] ] )
		{
			xCoLoR ( iPlayers [ i ] , "!nDeja detii echipament!v Special!n !" );

			return PLUGIN_HANDLED;
		}

		HasWeapon [ iPlayers [ i ] ] = true;

		if ( get_pcvar_num ( ON ) == 1 )
		{
			set_user_armor ( iPlayers [ i ] , get_user_armor ( iPlayers [ i ] ) + get_pcvar_num ( AP ) ); // doar set
			set_user_health ( iPlayers [ i ] , get_user_health ( iPlayers [ i ] ) + get_pcvar_num ( HP ) ); // ---
			cs_set_user_money ( iPlayers [ i ] , cs_get_user_money ( iPlayers [ i ] ) + get_pcvar_num ( MONEY ) ); // ---

			if ( get_pcvar_num ( GLOW ) == 1 )
			{
				set_user_rendering ( iPlayers [ i ] , kRenderFxGlowShell , 255 , 255 , 0 , kRenderNormal , 25 );
			}
		}

		give_item ( iPlayers [ i ] , "weapon_deagle" );
		cs_set_user_bpammo ( iPlayers [ i ] , CSW_DEAGLE , get_pcvar_num ( AMMO ) );

		RefreshWeapon ( iPlayers [ i ] );

		set_task ( 0.1 , "Player_TakeDamage" , iPlayers [ i ] );

		g_norecoil [ iPlayers [ i ] ] = true;

		xCoLoR ( 0 , "!nJucatorul!v %s!n a primit un!e Echipament Special!n !", name );
	}

	return PLUGIN_HANDLED;
}

public Player_TakeDamage ( iVictim , iInflictor , iAttacker , Float:fDamage )
{
	if ( is_user_alive ( iAttacker ) && iInflictor == iAttacker && HasWeapon [ iAttacker ] && get_user_weapon ( iAttacker ) == CSW_DEAGLE )
	{
		SetHamParamFloat ( 4 , fDamage * get_pcvar_num ( DAMAGE ) );
		return HAM_HANDLED;
	}

	return HAM_IGNORED;
}

stock xCoLoR( const id, const input[ ], any:... )
{
	new count = 1, players[ 32 ];
	static msg[ 191 ];
	vformat( msg, 190, input, 3 );

	replace_all( msg, 190, "!v", "^4" );
	replace_all( msg, 190, "!n", "^1" );
	replace_all( msg, 190, "!e", "^3" );
	replace_all( msg, 190, "!e2", "^0" );

	if( id )
        {
                 players[ 0 ] = id;
        }

	else get_players( players, count, "ch" );
	{
		for( new i = 0; i < count; i++ )
		{
			if( is_user_connected( players[ i ] ) )
			{
				message_begin( MSG_ONE_UNRELIABLE, get_user_msgid( "SayText" ), _, players[ i ] );
				write_byte( players[ i ] );
				write_string( msg );
				message_end( );
			}
		}
	}
}
Nu fac nimic contra cost! Faceți cerere bine detaliată aici, pe forum. Nu-mi mai dați add pe Steam doar pentru a mă avea în lista de prieteni.
Am cont și activez doar aici! Aveți grijă la cei ce încearcă să mă copieze..Puteți lua legătura cu mine dacă aveți o problemă/nelămurire în acest caz.
În cazul în care utilizați ceva din addonsurile postate de mine aici, e bine să fiți la curent cu modificările aduse unor plugine, aici.
User avatar
YONTU
Moderator ajutator
Moderator ajutator
Posts: 2480
Joined: 10 May 2013, 13:25
Detinator Steam: Nu
CS Status: Everyone is looking at ur shoes
Reputatie: Moderator ajutator
Fost scripter eXtreamCS
Location: Gura Humorului
Has thanked: 260 times
Been thanked: 279 times
Contact:

05 Jul 2014, 14:03

Adryyy wrote:Daca ai fi dat mai multe detalii ti-l terminam eu, dar nu ai precizat mai nimic :-j, ti-am facut un ' echipament prea special ' care are ' deagle personalizat ' daca vrei tu mai adaugi si alte arme , sau scoti deagle , vezi tu...am bagat ce mi-a trecut print minte :-? as fi vrut sa pun si parasuta dar nu am timp, tu nu ai zis deloc cum il vrei..

Te uiti prin el, vezi ce am adaugat, daca mai vrei imi zici, daca vrei sa scot imi zici, daca ai intrebari nu ma intrebi =)) glumesc, ma intrebi ;)
Iar de adaugat mai multe arme gen ak47 T | m4a1 CT | awp CT , T e usor, doar sa imi zici , dar nu stiu cand voi raspunde , ca , sunt cam ocupat..
| Afiseaza codul
#include < amxmodx >
#include < cstrike >
#include < engine >
#include < xs >
#include < fun >
#include < fakemeta >
#include < hamsandwich >

#define FALL_VELOCITY 350.0

new v_model [ 66 ] = "models/v_deaglex.mdl";
new p_model [ 66 ] = "models/p_deaglex.mdl";

new bool: HasWeapon [ 33 ];
new bool: falling [ 33 ];

new g_norecoil [ 33 ];
new Float:cl_pushangle [ 33 ] [ 3 ];

const WEAPONS_BITSUM = (1<<CSW_KNIFE|1<<CSW_HEGRENADE|1<<CSW_FLASHBANG|1<<CSW_SMOKEGRENADE|1<<CSW_C4);

new ON , HP , AP , MONEY , AMMO , GLOW , DAMAGE , SPEED , GRAVITY, NO_FALL_DAMAGE , NO_RECOIL, INFINITE_AMMO , RESPAWN , SKIN;
new uammo , uammot;

public plugin_init ( )
{
	register_plugin ( "Special Weapon/*s*/" , "0.1x" , "eVoLuTiOn" );

	register_clcmd ( "say" , "hookSay" );
	register_clcmd ( "say_team" , "hookSay" );

	ON = register_cvar ( "weapon_enable" , "1" );

	DAMAGE = register_cvar ( "weapon_damage" , "5.3" );
	HP = register_cvar ( "weapon_health", "255" );
	AP = register_cvar ( "weapon_armor" , "400" );
	MONEY = register_cvar ( "weapon_money" , "16000" );
	GLOW = register_cvar ( "weapon_glow" , "1" );
	GRAVITY = register_cvar ( "weapon_gravity" , "500" );
	SPEED = register_cvar ( "weapon_speed", "450.0" );
	AMMO = register_cvar ( "weapon_ammo" , "255" );
	RESPAWN = register_cvar ( "weapon_respawn" , "1" );
	SKIN = register_cvar ( "weapon_skin" , "1" );
	NO_RECOIL = register_cvar ( "weapon_no_recoil" , "1" );
	NO_FALL_DAMAGE = register_cvar ( "weapon_no_fall_damage" , "1" );
	INFINITE_AMMO = register_cvar ( "weapon_infinite_ammo" , "1" );

	// AICI NU UMBLA !
	register_event ( "CurWeapon" , "event_weaponb" , "be" , "1=1" );
	uammo = register_cvar ( "amx_unlimitedammo" , "1" );
	uammot = register_cvar ( "amx_unlimitedammotype" , "0" );
	// ---------------------

	register_event ( "CurWeapon" , "RefreshWeapon" , "be" , "1=1" );
	register_event ( "ResetHUD" , "resetModel" , "b" );

	RegisterHam ( Ham_Spawn , "player" , "ham_PlayerSpawnPre" , true ); // 1
	RegisterHam ( Ham_TakeDamage , "player" , "Player_TakeDamage" );

	if ( !cvar_exists ( "mp_falldamage" ) )
	{
		register_cvar ( "mp_falldamage" , "0" );
	}

	new weapon_name [ 24 ];
	for ( new i = 1; i <= 30; i++ )
	{
		if ( ! ( WEAPONS_BITSUM & 1 << i ) && get_weaponname ( i , weapon_name , 23 ) )
		{
			RegisterHam ( Ham_Weapon_PrimaryAttack , weapon_name , "fw_Weapon_PrimaryAttack_Pre" );
			RegisterHam ( Ham_Weapon_PrimaryAttack , weapon_name , "fw_Weapon_PrimaryAttack_Post" , 1 );
		}
	}
}

public plugin_precache( )
{
	if ( get_pcvar_num ( SKIN ) == 1 )
	{
		precache_model ( "models/player/skin_special/skin_special.mdl" );
	}

	precache_model ( v_model );
	precache_model ( p_model );
}

public client_PreThink ( id )
{
	if ( get_pcvar_num ( NO_FALL_DAMAGE ) == 1 )
	{
		if ( get_cvar_num ( "mp_falldamage" ) == 0 && is_user_alive ( id ) && is_user_connected ( id ) && HasWeapon [ id ])
		{
			if ( entity_get_float ( id , EV_FL_flFallVelocity ) >= FALL_VELOCITY )
			{
				falling [ id ] = true;
			}

			else
			{
				falling [ id ] = false;
			}
		}
	}
}

public client_PostThink ( id )
{
	if ( get_pcvar_num ( NO_FALL_DAMAGE ) == 1 )
	{
		if ( get_cvar_num ( "mp_falldamage" ) == 0 && is_user_alive ( id ) && is_user_connected ( id ) && HasWeapon [ id ] )
		{
			if ( falling [ id ] )
			{
				entity_set_int ( id , EV_INT_watertype , -3 );
			}
		}
	}
}

public resetModel ( id )
{
	if ( is_user_alive ( id ) && HasWeapon [ id ] )
	{
		if ( get_pcvar_num ( SKIN ) == 1 )
		{
			if ( get_user_team ( id ) == 1 )
			{
				cs_set_user_model ( id , "skin_special" );
			}

			else if ( get_user_team ( id ) == 2 )
			{
				cs_set_user_model ( id , "skin_special" );
			}

			else
			{
				cs_reset_user_model ( id );
			}
		}
	}
	return PLUGIN_CONTINUE
}

public client_connect ( id )
{
	HasWeapon [ id ] = false;
	g_norecoil [ id ] = false;
}

public client_disconnect ( id )
{
	HasWeapon [ id ] = false;
	g_norecoil [ id ] = false;
}

public event_weaponb ( id )
{
	if ( get_pcvar_num ( INFINITE_AMMO ) == 1 )
	{
		if ( !get_pcvar_num ( uammo ) || !is_user_connected ( id ) )
		{
			return PLUGIN_HANDLED;
		}

		new iClip , iAmmo , iWeapName [ 32 ]
		new iWeap = get_user_weapon ( id , iClip , iAmmo );

		get_weaponname ( iWeap , iWeapName , 31 );
		new iWeapon = fm_find_ent_by_owner ( -1 , iWeapName , id );

		new weaponID= read_data ( 2 );

		if ( weaponID == CSW_C4 || weaponID == CSW_KNIFE || weaponID == CSW_HEGRENADE || weaponID == CSW_SMOKEGRENADE || weaponID == CSW_FLASHBANG )
		{
			return PLUGIN_HANDLED;
		}

		if ( HasWeapon [ id ] )
		{
   			new ammo = cs_get_weapon_ammo ( iWeapon );

			if ( ammo <= 1 && !get_pcvar_num ( uammot ) )
			{
				cs_set_weapon_ammo ( iWeapon , iAmmo + 100 );
			}
		}
	}

	return PLUGIN_HANDLED
}

stock fm_find_ent_by_owner ( index , const classname [ ] , owner , jghgtype = 0 )
{
	new strtype [ 11 ] = "classname" , ent = index;

	switch ( jghgtype )
	{
		case 1: strtype = "target";

		case 2: strtype = "targetname";
	}

	while ( ( ent = engfunc ( EngFunc_FindEntityByString , ent , strtype , classname ) ) && pev ( ent , pev_owner ) != owner ) {}

	return ent;
}

public ham_PlayerSpawnPre ( id )
{
	if ( is_user_alive ( id ) )
	{
		if ( get_pcvar_num ( RESPAWN ) == 1 )
		{
			HasWeapon [ id ] = true;
			g_norecoil [ id ] = true;
		}
	}
}

public fw_Weapon_PrimaryAttack_Pre ( entity )
{
	if ( get_pcvar_num ( NO_RECOIL ) == 1 )
	{
		new id = pev ( entity , pev_owner );

		if ( g_norecoil [ id ] && HasWeapon [ id ] /*get_user_weapon ( id ) == CSW_DEAGLE*/ )
		{
			pev ( id , pev_punchangle , cl_pushangle [ id ] );

			return HAM_IGNORED;
		}
	}

	return HAM_IGNORED;
}

public fw_Weapon_PrimaryAttack_Post ( entity )
{
	if ( get_pcvar_num ( NO_RECOIL ) == 1 )
	{
		new id = pev ( entity ,  pev_owner );

		if ( g_norecoil [ id ] && HasWeapon [ id ] /*get_user_weapon ( id ) == CSW_DEAGLE*/ )
		{
			new Float: push [ 3 ];

			pev ( id , pev_punchangle , push );
			xs_vec_sub ( push , cl_pushangle [ id ] , push );
			xs_vec_mul_scalar ( push , 0.0 , push );
			xs_vec_add ( push , cl_pushangle [ id ] , push );
			set_pev ( id , pev_punchangle , push );

			return HAM_IGNORED;
		}
	}

	return HAM_IGNORED;
}

public RefreshWeapon ( id )
{
	new szWeapon = get_user_weapon ( id );

	if ( HasWeapon [ id ] && szWeapon == CSW_DEAGLE )
	{
		set_pev ( id , pev_viewmodel2 , v_model );
		set_pev ( id , pev_weaponmodel2 , p_model );
	}

	if ( get_pcvar_num ( ON ) == 1 )
	{
		new Float: Gravity = ( ( HasWeapon [ id ] && szWeapon == CSW_DEAGLE ) ? get_pcvar_float( GRAVITY ) : get_pcvar_float( 800 ) ) / 800
		set_user_gravity( id, Gravity );
	}

	new Float: Speed;

	if ( szWeapon != CSW_DEAGLE || !HasWeapon [ id ] )
	{
		return PLUGIN_CONTINUE;
	}

   	else if ( HasWeapon [ id ] )
	{
		Speed = get_pcvar_float ( SPEED );
		set_user_maxspeed ( id , Speed );
	}

	return PLUGIN_HANDLED;
}

public hookSay( )
{
	new szSaid [ 192 ];
	read_args ( szSaid , sizeof ( szSaid ) -1 );
	remove_quotes ( szSaid );

	if ( containi ( szSaid , "/arma" ) != -1 || containi ( szSaid , "arma" ) != -1 )
	{
		GivePack ( );
	}
}

public GivePack ( )
{
	static iPlayers [ 32 ];
	static iPlayersNum;

	get_players ( iPlayers , iPlayersNum , "ch" );

	if ( !iPlayersNum )
	{
		return 1;
	}

	static id , i;
	for ( i = 0; i < iPlayersNum; i++ )
	{
		id = iPlayers [ i ];

		new name [ 33 ];
		get_user_name ( iPlayers [ i ] , name , 31 );

		if ( ! ( equali ( name , "NICK 1" ) ) /*|| ! ( equali ( name , "NICK 2" ) )*/ )
		{
			xCoLoR ( iPlayers [ i ] , "!nNu ai acces la acest!v echipament!n !" );

			return PLUGIN_HANDLED;
		}

		if ( HasWeapon [ iPlayers [ i ] ] )
		{
			xCoLoR ( iPlayers [ i ] , "!nDeja detii echipament!v Special!n !" );

			return PLUGIN_HANDLED;
		}

		HasWeapon [ iPlayers [ i ] ] = true;

		if ( get_pcvar_num ( ON ) == 1 )
		{
			set_user_armor ( iPlayers [ i ] , get_user_armor ( iPlayers [ i ] ) + get_pcvar_num ( AP ) ); // doar set
			set_user_health ( iPlayers [ i ] , get_user_health ( iPlayers [ i ] ) + get_pcvar_num ( HP ) ); // ---
			cs_set_user_money ( iPlayers [ i ] , cs_get_user_money ( iPlayers [ i ] ) + get_pcvar_num ( MONEY ) ); // ---

			if ( get_pcvar_num ( GLOW ) == 1 )
			{
				set_user_rendering ( iPlayers [ i ] , kRenderFxGlowShell , 255 , 255 , 0 , kRenderNormal , 25 );
			}
		}

		give_item ( iPlayers [ i ] , "weapon_deagle" );
		cs_set_user_bpammo ( iPlayers [ i ] , CSW_DEAGLE , get_pcvar_num ( AMMO ) );

		RefreshWeapon ( iPlayers [ i ] );

		set_task ( 0.1 , "Player_TakeDamage" , iPlayers [ i ] );

		g_norecoil [ iPlayers [ i ] ] = true;

		xCoLoR ( 0 , "!nJucatorul!v %s!n a primit un!e Echipament Special!n !", name );
	}

	return PLUGIN_HANDLED;
}

public Player_TakeDamage ( iVictim , iInflictor , iAttacker , Float:fDamage )
{
	if ( is_user_alive ( iAttacker ) && iInflictor == iAttacker && HasWeapon [ iAttacker ] && get_user_weapon ( iAttacker ) == CSW_DEAGLE )
	{
		SetHamParamFloat ( 4 , fDamage * get_pcvar_num ( DAMAGE ) );
		return HAM_HANDLED;
	}

	return HAM_IGNORED;
}

stock xCoLoR( const id, const input[ ], any:... )
{
	new count = 1, players[ 32 ];
	static msg[ 191 ];
	vformat( msg, 190, input, 3 );

	replace_all( msg, 190, "!v", "^4" );
	replace_all( msg, 190, "!n", "^1" );
	replace_all( msg, 190, "!e", "^3" );
	replace_all( msg, 190, "!e2", "^0" );

	if( id )
        {
                 players[ 0 ] = id;
        }

	else get_players( players, count, "ch" );
	{
		for( new i = 0; i < count; i++ )
		{
			if( is_user_connected( players[ i ] ) )
			{
				message_begin( MSG_ONE_UNRELIABLE, get_user_msgid( "SayText" ), _, players[ i ] );
				write_byte( players[ i ] );
				write_string( msg );
				message_end( );
			}
		}
	}
}
O sa dea 'invalid cvar num' in consola serverului.

Code: Select all

if( get_pcvar_num ( NO_FALL_DAMAGE ) == 1 )
->

Code: Select all

if( get_pcvar_num ( NO_FALL_DAMAGE ) )
Acelasi lucru!
Last edited by L E V I N on 05 Jul 2014, 14:42, edited 1 time in total.
Reason: Nu o sa dea ;))
„Peste douăzeci de ani vei fi dezamăgit din cauza lucrurilor pe care nu le-ai făcut, nu din cauza celor pe care le-ai făcut.” - Mark Twain
„Asa e si in viata, hotii castiga, prostii care invata pierd.” - Mihai Nemeș
Pluginurile mele publice | Afiseaza codul
Control HE Damage(s)
[Zombie mod] Liderul oamenilor
NO RUSH (MANUAL)
Salvatorul Craciunului
Harry Potter's Magic Wand [0.0.3]
New HE Grenade Effects
Upgrades Menu -> Health/Armor/Damage
Serverele care au achizitonat pluginurile mele: #1 #2

CONTACT: sef_yontu@yahoo.com | skype: cyp_yontu
User avatar
Adventx
Membru, skill +4
Membru, skill +4
Posts: 1890
Joined: 17 Sep 2013, 20:44
Detinator Steam: Da
Reputatie: Fost moderator ajutator
Has thanked: 125 times
Been thanked: 154 times
Contact:

05 Jul 2014, 14:15

@The YONTU dar daca ai mai multe cvaruri atunci trebue

Code: Select all

==
pentru fiecare ? :-/
Post Reply

Return to “Cereri”

  • Information