New Member
✔️ HL Verified
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
And also need how to delete the glowing!
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.
}
Last edited by a moderator: