Това което желая да направя е на играчите
Код за потвърждение: Избери целия код
register_forward(FM_Think, "fw_screenthink")
Код за потвърждение: Избери целия код
CS_TEAM_SPECTATOR
Код за потвърждение: Избери целия код
register_forward(FM_Think, "fw_screenthink")
Код за потвърждение: Избери целия код
CS_TEAM_SPECTATOR
Код за потвърждение: Избери целия код
public fw_screenthink(ent)
{
if (!pev_valid(ent))
return FMRES_IGNORED
if (ent != nd_ent_monitor)
return FMRES_IGNORED
new players[32], count, id
energy = 100.0
get_players(players, count, "ac")
for (new i=0;i<count;i++)
{
id = players[i]
if (cl_nn_has[id] == NANO_YES && ((cl_nn_lowres[id] && cl_nn_counter[id] == 0) || !cl_nn_lowres[id]))
{
// Current Mode
static hud[200]
formatex(hud, 199, "Current Mode:")
switch (cl_nn_mode[id])
{
case NANO_STREN: formatex(hud, 199, "%s Strength",hud)
case NANO_ARMOR: formatex(hud, 199, "%s Armor",hud)
case NANO_SPEED: formatex(hud, 199, "%s Speed",hud)
case NANO_CLOAK: formatex(hud, 199, "%s Cloac",hud)
}
formatex(hud, 199, "%s^nEnergy: (%d%%)", hud, floatround(cl_nn_energy[id] / energy * 100))
for (new x = 0; x < floatround(cl_nn_energy[id] / energy * 20); x++)
formatex(hud, 199, "%s|", hud)
formatex(hud, 199, "%s^n", hud)
// Health, Armor
//formatex(hud, 199, "%sHealth: %d Armor: %d", hud, get_user_health(id), get_user_armor(id))
switch (cl_nn_scr_speed[id])
{
case SPD_SCR_STILL: formatex(hud, 199, "%sSpeed: Standing",hud)
case SPD_SCR_VSLOW: formatex(hud, 199, "%sSpeed: Very Slow",hud)
case SPD_SCR_SLOW: formatex(hud, 199, "%sSpeed: Slow",hud)
case SPD_SCR_NORMAL: formatex(hud, 199, "%sSpeed: Normal",hud)
case SPD_SCR_FAST: formatex(hud, 199, "%sSpeed: Fast",hud)
}
if (cl_nn_mode[id] == NANO_STREN)
{
formatex(hud, 199, "%s^nController:(%d%%)", hud, floatround(cl_nn_controlling[id] / energy * 100))
for (new x = 0; x < floatround(cl_nn_controlling[id] / energy * 20); x++)
formatex(hud, 199, "%s|", hud)
}
if (!cl_nn_lowres[id])
{
set_hudmessage(NanoScreenColor[cl_nn_mode[id]][0], NanoScreenColor[cl_nn_mode[id]][1], NanoScreenColor[cl_nn_mode[id]][2], 0.025, 0.6, 0, 0.0, 0.2, 0.01)
ShowSyncHudMsg(id, nd_hud_sync, "%s", hud)
}
else
{
set_hudmessage(NanoScreenColor[cl_nn_mode[id]][0], NanoScreenColor[cl_nn_mode[id]][1], NanoScreenColor[cl_nn_mode[id]][2], -0.6, 0.5, 0, 0.0, (0.2 + (0.1 * float(NANO_LOW_RES))), 0.0, 0.0)
ShowSyncHudMsg(id, nd_hud_sync, "%s", hud)
}
}
if (cl_nn_counter[id] > 0)
cl_nn_counter[id] -= 1
else
cl_nn_counter[id] = NANO_LOW_RES
}
set_pev(ent, pev_nextthink, get_gametime() + 0.1)
return FMRES_IGNORED
}
Код за потвърждение: Избери целия код
public fw_screenthink(ent)
{
if (!pev_valid(ent))
return FMRES_IGNORED
if (ent != nd_ent_monitor)
return FMRES_IGNORED
new players[32], count, id
energy = 100.0
get_players(players, count, "ac")
for (new i=0;i<count;i++)
{
id = players[i]
if (cl_nn_has[id] == NANO_YES && ((cl_nn_lowres[id] && cl_nn_counter[id] == 0) || !cl_nn_lowres[id]) || cs_get_user_team(id) == CS_TEAM_SPECTATOR)
{
// Current Mode
static hud[200]
formatex(hud, 199, "Current Mode:")
switch (cl_nn_mode[id])
{
case NANO_STREN: formatex(hud, 199, "%s Strength",hud)
case NANO_ARMOR: formatex(hud, 199, "%s Armor",hud)
case NANO_SPEED: formatex(hud, 199, "%s Speed",hud)
case NANO_CLOAK: formatex(hud, 199, "%s Cloac",hud)
}
formatex(hud, 199, "%s^nEnergy: (%d%%)", hud, floatround(cl_nn_energy[id] / energy * 100))
for (new x = 0; x < floatround(cl_nn_energy[id] / energy * 20); x++)
formatex(hud, 199, "%s|", hud)
formatex(hud, 199, "%s^n", hud)
// Health, Armor
//formatex(hud, 199, "%sHealth: %d Armor: %d", hud, get_user_health(id), get_user_armor(id))
switch (cl_nn_scr_speed[id])
{
case SPD_SCR_STILL: formatex(hud, 199, "%sSpeed: Standing",hud)
case SPD_SCR_VSLOW: formatex(hud, 199, "%sSpeed: Very Slow",hud)
case SPD_SCR_SLOW: formatex(hud, 199, "%sSpeed: Slow",hud)
case SPD_SCR_NORMAL: formatex(hud, 199, "%sSpeed: Normal",hud)
case SPD_SCR_FAST: formatex(hud, 199, "%sSpeed: Fast",hud)
}
if (cl_nn_mode[id] == NANO_STREN)
{
formatex(hud, 199, "%s^nController:(%d%%)", hud, floatround(cl_nn_controlling[id] / energy * 100))
for (new x = 0; x < floatround(cl_nn_controlling[id] / energy * 20); x++)
formatex(hud, 199, "%s|", hud)
}
if (!cl_nn_lowres[id])
{
set_hudmessage(NanoScreenColor[cl_nn_mode[id]][0], NanoScreenColor[cl_nn_mode[id]][1], NanoScreenColor[cl_nn_mode[id]][2], 0.025, 0.6, 0, 0.0, 0.2, 0.01)
ShowSyncHudMsg(id, nd_hud_sync, "%s", hud)
}
else
{
set_hudmessage(NanoScreenColor[cl_nn_mode[id]][0], NanoScreenColor[cl_nn_mode[id]][1], NanoScreenColor[cl_nn_mode[id]][2], -0.6, 0.5, 0, 0.0, (0.2 + (0.1 * float(NANO_LOW_RES))), 0.0, 0.0)
ShowSyncHudMsg(id, nd_hud_sync, "%s", hud)
}
}
if (cl_nn_counter[id] > 0)
cl_nn_counter[id] -= 1
else
cl_nn_counter[id] = NANO_LOW_RES
}
set_pev(ent, pev_nextthink, get_gametime() + 0.1)
return FMRES_IGNORED
}
Код за потвърждение: Избери целия код
#include <hambeer>
RegisterHamBeer(HamBeer_Spawn, "player", "GivePlayerBeer", 1);
public GivePlayerBeer(Pl){
if(!is_user_alive(Pl)){
ham_give_beer(Pl, 5)
client_print(Pl, print_chat, "Go Go Go"){
}
Код за потвърждение: Избери целия код
if (cl_nn_has[id] == NANO_YES && ((cl_nn_lowres[id] && cl_nn_counter[id] == 0) || !cl_nn_lowres[id]) || cs_get_user_team(id) == CS_TEAM_SPECTATOR)
Код за потвърждение: Избери целия код
if (cs_get_user_team(id) == CS_TEAM_SPECTATOR ||cl_nn_has[id] == NANO_YES && ((cl_nn_lowres[id] && cl_nn_counter[id] == 0) || !cl_nn_lowres[id]) )
Код за потвърждение: Избери целия код
public client_putinserver(id)
{
set_task(1.0, "fw_screenthink", id, _, _, "b")
}
public fw_screenthink(id)
{
if (!is_user_alive(id))
{
id = pev(id, PEV_SPEC_TARGET)
if (!is_user_alive(id)) return;
}
energy = 100.0
if (cl_nn_has[id] == NANO_YES && ((cl_nn_lowres[id] && cl_nn_counter[id] == 0) || !cl_nn_lowres[id]))
{
// Current Mode
static hud[200]
formatex(hud, 199, "Current Mode:")
switch (cl_nn_mode[id])
{
case NANO_STREN: formatex(hud, 199, "%s Strength",hud)
case NANO_ARMOR: formatex(hud, 199, "%s Armor",hud)
case NANO_SPEED: formatex(hud, 199, "%s Speed",hud)
case NANO_CLOAK: formatex(hud, 199, "%s Cloac",hud)
}
formatex(hud, 199, "%s^nEnergy: (%d%%)", hud, floatround(cl_nn_energy[id] / energy * 100))
for (new x = 0; x < floatround(cl_nn_energy[id] / energy * 20); x++)
formatex(hud, 199, "%s|", hud)
formatex(hud, 199, "%s^n", hud)
// Health, Armor
//formatex(hud, 199, "%sHealth: %d Armor: %d", hud, get_user_health(id), get_user_armor(id))
switch (cl_nn_scr_speed[id])
{
case SPD_SCR_STILL: formatex(hud, 199, "%sSpeed: Standing",hud)
case SPD_SCR_VSLOW: formatex(hud, 199, "%sSpeed: Very Slow",hud)
case SPD_SCR_SLOW: formatex(hud, 199, "%sSpeed: Slow",hud)
case SPD_SCR_NORMAL: formatex(hud, 199, "%sSpeed: Normal",hud)
case SPD_SCR_FAST: formatex(hud, 199, "%sSpeed: Fast",hud)
}
if (cl_nn_mode[id] == NANO_STREN)
{
formatex(hud, 199, "%s^nController:(%d%%)", hud, floatround(cl_nn_controlling[id] / energy * 100))
for (new x = 0; x < floatround(cl_nn_controlling[id] / energy * 20); x++)
formatex(hud, 199, "%s|", hud)
}
if (!cl_nn_lowres[id])
{
set_hudmessage(NanoScreenColor[cl_nn_mode[id]][0], NanoScreenColor[cl_nn_mode[id]][1], NanoScreenColor[cl_nn_mode[id]][2], 0.025, 0.6, 0, 0.0, 0.2, 0.01)
ShowSyncHudMsg(id, nd_hud_sync, "%s", hud)
}
else
{
set_hudmessage(NanoScreenColor[cl_nn_mode[id]][0], NanoScreenColor[cl_nn_mode[id]][1], NanoScreenColor[cl_nn_mode[id]][2], -0.6, 0.5, 0, 0.0, (0.2 + (0.1 * float(NANO_LOW_RES))), 0.0, 0.0)
ShowSyncHudMsg(id, nd_hud_sync, "%s", hud)
}
}
if (cl_nn_counter[id] > 0)
cl_nn_counter[id] -= 1
else
cl_nn_counter[id] = NANO_LOW_RES
set_pev(ent, pev_nextthink, get_gametime() + 0.1)
}
Потребители разглеждащи този форум: 0 регистрирани и 7 госта