[Rezolvat] Cerere modificare plugin [CSO] Foot Kick

Modificari necesare ale pluginurilor

Moderators: Moderatori ajutatori, Moderatori, Echipa eXtreamCS.com

Post Reply
User avatar
AZzeL
Membru, skill +2
Membru, skill +2
Posts: 981
Joined: 02 Oct 2012, 15:24
Detinator Steam: Da
CS Status: Invat ingerasii sa moara !
Detinator server CS: VALCEA.FIREON.RO
Location: Valcea
Has thanked: 64 times
Been thanked: 27 times
Contact:

30 Jul 2014, 02:24

Salut

Imi puteti modifica pluginul de mai jos sa execute miscarea cand apas pe tasta C in loc de tasta E ?
| Afiseaza codul
/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <fakemeta_util>
#include <hamsandwich>
#include <engine>
#include <cstrike>
#include <zombieplague>

#define PLUGIN "[CSO] Foot Kick"
#define VERSION "0.0.1.4"
#define AUTHOR "PlaneShift1231"

#define gModels "models/cso/v_foot.mdl" 

new const gSounds[][] = {
	"cso/foot_slash.wav",
	"cso/foot_kick.wav" } ;

new bool: gFootKick[33] ;

public plugin_init() {
	register_plugin(PLUGIN, VERSION, AUTHOR) ;
	RegisterHam(Ham_Player_PreThink, "player", "PlayerPreThink") ; }

public plugin_precache() {
	precache_sound(gSounds[0]) ;
	precache_sound(gSounds[1]) ;
	precache_model(gModels)	; }
	
public FootKick(id) {
	if( !zp_get_user_zombie(id) && is_user_alive(id) && get_pdata_float(id, 83) <= 0.0 && !(pev(id, pev_flags) & FL_DUCKING) ) {
		set_pev(id, pev_velocity, {0.0}) ;
		set_pev(id, pev_viewmodel2, gModels) ;
		PlayAnimation(id, 1) ;
		set_pdata_float(id, 83, 0.6) ;
		gFootKick[id] = true ;
		new Target, Body ;
		get_user_aiming(id, Target, Body, 100) ;
		if( Target && is_user_alive(Target) && zp_get_user_zombie(Target) ) { 
			new Float: fVelocity[3] ;
			velocity_by_aim(id, 500, fVelocity) ;
			fVelocity[2] = 300.0 ;
			set_pev(Target, pev_velocity, fVelocity) ; }
		if( AimDistance(id) <= 100 || is_user_alive(Target) ) {
			emit_sound(id, CHAN_WEAPON, gSounds[1], 1.0, ATTN_NORM, 0, PITCH_NORM) ; }
		else emit_sound(id, CHAN_WEAPON, gSounds[0], 1.0, ATTN_NORM, 0, PITCH_NORM) ; }
	return PLUGIN_HANDLED ; }

public PlayerPreThink(id) {
	static Float: NextAttack ; 
	NextAttack = get_pdata_float(id, 83, 5) ;
	if( NextAttack >= 0.0 && gFootKick[id] ) {
		set_pev(id, pev_velocity, {0.0,0.0,0.0}) ; }
	if( NextAttack <= 0.0 && gFootKick[id] ) {
		static Weapon ; 
		Weapon = get_pdata_cbase(id, 373) ; 
		if(pev_valid(Weapon)) {
			ExecuteHamB(Ham_Item_Deploy, Weapon) ;
			gFootKick[id] = false ; } }
	new Button = get_user_button(id) ;
	if( Button & IN_USE ) {
		FootKick(id) ; } }
		
stock Float: AimDistance(id) {
	static a, Float:b ;
	return get_user_aiming(id, a, _:b) ; }

stock PlayAnimation(const Player, const Sequence) {
	set_pev(Player, pev_weaponanim, Sequence) ;
	message_begin(MSG_ONE_UNRELIABLE, SVC_WEAPONANIM, .player = Player) ;
	write_byte(Sequence) ;
	write_byte(pev(Player, pev_body)) ;
	message_end() ; }
Multumesc !
Last edited by AZzeL on 20 Aug 2014, 22:17, edited 2 times in total.
[ EntrySoft Hosting SRL ( Reducere 20% prin codul AZZEL20 ) ]
[ MxHost™ ]
RoyalServer 2
User avatar
Carnacior
Membrul anului 2016
Membrul anului 2016
Posts: 1762
Joined: 23 Jun 2013, 14:08
Detinator Steam: Da
CS Status: I eat more pussy than cervical cancer
Detinator server CS: jb.b-zone.ro
SteamID: -
Reputatie: Fost Scripter eXtreamCS
Membrul anului 2016
Membru Club eXtreamCS (1 iul )
Location: Targu Mures
Has thanked: 5 times
Been thanked: 13 times
Contact:

30 Jul 2014, 06:43

nu se poate

Code: Select all

new Button = get_user_button(id) ;
	if( Button & IN_USE ) {
nu se ia butonul ci actiunea +use, din cate stiu eu, pe c nu este nici un bind


se poate pune un bind dar e slowhacking plus ca jucatorii cu guarduri nu l-ar primi si nu s-ar putea juca
Ai nevoie de o protectie pentru server? R4GE Server Guard
Cel mai avansat si folosit plugin de protectie romanesc public! Nu ma crezi? VERIFICA


http://www.facebook.com/xyz.aron
Follow me for random bullshit and possibly interesting updates
Skype @ xyz_aron


Image
User avatar
AZzeL
Membru, skill +2
Membru, skill +2
Posts: 981
Joined: 02 Oct 2012, 15:24
Detinator Steam: Da
CS Status: Invat ingerasii sa moara !
Detinator server CS: VALCEA.FIREON.RO
Location: Valcea
Has thanked: 64 times
Been thanked: 27 times
Contact:

30 Jul 2014, 14:40

Carnacior wrote:nu se poate

Code: Select all

new Button = get_user_button(id) ;
	if( Button & IN_USE ) {
nu se ia butonul ci actiunea +use, din cate stiu eu, pe c nu este nici un bind


se poate pune un bind dar e slowhacking plus ca jucatorii cu guarduri nu l-ar primi si nu s-ar putea juca
Tasta "E" "+use" iar pe tasta "C" "radio3"

Nu vreau cu slowhack :)

Dar pe "ALT" "+strafe" merge ?
[ EntrySoft Hosting SRL ( Reducere 20% prin codul AZZEL20 ) ]
[ MxHost™ ]
User avatar
AZzeL
Membru, skill +2
Membru, skill +2
Posts: 981
Joined: 02 Oct 2012, 15:24
Detinator Steam: Da
CS Status: Invat ingerasii sa moara !
Detinator server CS: VALCEA.FIREON.RO
Location: Valcea
Has thanked: 64 times
Been thanked: 27 times
Contact:

01 Aug 2014, 10:59

Cineva ?
[ EntrySoft Hosting SRL ( Reducere 20% prin codul AZZEL20 ) ]
[ MxHost™ ]
User avatar
AZzeL
Membru, skill +2
Membru, skill +2
Posts: 981
Joined: 02 Oct 2012, 15:24
Detinator Steam: Da
CS Status: Invat ingerasii sa moara !
Detinator server CS: VALCEA.FIREON.RO
Location: Valcea
Has thanked: 64 times
Been thanked: 27 times
Contact:

04 Aug 2014, 00:11

AZzeL wrote:Cineva ?
[ EntrySoft Hosting SRL ( Reducere 20% prin codul AZZEL20 ) ]
[ MxHost™ ]
User avatar
cyby
Scripter eXtreamCS
Scripter eXtreamCS
Posts: 1777
Joined: 16 Jul 2011, 21:46
Detinator Steam: Da
Detinator server CS: Da
Reputatie: Scripter eXtreamCS
Fost Moderator ajutator
Has thanked: 146 times
Been thanked: 396 times

11 Aug 2014, 13:43

| Afiseaza codul
/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <fakemeta_util>
#include <hamsandwich>
#include <engine>
#include <cstrike>
#include <zombieplague>

#define PLUGIN "[CSO] Foot Kick"
#define VERSION "0.0.1.4"
#define AUTHOR "PlaneShift1231"

#define gModels "models/cso/v_foot.mdl" 

new const gSounds[][] = {
	"cso/foot_slash.wav",
	"cso/foot_kick.wav" } ;

new bool: gFootKick[33] ;

public plugin_init() {
	register_plugin(PLUGIN, VERSION, AUTHOR) ;
	RegisterHam(Ham_Player_PreThink, "player", "PlayerPreThink") ; 
	register_clcmd("radio3", "FootKick")
}

public plugin_precache() {
	precache_sound(gSounds[0]) ;
	precache_sound(gSounds[1]) ;
	precache_model(gModels)	; }
	
public FootKick(id) {
	if(!zp_get_user_zombie(id) && is_user_alive(id) && get_pdata_float(id, 83) <= 0.0 && !(pev(id, pev_flags) & FL_DUCKING)) 
	{
		set_pev(id, pev_velocity, {0.0}) ;
		set_pev(id, pev_viewmodel2, gModels) ;
		PlayAnimation(id, 1) ;
		set_pdata_float(id, 83, 0.6) ;
		gFootKick[id] = true ;
		new Target, Body ;
		get_user_aiming(id, Target, Body, 100) ;
		if( Target && is_user_alive(Target) && zp_get_user_zombie(Target) ) { 
			new Float: fVelocity[3] ;
			velocity_by_aim(id, 500, fVelocity) ;
			fVelocity[2] = 300.0 ;
			set_pev(Target, pev_velocity, fVelocity) ; }
		if( AimDistance(id) <= 100 || is_user_alive(Target) ) {
			emit_sound(id, CHAN_WEAPON, gSounds[1], 1.0, ATTN_NORM, 0, PITCH_NORM) ; }
		else emit_sound(id, CHAN_WEAPON, gSounds[0], 1.0, ATTN_NORM, 0, PITCH_NORM) ; }
	return PLUGIN_HANDLED ; 
}

public PlayerPreThink(id) 
{
	static Float: NextAttack; 
	NextAttack = get_pdata_float(id, 83, 5);
	if(NextAttack >= 0.0 && gFootKick[id]) 
		set_pev(id, pev_velocity, {0.0,0.0,0.0})
	if(NextAttack <= 0.0 && gFootKick[id]) 
	{
		static Weapon; 
		Weapon = get_pdata_cbase(id, 373); 
		if(pev_valid(Weapon)) 
		{
			ExecuteHamB(Ham_Item_Deploy, Weapon);
			gFootKick[id] = false; 
		} 
	}
}

stock Float: AimDistance(id) {
	static a, Float:b ;
	return get_user_aiming(id, a, _:b) ; }

stock PlayAnimation(const Player, const Sequence) {
	set_pev(Player, pev_weaponanim, Sequence) ;
	message_begin(MSG_ONE_UNRELIABLE, SVC_WEAPONANIM, .player = Player) ;
	write_byte(Sequence) ;
	write_byte(pev(Player, pev_body)) ;
	message_end() ; }
93.114.82.17:27015 - Monster Invasion CO-OP Mod
User avatar
AZzeL
Membru, skill +2
Membru, skill +2
Posts: 981
Joined: 02 Oct 2012, 15:24
Detinator Steam: Da
CS Status: Invat ingerasii sa moara !
Detinator server CS: VALCEA.FIREON.RO
Location: Valcea
Has thanked: 64 times
Been thanked: 27 times
Contact:

20 Aug 2014, 22:16

Multumesc cyby , merge :)

REZOLVAT !
[ EntrySoft Hosting SRL ( Reducere 20% prin codul AZZEL20 ) ]
[ MxHost™ ]
Post Reply

Return to “Modificari pluginuri”

  • Information
  • Who is online

    Users browsing this forum: Yandex [Bot] and 20 guests