Existing user? Sign in
Sign up
Games
Servers
Useful
User
Pass
2FA
[PLUGIN] Advanced Fog With Menu [New] [EDIT2] [Final Version]
Freakz Forum Index
->
Trash Bin
->
CS 2006-2019 (Archived)
->
Plugins
Author
Message
1746
ZPLegendary
[Mentally Stable]
Status: Offline
(since 03-10-2019 20:59)
Joined: 13 Jan 2017
Posts: 142
,
Topics: 7
Location:
Polovragi, GJ
Reputation:
15.4
Votes
: 17
Posted: 27-04-2017, 00:59:00
| Translate post to:
... (
Click for more languages
)
EDIT: COD IMBUNATATIT
EDIT2: COD ACTUALIZAT
► Nume Subiect:
[PLUGIN]
Advanced Fog New + Menu
► Nume Plugin:
Fog System
► Descriere:
Acest Plugin contine un meniu pentru ceata din care puteti sa setati densitatea cetei si culoarea acesteia. Nu trebuie schimbata harta ca setarile sa fie aplicate.
► Pentru mod:
Orice
► Info:
Meniul se deschide folosind comanda
/fog
in chat.
► Instalare:
Compilati codul dupa care puneti fisierul compilat .amxx in folderul plugins apoi il treceti in plugins.ini din folderul configs.
► Descarcare:
Spoiler:
Code:
#include amxmodx
#include amxmisc
#include amxconst
#include colorchat
new const FogDensity[] = { 0, 0, 0, 0, 111, 18, 3, 58, 111, 18, 125, 58, 66, 96, 27, 59, 90, 101, 60, 59, 90,
101, 68, 59, 10, 41, 95, 59, 111, 18, 125, 59, 111, 18, 3, 60, 68, 116, 19, 60 }
new const TASK_FOG = 5942
new RGB[3];
new CVAR[2];
public plugin_init() {
register_plugin("Fog System", "1.2", "Legendary")
register_menu("Fog System", (1<<0|1<<1|1<<2|1<<3|1<<9), "Settings");
register_clcmd("say /fog", "FogSystem", _, "- Setari Ceata");
register_clcmd("say_team /fog", "FogSystem", _, "- Setari Ceata");
CVAR[0] = register_cvar("enable_fog", "1")
CVAR[1] = register_cvar("fog_density", "1")
RGB[0] = 155
RGB[1] = 155
RGB[2] = 155
if(get_pcvar_num(CVAR[0]) == 1)
{
remove_task(TASK_FOG)
set_task(0.1, "TaskFog", TASK_FOG, _, _, "b")
}
}
public FogSystem(id) {
if(!(get_user_flags(id) & ADMIN_CHAT))
return PLUGIN_HANDLED;
new menu[512], len;
len += formatex(menu[len], 511-len, "\y-= \w[ \rFog Settings \w] \y=-^n^n")
len += formatex(menu[len], 511-len, "\r1. \wFog Status \r[%s]^n", get_pcvar_num(CVAR[0]) == 1 ? "ON" : "OFF");
if(get_pcvar_num(CVAR[0]) == 1)
{
len += formatex(menu[len], 511-len, "\r2. \wFog Density \r[%s]^n", get_pcvar_num(CVAR[1]) == 1 ? "Normal" : "High");
len += formatex(menu[len], 511-len, "\r3. \wFog Color \r[RANDOM]^n");
}
else
{
len += formatex(menu[len], 511-len, "\r2. \dFog Density \r[%s]^n", get_pcvar_num(CVAR[1]) == 1 ? "Normal" : "High");
len += formatex(menu[len], 511-len, "\r3. \dFog Color \r[RANDOM]^n");
}
len += formatex(menu[len], 511 - len, "\r4. Reset Settings")
len += formatex(menu[len], 511 - len, "^n^n\r0. \yAnulare")
show_menu(id, (1<<0|1<<1|1<<2|1<<3|1<<9), menu, -1, "Fog System")
}
public Settings(id, key)
{
new name[32];
get_user_name(id, name, 31)
switch (key)
{
case 0:
{
if(get_pcvar_num(CVAR[0]) == 1)
{
ColorChat(0, RED, "^4[Fog System] ^3Adminul^4 %s ^3a ^4dezactivat^3 ceata.", name)
set_pcvar_num(CVAR[0], 0)
FogSystem()(id)
TaskFog()
}
else
{
ColorChat(0, RED, "^4[Fog System] ^3Adminul^4 %s ^3a ^4activat^3 ceata.", name)
set_pcvar_num(CVAR[0], 1)
FogSystem()(id)
TaskFog()
}
}
case 1:
{
if(get_pcvar_num(CVAR[0]) == 1)
{
if(get_pcvar_num(CVAR[1]) == 1)
{
ColorChat(0, RED, "^4[Fog System] ^3Adminul^4 %s ^3a marit ^4densitatea ^3cetei.", name)
set_pcvar_num(CVAR[1], 2)
FogSystem()(id)
TaskFog()
}
else
{
ColorChat(0, RED, "^4[Fog System] ^3Adminul^4 %s ^3a micit ^4densitatea ^3cetei.", name)
set_pcvar_num(CVAR[1], 1)
FogSystem()(id)
TaskFog()
}
}
else
{
ColorChat(id, RED, "^4[Fog System] ^3Ceata este ^4dezactivata^3, nu-i poti schimba ^4densitatea^3.")
FogSystem()(id)
}
}
case 2:
{
if(get_pcvar_num(CVAR[0]) == 1)
{
RGB[0] = random(256)
RGB[1] = random(256)
RGB[2] = random(256)
ColorChat(0, RED, "^4[Fog System] ^3Adminul^4 %s ^3a schimbat ^4culoarea ^3cetei.", name)
FogSystem()(id)
TaskFog()
}
else
{
ColorChat(id, RED, "^4[Fog System] ^3Ceata este ^4dezactivata^3, nu-i poti schimba ^4culoarea^3.")
FogSystem()(id)
}
}
case 3:
{
set_pcvar_num(CVAR[0], 1)
set_pcvar_num(CVAR[1], 1)
RGB[0] = 155
RGB[1] = 155
RGB[2] = 155
ColorChat(0, RED, "^4[Fog System] ^3Adminul^4 %s ^3a ^4resetat^3 setarile cetei.", name)
FogSystem()(id)
TaskFog()
}
}
return PLUGIN_CONTINUE;
}
public TaskFog() {
static density
density = (4 * get_pcvar_num(CVAR[1]))
if(get_pcvar_num(CVAR[0]) == 1) {
message_begin(MSG_ALL, get_user_msgid("Fog"), {0,0,0}, 0);
write_byte(RGB[0])
write_byte(RGB[1])
write_byte(RGB[2])
write_byte(FogDensity[density])
write_byte(FogDensity[density+1])
write_byte(FogDensity[density+2])
write_byte(FogDensity[density+3])
message_end();
}
else
{
message_begin(MSG_ALL, get_user_msgid("Fog"), {0,0,0}, 0);
write_byte(0);
write_byte(0);
write_byte(0);
write_byte(0);
write_byte(0);
write_byte(0);
write_byte(0);
message_end();
}
return PLUGIN_CONTINUE;
}
public TaskFog() {
static density
density = (4 * get_pcvar_num(CVAR[1]))
if(get_pcvar_num(CVAR[0]) == 1) {
message_begin(MSG_ALL, get_user_msgid("Fog"), {0,0,0}, 0);
write_byte(RGB[0])
write_byte(RGB[1])
write_byte(RGB[2])
write_byte(FogDensity[density])
write_byte(FogDensity[density+1])
write_byte(FogDensity[density+2])
write_byte(FogDensity[density+3])
message_end();
}
else
{
message_begin(MSG_ALL, get_user_msgid("Fog"), {0,0,0}, 0);
write_byte(0);
write_byte(0);
write_byte(0);
write_byte(0);
write_byte(0);
write_byte(0);
write_byte(0);
message_end();
}
return PLUGIN_CONTINUE;
}
► Poze:
► Alte mentiuni:
Momentan, doar adminii cu flagul
"i"
pot sa intre in meniu.
Pluginul este scris in proportie de 100% de mine, chiar in noaptea asta l-am inceput si terminat, pentru ca aveam eu nevoie de el.
Cine doreste sa ma acuze de ceva sa vina cu dovezi ca sa nu-si raceasca gura degeaba.
Sper sa va fie de folos, pe internet nu mai este nimic asemanator.
Be the one, not anyone.
Currently working on Zombie Legendary 8.1
Last edited by
ZPLegendary
on 03-05-2017, 20:18:45; edited 2 times in total
0
0
Back to top
ZPLegendary
[Mentally Stable]
Status: Offline
(since 03-10-2019 20:59)
Joined: 13 Jan 2017
Posts: 142
,
Topics: 7
Location:
Polovragi, GJ
Reputation:
15.4
Votes
: 17
Posted: 29-04-2017, 18:16:00
| Translate post to:
... (
Click for more languages
)
BUMP
COD ACTUALIZAT
Be the one, not anyone.
Currently working on Zombie Legendary 8.1
0
0
Back to top
ZPLegendary
[Mentally Stable]
Status: Offline
(since 03-10-2019 20:59)
Joined: 13 Jan 2017
Posts: 142
,
Topics: 7
Location:
Polovragi, GJ
Reputation:
15.4
Votes
: 17
Posted: 03-05-2017, 20:18:24
| Translate post to:
... (
Click for more languages
)
COD ACTUALIZAT LA VERSIUNEA FINALA
Be the one, not anyone.
Currently working on Zombie Legendary 8.1
0
0
Back to top
Freakz Forum Index
->
Trash Bin
->
CS 2006-2019 (Archived)
->
Plugins
The time now is 10-01-2025, 17:15:35
Copyright info
Based on phpBB
ro
/
com
B
Login
I forgot my password
World of Warcraft
Login for more...
Download WoW 7.3.5
Misc
eSports
Achievements
Buy reputation with votes
Reputation trades
Forum rules
Ban list
Members list
User guide (FAQ)
World of Warcraft
View details