ESF Plugin!

New Member
✔️ HL Verified
Joined
Feb 12, 2010
Messages
403
Best answers
0
Location
Planet Vegeta
I need someone to tell me how to change the powerup aura from yellow to red and how to delete the glowing in the plugin gijissj.amxx

Code:
/*
Copyright (C) 2010 Earth's Special Forces Beta 1.2.3

This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.

Earth's Special Forces Beta 1.2.3

*/

#include <amxmodx>
#include <fun>
#include <fakemeta>
#include <engine>

public plugin_init() {
	register_plugin("[ESF Giji-SSJ Transformation]", "-2.1.0-", "ShAyA")
	register_clcmd("ascend","toAscend") // Captures you trying to ascend
	register_clcmd("descend","toDescend") // Captures you trying to descend
	register_cvar("esf_allowgiji","1") // For allowing giji ssj yes or no
	register_cvar("esf_gijineeded","1200000") // Minimum powerlevel for goku to giji ssj
	register_event("ResetHUD","playerSpawn","b") // Player spawns after death
	register_event("Health","deadCheck","b") // Checks to see if player is dead.
	register_message( get_user_msgid( "Powerup" ), "PowerupMessage" )
}

public plugin_precache() {
	precache_model("models/player/kaiokengoku/kaiokengoku.mdl") //Precache Kaioken Goku model
}

new PlayerForm[33] // Form normal or 2nd, numbers are weird
new PlayerExtra[33] // If Extra powered up or not
new PlayerTrans[33] // Currently transforming.
new PlayerOrigSpeed[33] // Original speed to change back during transforming if cancelled.
new PlayerResetGlow[33] // Resets the glow after turboing.

public PowerupMessage( msgid, dest, pEnt ) // To make Kaioken Goku's powering up red. [B]This to change in red![/B]
{
	new id = get_msg_arg_int(1)
	new playerClass = entity_get_int(id, EV_INT_playerclass)
	if(PlayerExtra[id] && playerClass == 2) { // Goku 
			set_msg_arg_int( 2, ARG_BYTE, 200 );   -
			set_msg_arg_int( 3, ARG_BYTE, 200 );   - [B]Can someone give me the code to change the powerup aura from yellow to red?![/B]
                        set_msg_arg_int( 4, ARG_BYTE, 0 );      - 
	}
	return PLUGIN_CONTINUE; 
}
public client_PostThink(id) // For making the turbo aura red.
{
	new playerClass = entity_get_int(id, EV_INT_playerclass)
	if(PlayerExtra[id] && playerClass == 2) { // Goku
		for( new entity = 1; entity < get_global_int(GL_maxEntities); entity++) {
			if(!is_valid_ent(entity)) 
				continue;
			if(entity_get_edict(entity,EV_ENT_owner) == id) {
				new sz_ent[3][32]
				entity_get_string(entity, EV_SZ_model, sz_ent[2], 31)
				if( containi( sz_ent[2], "aura" ) != -1 ) {		
					entity_set_int( entity, EV_INT_skin, 3 ); // sets the models 'skin'
				}
			} 
		}
	}
	return PLUGIN_CONTINUE
}

public deadCheck(id) {
	new var = read_data(1)
	new playerClass = entity_get_int(id, EV_INT_playerclass)
	if(var == 0) {
		if(PlayerTrans[id]) {
			remove_task(1111 + id)
			PlayerTrans[id] = 0
			message_begin( MSG_ALL, get_user_msgid("StopTransFX"), {0,0,0} ,id);
			write_byte(1);
			message_end( );
			set_user_rendering(id,kRenderFxGlowShell,0,0,0,kRenderNormal,25)
		}
		if(PlayerExtra[id] && playerClass == 2) { //Goku
			PlayerExtra[id] = 0
			set_user_rendering(id,kRenderFxGlowShell,0,0,0,kRenderNormal,25)
			new PlLevel = floatround(float(get_pdata_int(id, 461)) / 1.5)
			set_pdata_int(id, 460, PlLevel)
			set_pdata_int(id, 461, PlLevel)
		}
	}
}

public playerSpawn(id) {
	PlayerForm[id] = entity_get_int(id, EV_INT_modelindex)
	PlayerExtra[id] = 0
}
public server_frame() {
	for(new a = 1; a <= get_playersnum(); a++) {
		if(floatround(entity_get_float(a, 36)) < 50 && PlayerExtra[a])
			gijiDescend(a)
		if(PlayerResetGlow[a] == 1)
			PlayerResetGlow[a] = 2
		if(PlayerExtra[a]) {
			entity_set_string(a, EV_SZ_model, "models/player/kaiokengoku/kaiokengoku")
			entity_set_model(a, "models/player/kaiokengoku/kaiokengoku.mdl")
		}
	}
	for(new entity = 1; entity < get_global_int(GL_maxEntities); entity++) { 
		if ( !is_valid_ent( entity ) ) 
			continue;
		new szModel[2][32]
		entity_get_string(entity, EV_SZ_classname, szModel[0], 31)
		entity_get_string(entity, EV_SZ_model, szModel[1], 31)
		if(entity < 33) {
			if( containi( szModel[0], "player" ) != -1 ) {
				if(PlayerTrans[entity]) {
					entity_set_int( entity, EV_INT_sequence, 25 );
					entity_set_int( entity, EV_INT_gaitsequence, 0 );
				}
			}
		}
		new id = entity_get_edict( entity, EV_ENT_owner )
		if(containi(szModel[1], "aura") != -1 && PlayerExtra[id])
			PlayerResetGlow[id] = 1
	}
	for(new a = 0; a <= get_playersnum(); a++) {
		if(PlayerResetGlow[a] == 2 && PlayerExtra[a]) {
			set_user_rendering(a,kRenderFxGlowShell,0,0,0,kRenderNormal,25)
			PlayerResetGlow[a] = 0
			set_user_rendering(a,kRenderFxGlowShell,255,0,0,kRenderNormal,25)
		}
	}
}
public toAscend(id) {
	if(get_cvar_num("esf_allowgiji")==0)
		return PLUGIN_CONTINUE
	if(isBusy(id))
		return PLUGIN_CONTINUE
	new playerClass = entity_get_int(id, EV_INT_playerclass)
	new modelIndex = entity_get_int(id, EV_INT_modelindex)
	if(playerClass == 2) { //Goku
		if(PlayerForm[id] != modelIndex) { // Not in the basic form.
			return PLUGIN_HANDLED
		}
		if(PlayerExtra[id] || PlayerTrans[id])
			return PLUGIN_HANDLED
		new currentKi = get_pdata_int(id, 460)
		if(currentKi >= get_cvar_num("esf_gijineeded") && currentKi < 1750000) { //For Kaioken Goku
			PlayerTrans[id] = 1
			message_begin( MSG_ALL, get_user_msgid( "TransformFX" ), {0,0,0} ,id);
			write_byte(id);
			write_byte(20)
			write_byte(0)
			message_end( );
			PlayerOrigSpeed[id] = get_pdata_int(id, 462)
			set_pdata_int(id, 462, 0)
			new params[1]
			params[0] = id
			set_task(2.0, "gijiAscend", 1111+id, params, 2)
			return PLUGIN_HANDLED
		}
	}
	return PLUGIN_CONTINUE
}
public gijiAscend(params[]) {
	new var = params[0]
	message_begin( MSG_ALL, get_user_msgid("StopTransFX"), {0,0,0} ,var);
	write_byte(1);
	message_end( );
	set_pdata_int(var, 462, 236)
	new PlLevel = floatround(float(get_pdata_int(var, 461)) * 1.5)
	set_pdata_int(var, 460, PlLevel)
	set_pdata_int(var, 461, PlLevel)
	set_pdata_int(var, 142, 120)
	message_begin( MSG_ONE, get_user_msgid( "MaxHealth" ), { 0, 0, 0 }, var );
	write_byte(120);
	message_end( );
	new hp = floatround(entity_get_float(var, EV_FL_health) * 1.1)
	if(hp > 120)
		hp = 120
	entity_set_float(var, EV_FL_health, float(hp));
	message_begin( MSG_ONE, get_user_msgid("Health"), {0,0,0} ,var);
	write_byte(hp);
	message_end( );
	PlayerExtra[var] = 1
	PlayerTrans[var] = 0
	client_cmd(var, "turbo")
	new bar = floatround(entity_get_float(var, 36))
	bar = bar - 200
	entity_set_float(var, 36, float(bar))
	set_user_rendering(var,kRenderFxGlowShell,255,0,0,kRenderNormal,25)
}
public gijiDescend(id) {
	PlayerExtra[id] = 0
	new PlLevel = floatround(float(get_pdata_int(id, 461)) / 1.5)
	set_pdata_int(id, 460, PlLevel)
	set_pdata_int(id, 461, PlLevel)
	set_pdata_int(id, 142, 110)
	set_pdata_int(id, 462, 216)
	message_begin( MSG_ONE, get_user_msgid( "MaxHealth" ), { 0, 0, 0 }, id );
	write_byte(110);
	message_end( );
	new hp = floatround(entity_get_float(id, EV_FL_health) / 1.1)
	if(hp > 110)
		hp = 110
	entity_set_float(id, EV_FL_health, float(hp));
	message_begin( MSG_ONE, get_user_msgid("Health"), {0,0,0} ,id);
	write_byte(hp);
	message_end( );
	set_user_rendering(id,kRenderFxGlowShell,0,0,0,kRenderNormal,25)
	
}

public toDescend(id) {
	if(PlayerExtra[id]) {
		gijiDescend(id)
	}
	if(PlayerTrans[id]) {
		remove_task(1111 + id)
		PlayerTrans[id] = 0
		set_pdata_int(id, 462, PlayerOrigSpeed[id])
		message_begin( MSG_ALL, get_user_msgid("StopTransFX"), {0,0,0} ,id);
		write_byte(1);
		message_end( );
		set_user_rendering(id,kRenderFxGlowShell,0,0,0,kRenderNormal,25)
	}
}

public isBusy(id) {
	if(get_pdata_int(id, 459) == 0 || get_pdata_int(id, 462) == 0) //Speed.. if set to 0 your usually transforming.
		return 1
	if(get_pdata_int(id, 199)) // Charging
		return 1
	if(get_pdata_int(id, 200)) //Charging attack
		return 1
	if(get_pdata_int(id, 230))
		return 1
	if(get_pdata_int(id, 300))
		return 1
	if(get_pdata_int(id, 298)) // In advanced melee
		return 1
	if(get_pdata_int(id, 317)) // Swooping
		return 1
	if(get_pdata_int(id, 464) == 0) //Shooting attack.
		return 1
	if(entity_get_int(id, EV_INT_movetype) != 3) {
		if(entity_get_int(id, EV_INT_movetype) != 14)
			return 1
	}
	if(floatround(entity_get_float(id, EV_FL_health)) < 6) //Hp less then 6 meaning ki is losing.
		return 1
	if(floatround(entity_get_float(id, 36)) < 200)
		return 1
	return 0 // we passed.
}
And also need how to delete the glowing!
 
Last edited by a moderator:
Project Manager
🌠 Staff
✔️ HL Verified
💻 Oldtimer
Joined
Nov 25, 2001
Messages
1,729
Best answers
0
read up on RGB colors and guess what the three bytes of the PowerupMessage could mean. a lil hint that byte stores between 0 and 255 and each of them represent a color chanel is the order red, green, bue.
 
Former Forcepit Member :(
✔️ HL Verified
💻 Oldtimer
Joined
Aug 21, 2006
Messages
1,717
Best answers
0
Location
korriban
NOT IN THE MANGA™
★ Black Lounger ★
✔️ HL Verified
🚂 Steam Linked
💻 Oldtimer
Joined
Jan 5, 2008
Messages
3,276
Best answers
0
Location
Lithuania
That plugin is ineficcient as hell. I wouldn't recommend using it.
 
Active Member
✔️ HL Verified
💻 Oldtimer
Joined
Mar 13, 2005
Messages
3,877
Best answers
0
Thats an old old old Code we had back when I suggested the Giji Transformation for Evossj4 back in 2006. Oh man how time flies...
 
Project Manager
🌠 Staff
✔️ HL Verified
💻 Oldtimer
Joined
Nov 25, 2001
Messages
1,729
Best answers
0
how about we stay on topic and help the guy with what he wants, which is what I believe not an easy tasks since he doesn't know the slightest bit about Pawn or AMXX, that it's deprecated and ineffective shouldn't matter too much too him.
 
NOT IN THE MANGA™
★ Black Lounger ★
✔️ HL Verified
🚂 Steam Linked
💻 Oldtimer
Joined
Jan 5, 2008
Messages
3,276
Best answers
0
Location
Lithuania
For red powerup aura:
Code:
			set_msg_arg_int( 2, ARG_BYTE, 200 );   -
			set_msg_arg_int( 3, ARG_BYTE, 0 );   - Can someone give me the code to change the powerup aura from yellow to red?!
                        set_msg_arg_int( 4, ARG_BYTE, 0 );
For removing the glow, remove everything that associates with function
Code:
set_user_rendering()
If, when compiling the plugin after that, you'll get something like "symbol is never used "<variable name>"", that's not a bad thing though you should remove it from code.
 
New Member
✔️ HL Verified
Joined
Feb 12, 2010
Messages
403
Best answers
0
Location
Planet Vegeta
For red powerup aura:
Code:
			set_msg_arg_int( 2, ARG_BYTE, 200 );   -
			set_msg_arg_int( 3, ARG_BYTE, 0 );   - Can someone give me the code to change the powerup aura from yellow to red?!
                        set_msg_arg_int( 4, ARG_BYTE, 0 );
For removing the glow, remove everything that associates with function
Code:
set_user_rendering()
If, when compiling the plugin after that, you'll get something like "symbol is never used "<variable name>"", that's not a bad thing though you should remove it from code.
The powerup aura is light blue and i have tryed from 0 to 1000 and it doesnt work. It's there posible to made that red!
set_user_rendering() - and for this there are 1000 like this, where to put this, (i changet the all set_user_rendering to () but the sma file is not compiling ito amxx :S

(Sry for my english)
 
Last edited:
NOT IN THE MANGA™
★ Black Lounger ★
✔️ HL Verified
🚂 Steam Linked
💻 Oldtimer
Joined
Jan 5, 2008
Messages
3,276
Best answers
0
Location
Lithuania
Code:
			set_msg_arg_int( 2, ARG_BYTE, 200 ); 
			set_msg_arg_int( 3, ARG_BYTE, 0 ); 
                        set_msg_arg_int( 4, ARG_BYTE, 0 );
When you find set_user_rendering, remove the whole line.
 
New Member
✔️ HL Verified
Joined
Feb 12, 2010
Messages
403
Best answers
0
Location
Planet Vegeta
Code:
*
Copyright (C) 2010 Earth's Special Forces Beta 1.2.3

This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.

Earth's Special Forces Beta 1.2.3

*/

#include <amxmodx>
#include <fun>
#include <fakemeta>
#include <engine>

public plugin_init() {
	register_plugin("[ESF Giji-SSJ Transformation]", "-2.1.0-", "EvolutionX")
	register_clcmd("ascend","toAscend") // Captures you trying to ascend
	register_clcmd("descend","toDescend") // Captures you trying to descend
	register_cvar("esf_allowgiji","1") // For allowing giji ssj yes or no
	register_cvar("esf_gijineeded","1200000") // Minimum powerlevel for goku to giji ssj
	register_event("ResetHUD","playerSpawn","b") // Player spawns after death
	register_event("Health","deadCheck","b") // Checks to see if player is dead.
	register_message( get_user_msgid( "Powerup" ), "PowerupMessage" )
}

public plugin_precache() {
	precache_model("models/player/kaiokengoku/kaiokengoku.mdl") //Precache Kaioken Goku model
}

new PlayerForm[33] // Form normal or 2nd, numbers are weird
new PlayerExtra[33] // If Extra powered up or not
new PlayerTrans[33] // Currently transforming.
new PlayerOrigSpeed[33] // Original speed to change back during transforming if cancelled.

public PowerupMessage( msgid, dest, pEnt ) // To make Kaioken Goku's powering up red.
{
	new id = get_msg_arg_int(1)
	new playerClass = entity_get_int(id, EV_INT_playerclass)
	if(PlayerExtra[id] && playerClass == 2) { // Goku 
			set_msg_arg_int( 2, ARG_BYTE, 200 ); 
			set_msg_arg_int( 3, ARG_BYTE, 0 );
			set_msg_arg_int( 4, ARG_BYTE, 0 ); 
                            
			
	}
	return PLUGIN_CONTINUE; 
}
public client_PostThink(id) // For making the turbo aura red.
{
	new playerClass = entity_get_int(id, EV_INT_playerclass)
	if(PlayerExtra[id] && playerClass == 2) { // Goku
		for( new entity = 1; entity < get_global_int(GL_maxEntities); entity++) {
			if(!is_valid_ent(entity)) 
				continue;
			if(entity_get_edict(entity,EV_ENT_owner) == id) {
				new sz_ent[3][32]
				entity_get_string(entity, EV_SZ_model, sz_ent[2], 31)
				if( containi( sz_ent[2], "aura" ) != -1 ) {		
					entity_set_int( entity, EV_INT_skin, 3 ); // sets the models 'skin'
				}
			} 
		}
	}
	return PLUGIN_CONTINUE
}

public deadCheck(id) {
	new var = read_data(1)
	new playerClass = entity_get_int(id, EV_INT_playerclass)
	if(var == 0) {
		if(PlayerTrans[id]) {
			remove_task(1111 + id)
			PlayerTrans[id] = 0
			message_begin( MSG_ALL, get_user_msgid("StopTransFX"), {0,0,0} ,id);
			write_byte(1);
			message_end( );
		}
		if(PlayerExtra[id] && playerClass == 2) { //Goku
			PlayerExtra[id] = 0
			new PlLevel = floatround(float(get_pdata_int(id, 461)) / 1.5)
			set_pdata_int(id, 460, PlLevel)
			set_pdata_int(id, 461, PlLevel)
		}
	}
}

public playerSpawn(id) {
	PlayerForm[id] = entity_get_int(id, EV_INT_modelindex)
	PlayerExtra[id] = 0
}
public server_frame() {
	for(new a = 1; a <= get_playersnum(); a++) {
		if(floatround(entity_get_float(a, 36)) < 50 && PlayerExtra[a])
			gijiDescend(a)
		if(PlayerExtra[a]) {
			entity_set_string(a, EV_SZ_model, "models/player/kaiokengoku/kaiokengoku")
			entity_set_model(a, "models/player/kaiokengoku/kaiokengoku.mdl")
		}
	}
	for(new entity = 1; entity < get_global_int(GL_maxEntities); entity++) { 
		if ( !is_valid_ent( entity ) ) 
			continue;
		new szModel[2][32]
		entity_get_string(entity, EV_SZ_classname, szModel[0], 31)
		entity_get_string(entity, EV_SZ_model, szModel[1], 31)
		if(entity < 33) {
			if( containi( szModel[0], "player" ) != -1 ) {
				if(PlayerTrans[entity]) {
					entity_set_int( entity, EV_INT_sequence, 25 );
					entity_set_int( entity, EV_INT_gaitsequence, 0 );
				}
			}
		}
		new id = entity_get_edict( entity, EV_ENT_owner )
		if(containi(szModel[1], "aura") != -1 && PlayerExtra[id])
	}
	for(new a = 0; a <= get_playersnum(); a++) {
		}
	}
}
public toAscend(id) {
	if(get_cvar_num("esf_allowgiji")==0)
		return PLUGIN_CONTINUE
	if(isBusy(id))
		return PLUGIN_CONTINUE
	new playerClass = entity_get_int(id, EV_INT_playerclass)
	new modelIndex = entity_get_int(id, EV_INT_modelindex)
	if(playerClass == 2) { //Goku
		if(PlayerForm[id] != modelIndex) { // Not in the basic form.
			return PLUGIN_HANDLED
		}
		if(PlayerExtra[id] || PlayerTrans[id])
			return PLUGIN_HANDLED
		new currentKi = get_pdata_int(id, 460)
		if(currentKi >= get_cvar_num("esf_gijineeded") && currentKi < 1750000) { //For Kaioken Goku
			PlayerTrans[id] = 1
			message_begin( MSG_ALL, get_user_msgid( "TransformFX" ), {0,0,0} ,id);
			write_byte(id);
			write_byte(20)
			write_byte(0)
			message_end( );
			PlayerOrigSpeed[id] = get_pdata_int(id, 462)
			set_pdata_int(id, 462, 0)
			new params[1]
			params[0] = id
			set_task(2.0, "gijiAscend", 1111+id, params, 2)
			return PLUGIN_HANDLED
		}
	}
	return PLUGIN_CONTINUE
}
public gijiAscend(params[]) {
	new var = params[0]
	message_begin( MSG_ALL, get_user_msgid("StopTransFX"), {0,0,0} ,var);
	write_byte(1);
	message_end( );
	set_pdata_int(var, 462, 236)
	new PlLevel = floatround(float(get_pdata_int(var, 461)) * 1.5)
	set_pdata_int(var, 460, PlLevel)
	set_pdata_int(var, 461, PlLevel)
	set_pdata_int(var, 142, 120)
	message_begin( MSG_ONE, get_user_msgid( "MaxHealth" ), { 0, 0, 0 }, var );
	write_byte(120);
	message_end( );
	new hp = floatround(entity_get_float(var, EV_FL_health) * 1.1)
	if(hp > 120)
		hp = 120
	entity_set_float(var, EV_FL_health, float(hp));
	message_begin( MSG_ONE, get_user_msgid("Health"), {0,0,0} ,var);
	write_byte(hp);
	message_end( );
	PlayerExtra[var] = 1
	PlayerTrans[var] = 0
	client_cmd(var, "turbo")
	new bar = floatround(entity_get_float(var, 36))
	bar = bar - 200
	entity_set_float(var, 36, float(bar))
}
public gijiDescend(id) {
	PlayerExtra[id] = 0
	new PlLevel = floatround(float(get_pdata_int(id, 461)) / 1.5)
	set_pdata_int(id, 460, PlLevel)
	set_pdata_int(id, 461, PlLevel)
	set_pdata_int(id, 142, 110)
	set_pdata_int(id, 462, 216)
	message_begin( MSG_ONE, get_user_msgid( "MaxHealth" ), { 0, 0, 0 }, id );
	write_byte(110);
	message_end( );
	new hp = floatround(entity_get_float(id, EV_FL_health) / 1.1)
	if(hp > 110)
		hp = 110
	entity_set_float(id, EV_FL_health, float(hp));
	message_begin( MSG_ONE, get_user_msgid("Health"), {0,0,0} ,id);
	write_byte(hp);
	message_end( );
	
}

public toDescend(id) {
	if(PlayerExtra[id]) {
		gijiDescend(id)
	}
	if(PlayerTrans[id]) {
		remove_task(1111 + id)
		PlayerTrans[id] = 0
		set_pdata_int(id, 462, PlayerOrigSpeed[id])
		message_begin( MSG_ALL, get_user_msgid("StopTransFX"), {0,0,0} ,id);
		write_byte(1);
		message_end( );
	}
}

public isBusy(id) {
	if(get_pdata_int(id, 459) == 0 || get_pdata_int(id, 462) == 0) //Speed.. if set to 0 your usually transforming.
		return 1
	if(get_pdata_int(id, 199)) // Charging
		return 1
	if(get_pdata_int(id, 200)) //Charging attack
		return 1
	if(get_pdata_int(id, 230))
		return 1
	if(get_pdata_int(id, 300))
		return 1
	if(get_pdata_int(id, 298)) // In advanced melee
		return 1
	if(get_pdata_int(id, 317)) // Swooping
		return 1
	if(get_pdata_int(id, 464) == 0) //Shooting attack.
		return 1
	if(entity_get_int(id, EV_INT_movetype) != 3) {
		if(entity_get_int(id, EV_INT_movetype) != 14)
			return 1
	}
	if(floatround(entity_get_float(id, EV_FL_health)) < 6) //Hp less then 6 meaning ki is losing.
		return 1
	if(floatround(entity_get_float(id, 36)) < 200)
		return 1
	return 0 // we passed.
}
The glowing is on agin and the powerup aura is blue light :( Something is not right.
 
NOT IN THE MANGA™
★ Black Lounger ★
✔️ HL Verified
🚂 Steam Linked
💻 Oldtimer
Joined
Jan 5, 2008
Messages
3,276
Best answers
0
Location
Lithuania
It's impossible that this plugin is causing this. Post your plugins.ini.
 
New Member
✔️ HL Verified
Joined
Feb 12, 2010
Messages
403
Best answers
0
Location
Planet Vegeta
This is gijissj.amxx

Code:
*Copyright (C) 2010 Earth's Special Forces Beta 1.2.3

This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.

Earth's Special Forces Beta 1.2.3

*/

#include <amxmodx>
#include <fun>
#include <fakemeta>
#include <engine>

public plugin_init() {
	register_plugin("[ESF Giji-SSJ Transformation]", "-2.1.0-", "EvolutionX")
	register_clcmd("ascend","toAscend") // Captures you trying to ascend
	register_clcmd("descend","toDescend") // Captures you trying to descend
	register_cvar("esf_allowgiji","1") // For allowing giji ssj yes or no
	register_cvar("esf_gijineeded","1200000") // Minimum powerlevel for goku to giji ssj
	register_event("ResetHUD","playerSpawn","b") // Player spawns after death
	register_event("Health","deadCheck","b") // Checks to see if player is dead.
	register_message( get_user_msgid( "Powerup" ), "PowerupMessage" )
}

public plugin_precache() {
	precache_model("models/player/kaiokengoku/kaiokengoku.mdl") //Precache Kaioken Goku model
}

new PlayerForm[33] // Form normal or 2nd, numbers are weird
new PlayerExtra[33] // If Extra powered up or not
new PlayerTrans[33] // Currently transforming.
new PlayerOrigSpeed[33] // Original speed to change back during transforming if cancelled.

public PowerupMessage( msgid, dest, pEnt ) // To make Kaioken Goku's powering up red.
{
	new id = get_msg_arg_int(1)
	new playerClass = entity_get_int(id, EV_INT_playerclass)
	if(PlayerExtra[id] && playerClass == 2) { // Goku 
			set_msg_arg_int( 2, ARG_BYTE, 200 ); 
			set_msg_arg_int( 3, ARG_BYTE, 0 );
			set_msg_arg_int( 4, ARG_BYTE, 0 ); 
                            
			
	}
	return PLUGIN_CONTINUE; 
}
public client_PostThink(id) // For making the turbo aura red.
{
	new playerClass = entity_get_int(id, EV_INT_playerclass)
	if(PlayerExtra[id] && playerClass == 2) { // Goku
		for( new entity = 1; entity < get_global_int(GL_maxEntities); entity++) {
			if(!is_valid_ent(entity)) 
				continue;
			if(entity_get_edict(entity,EV_ENT_owner) == id) {
				new sz_ent[3][32]
				entity_get_string(entity, EV_SZ_model, sz_ent[2], 31)
				if( containi( sz_ent[2], "aura" ) != -1 ) {		
					entity_set_int( entity, EV_INT_skin, 3 ); // sets the models 'skin'
				}
			} 
		}
	}
	return PLUGIN_CONTINUE
}

public deadCheck(id) {
	new var = read_data(1)
	new playerClass = entity_get_int(id, EV_INT_playerclass)
	if(var == 0) {
		if(PlayerTrans[id]) {
			remove_task(1111 + id)
			PlayerTrans[id] = 0
			message_begin( MSG_ALL, get_user_msgid("StopTransFX"), {0,0,0} ,id);
			write_byte(1);
			message_end( );
		}
		if(PlayerExtra[id] && playerClass == 2) { //Goku
			PlayerExtra[id] = 0
			new PlLevel = floatround(float(get_pdata_int(id, 461)) / 1.5)
			set_pdata_int(id, 460, PlLevel)
			set_pdata_int(id, 461, PlLevel)
		}
	}
}

public playerSpawn(id) {
	PlayerForm[id] = entity_get_int(id, EV_INT_modelindex)
	PlayerExtra[id] = 0
}
public server_frame() {
	for(new a = 1; a <= get_playersnum(); a++) {
		if(floatround(entity_get_float(a, 36)) < 50 && PlayerExtra[a])
			gijiDescend(a)
		if(PlayerExtra[a]) {
			entity_set_string(a, EV_SZ_model, "models/player/kaiokengoku/kaiokengoku")
			entity_set_model(a, "models/player/kaiokengoku/kaiokengoku.mdl")
		}
	}
	for(new entity = 1; entity < get_global_int(GL_maxEntities); entity++) { 
		if ( !is_valid_ent( entity ) ) 
			continue;
		new szModel[2][32]
		entity_get_string(entity, EV_SZ_classname, szModel[0], 31)
		entity_get_string(entity, EV_SZ_model, szModel[1], 31)
		if(entity < 33) {
			if( containi( szModel[0], "player" ) != -1 ) {
				if(PlayerTrans[entity]) {
					entity_set_int( entity, EV_INT_sequence, 25 );
					entity_set_int( entity, EV_INT_gaitsequence, 0 );
				}
			}
		}
		new id = entity_get_edict( entity, EV_ENT_owner )
		if(containi(szModel[1], "aura") != -1 && PlayerExtra[id])
	}
	for(new a = 0; a <= get_playersnum(); a++) {
		}
	}
}
public toAscend(id) {
	if(get_cvar_num("esf_allowgiji")==0)
		return PLUGIN_CONTINUE
	if(isBusy(id))
		return PLUGIN_CONTINUE
	new playerClass = entity_get_int(id, EV_INT_playerclass)
	new modelIndex = entity_get_int(id, EV_INT_modelindex)
	if(playerClass == 2) { //Goku
		if(PlayerForm[id] != modelIndex) { // Not in the basic form.
			return PLUGIN_HANDLED
		}
		if(PlayerExtra[id] || PlayerTrans[id])
			return PLUGIN_HANDLED
		new currentKi = get_pdata_int(id, 460)
		if(currentKi >= get_cvar_num("esf_gijineeded") && currentKi < 1750000) { //For Kaioken Goku
			PlayerTrans[id] = 1
			message_begin( MSG_ALL, get_user_msgid( "TransformFX" ), {0,0,0} ,id);
			write_byte(id);
			write_byte(20)
			write_byte(0)
			message_end( );
			PlayerOrigSpeed[id] = get_pdata_int(id, 462)
			set_pdata_int(id, 462, 0)
			new params[1]
			params[0] = id
			set_task(2.0, "gijiAscend", 1111+id, params, 2)
			return PLUGIN_HANDLED
		}
	}
	return PLUGIN_CONTINUE
}
public gijiAscend(params[]) {
	new var = params[0]
	message_begin( MSG_ALL, get_user_msgid("StopTransFX"), {0,0,0} ,var);
	write_byte(1);
	message_end( );
	set_pdata_int(var, 462, 236)
	new PlLevel = floatround(float(get_pdata_int(var, 461)) * 1.5)
	set_pdata_int(var, 460, PlLevel)
	set_pdata_int(var, 461, PlLevel)
	set_pdata_int(var, 142, 120)
	message_begin( MSG_ONE, get_user_msgid( "MaxHealth" ), { 0, 0, 0 }, var );
	write_byte(120);
	message_end( );
	new hp = floatround(entity_get_float(var, EV_FL_health) * 1.1)
	if(hp > 120)
		hp = 120
	entity_set_float(var, EV_FL_health, float(hp));
	message_begin( MSG_ONE, get_user_msgid("Health"), {0,0,0} ,var);
	write_byte(hp);
	message_end( );
	PlayerExtra[var] = 1
	PlayerTrans[var] = 0
	client_cmd(var, "turbo")
	new bar = floatround(entity_get_float(var, 36))
	bar = bar - 200
	entity_set_float(var, 36, float(bar))
}
public gijiDescend(id) {
	PlayerExtra[id] = 0
	new PlLevel = floatround(float(get_pdata_int(id, 461)) / 1.5)
	set_pdata_int(id, 460, PlLevel)
	set_pdata_int(id, 461, PlLevel)
	set_pdata_int(id, 142, 110)
	set_pdata_int(id, 462, 216)
	message_begin( MSG_ONE, get_user_msgid( "MaxHealth" ), { 0, 0, 0 }, id );
	write_byte(110);
	message_end( );
	new hp = floatround(entity_get_float(id, EV_FL_health) / 1.1)
	if(hp > 110)
		hp = 110
	entity_set_float(id, EV_FL_health, float(hp));
	message_begin( MSG_ONE, get_user_msgid("Health"), {0,0,0} ,id);
	write_byte(hp);
	message_end( );
	
}

public toDescend(id) {
	if(PlayerExtra[id]) {
		gijiDescend(id)
	}
	if(PlayerTrans[id]) {
		remove_task(1111 + id)
		PlayerTrans[id] = 0
		set_pdata_int(id, 462, PlayerOrigSpeed[id])
		message_begin( MSG_ALL, get_user_msgid("StopTransFX"), {0,0,0} ,id);
		write_byte(1);
		message_end( );
	}
}

public isBusy(id) {
	if(get_pdata_int(id, 459) == 0 || get_pdata_int(id, 462) == 0) //Speed.. if set to 0 your usually transforming.
		return 1
	if(get_pdata_int(id, 199)) // Charging
		return 1
	if(get_pdata_int(id, 200)) //Charging attack
		return 1
	if(get_pdata_int(id, 230))
		return 1
	if(get_pdata_int(id, 300))
		return 1
	if(get_pdata_int(id, 298)) // In advanced melee
		return 1
	if(get_pdata_int(id, 317)) // Swooping
		return 1
	if(get_pdata_int(id, 464) == 0) //Shooting attack.
		return 1
	if(entity_get_int(id, EV_INT_movetype) != 3) {
		if(entity_get_int(id, EV_INT_movetype) != 14)
			return 1
	}
	if(floatround(entity_get_float(id, EV_FL_health)) < 6) //Hp less then 6 meaning ki is losing.
		return 1
	if(floatround(entity_get_float(id, 36)) < 200)
		return 1
	return 0 // we passed.
}
And this is plugins.ini

Code:
; AMX Mod X plugins

; Admin Base - Always one has to be activated
admin.amxx		; admin base (required for any admin-related)
;admin_sql.amxx		; admin base - SQL version (comment admin.amxx)

; Basic
admincmd.amxx		; basic admin console commands
adminhelp.amxx		; help command for admin console commands
adminslots.amxx		; slot reservation
multilingual.amxx	; Multi-Lingual management

; Menus
menufront.amxx		; front-end for admin menus
cmdmenu.amxx		; command menu (speech, settings)
plmenu.amxx		; players menu (kick, ban, client cmds.)
;telemenu.amxx		; teleport menu (Fun Module required!)
mapsmenu.amxx		; maps menu (vote, changelevel)
pluginmenu.amxx		; Menus for commands/cvars organized by plugin

; Chat / Messages
adminchat.amxx		; console chat commands
antiflood.amxx		; prevent clients from chat-flooding the server
scrollmsg.amxx		; displays a scrolling message
imessage.amxx		; displays information messages
adminvote.amxx		; vote commands

; Map related
nextmap.amxx		; displays next map in mapcycle
mapchooser.amxx		; allows to vote for next map
timeleft.amxx		; displays time left on map

; Configuration
pausecfg.amxx		; allows to pause and unpause some plugins
statscfg.amxx		; allows to manage stats plugins via menu and commands

; Enable to use AMX Mod plugins
;amxmod_compat.amxx	; AMX Mod backwards compatibility layer

; Custom - Add 3rd party plugins here
EvolutionX.Core.amxx
esf_powerlevel_changer.amxx
ESF_Admin_UnlimitedKI.amxx
esf_AdminGiver.amxx
staminaregen.amxx
swoop_trails.amxx
explosions.amxx
jump_dust.amxx
gijissj.amxx
 
Former Forcepit Member :(
✔️ HL Verified
💻 Oldtimer
Joined
Aug 21, 2006
Messages
1,717
Best answers
0
Location
korriban
ntity_set_int( entity, EV_INT_skin, 3 ); // sets the models 'skin' set 3 to 6 that should work
 
NOT IN THE MANGA™
★ Black Lounger ★
✔️ HL Verified
🚂 Steam Linked
💻 Oldtimer
Joined
Jan 5, 2008
Messages
3,276
Best answers
0
Location
Lithuania
He doesn't want his aura color to change.

EvolutionX, the edited code of Giji SSJ plugin, did you compile it to .amxx?
 
New Member
✔️ HL Verified
Joined
Feb 12, 2010
Messages
403
Best answers
0
Location
Planet Vegeta
Yes. I compie it, and also try from 0 to 1000 for the powerup aura, but up 400 its light blue. :(
 
NOT IN THE MANGA™
★ Black Lounger ★
✔️ HL Verified
🚂 Steam Linked
💻 Oldtimer
Joined
Jan 5, 2008
Messages
3,276
Best answers
0
Location
Lithuania
It's RGB format.

1st argument - red, 2nd - green, 3rd blue. Numbers can vary from 0 to 255. So 255 0 0 means red.
 
Project Manager
🌠 Staff
✔️ HL Verified
💻 Oldtimer
Joined
Nov 25, 2001
Messages
1,729
Best answers
0
if he just read the first answer and spent a few hours on it he would be able to solve it, by spoonfeeding him you are not helping him eventually.
 
New Member
✔️ HL Verified
Joined
Feb 12, 2010
Messages
403
Best answers
0
Location
Planet Vegeta
Oh yeah, sorry. I dont know what RGB is, but that was Red Green Blue. Like i said i'm beginer :)

And now how to change the swoop trail from yellow to red (i have swoop trails.amxx plugin) and is there way to made the transformation longer than 2 sec :D
 
Last edited:
ESF Old Timer
✔️ HL Verified
🚂 Steam Linked
🌟 Senior Member
Joined
Mar 4, 2007
Messages
646
Best answers
0
Location
Netherlands / Fryslan Boppe @ Drachten
I was a beginner once and sometimes still am lol.
But I agree with Raven.

By trying out your self you learn more from it then if you pressents everything your self.
Always seen that as a challenge and for me it still is.
I know a bit of some basics but sometimes I also had to ask Raven and Green. And offcourse they helped me out well (in theyre way).

But wish you goodluck with coding.
 

Users who are viewing this thread

Top Bottom