Vultr.com - Instant Cloud Server Deployment
Game Rank
Servers:
Teams:
Fans:
509899
Players:
20913
Forum Home > Counter Strike 1.6 Server Administration & Help > Help Fix Survivor Plugin please
infamous480048PM
#1
Help Fix Survivor Plugin please
Mar 04, 2017 3:29 AM
Joined: Feb 06, 2016
Posts: 29
Can anyone help me? Can now anyone fix it that it works only when Round is ended and the CT Player is not dead? mean =====>>>

Look. u are zombie i am CT. timeleft round 1 sec... round ended, i am not dead, new round starts -> show Survivor

#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#include <csx>
#include <engine>
#include <cstrike>
#include <fakemeta>
#include <fakemeta_util>
#include <hamsandwich>
#include <cstrike>

public plugin_init() {
register_plugin("Survovir Hud GodOfWar", "1.0", "Lamda")

set_task(0.5, "TASK_Health_HUD", _, _, _, "b")
}

public TASK_Health_HUD() {
static id
for(id = 1; id <= get_maxplayers(); id++) {
if(is_user_alive(id) && is_user_connected(id) && cs_get_user_team(id) == CS_TEAM_CT) {
new Message[128];
new Name[32]
get_user_name(id, Name, 31);
formatex(Message,sizeof(Message)-1,"Survivor %s", Name);
HudMessage(id, Message, 255, 0, 0, 0.02, 0.91, _, _, 0.5)
}
}
}

#define clamp_byte(%1) ( clamp( %1, 0, 255 ) )
#define pack_color(%1,%2,%3) ( %3 + ( %2 << 8 ) + ( %1 << 16 ) )

stock HudMessage(const id, const message[], red = 0, green = 160, blue = 0, Float:x = -1.0, Float:y = 0.65, effects = 2, Float:fxtime = 0.01, Float:holdtime = 3.0, Float:fadeintime = 0.01, Float:fadeouttime = 0.01) {
new count = 1, players[32];

if(id) players[0] = id;
else get_players(players, count, "ch"); {
for(new i = 0; i < count; i++) {
if(is_user_connected(players)) {
new color = pack_color(clamp_byte(red), clamp_byte(green), clamp_byte(blue))

message_begin(MSG_ONE_UNRELIABLE, SVC_DIRECTOR, _, players);
write_byte(strlen(message) + 31);
write_byte(DRC_CMD_MESSAGE);
write_byte(effects);
write_long(color);
write_long(_:x);
write_long(_:y);
write_long(_:fadeintime);
write_long(_:fadeouttime);
write_long(_:holdtime);
write_long(_:fxtime);
write_string(message);
message_end();
}
}
}
}