Post by ProGarD on Jul 26, 2023 20:29:41 GMT
Hello zppv.boards
I'm having a hard time doing this by myself 😁
Don't rush to judge bcs this is my first plugin that i start it from 0
===================Codes=========================
#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#include <fun>
//#include <hamsandwich>
#include <zp50_colorchat>
#define AUTHOR "Hn.S Xmix"
new bool: ShowMeThis[33]
public plugin_init()
{
register_clcmd( "say /glow", "glowoffon",ADMIN_SLAY,"bind [key] /glow")
}
//----------------------------------------------------------------
public glowoffon(id)
{
if( ShowMeThis[id])
{
ShowMeThis[id] = true
zp_colored_print( id, "Hud Info : Enable");
}
else
{
zp_colored_print( id, "Hud Info : Disable");
ShowMeThis[id] = false
}
}
//----------------------------------------------------------------
public cmdg_glow(id)
{
if( ShowMeThis[id] )
{
set_task(1.0, "cmdg_glow", id)
set_user_rendering(id, kRenderFxGlowShell, random_num(0,255), random_num(0,255), random_num(0,255), kRenderNormal, random_num(16,50) )
return PLUGIN_HANDLED
if(is_user_alive(id))
{
if(cs_get_user_team(id) == CS_TEAM_CT)
cmdg_off(id)
}
}
}
public cmdg_off(id)
{
if( ShowMeThis[id] )
{
set_task(0, "", id)
set_user_rendering( id, kRenderFxGlowShell, 0, 0, 0, kRenderTransAlpha, 255 )
return PLUGIN_HANDLED
}
}
I'm having a hard time doing this by myself 😁
Don't rush to judge bcs this is my first plugin that i start it from 0
Why this is not working i mean it shows that i enable and disable it but nothing happen
===================Codes=========================
#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#include <fun>
//#include <hamsandwich>
#include <zp50_colorchat>
#define PLUGIN "[ZP] Random Glow"
#define VERSION "1.0"#define AUTHOR "Hn.S Xmix"
new bool: ShowMeThis[33]
public plugin_init()
{
register_clcmd( "say /glow", "glowoffon",ADMIN_SLAY,"bind [key] /glow")
}
//----------------------------------------------------------------
public glowoffon(id)
{
if( ShowMeThis[id])
{
ShowMeThis[id] = true
zp_colored_print( id, "Hud Info : Enable");
}
else
{
zp_colored_print( id, "Hud Info : Disable");
ShowMeThis[id] = false
}
}
//----------------------------------------------------------------
public cmdg_glow(id)
{
if( ShowMeThis[id] )
{
set_task(1.0, "cmdg_glow", id)
set_user_rendering(id, kRenderFxGlowShell, random_num(0,255), random_num(0,255), random_num(0,255), kRenderNormal, random_num(16,50) )
return PLUGIN_HANDLED
if(is_user_alive(id))
{
if(cs_get_user_team(id) == CS_TEAM_CT)
cmdg_off(id)
}
}
}
public cmdg_off(id)
{
if( ShowMeThis[id] )
{
set_task(0, "", id)
set_user_rendering( id, kRenderFxGlowShell, 0, 0, 0, kRenderTransAlpha, 255 )
return PLUGIN_HANDLED
}
}