|
Member
Join Date: Mar 2010
Location: Romania
|

08-28-2013
, 13:29
Problem compiler
|
#1
|
Hello,
I joined these plugins and I give a small error when I want to copiller (but still they go copiller) but it gives me this error:
PHP Code:
Namnet1.sma(33) : warning 217: loose indentation Namnet1.sma(34) : warning 217: loose indentation Namnet1.sma(51) : warning 217: loose indentation Namnet1.sma(54) : warning 217: loose indentation
Plugins used
*Resetscore
PHP Code:
#include <amxmodx> #include <amxmisc> #include <cstrike> #include <fun>
#define adtime 600.0 //Default of 10 minuites
new pcvar_Advertise new pcvar_Display
public plugin_init() { register_plugin("Reset Score", "1.0", "Silenttt") //You may type /resetscore or /restartscore register_clcmd("say /resetscore", "reset_score") register_clcmd("say /restartscore", "reset_score") register_clcmd("say /reset", "reset_score") //This command by default will be set at 0 //Change it to 1 in server.cfg if you want //A message to be shown to advertise this. pcvar_Advertise = register_cvar("sv_rsadvertise", "0") //This command by default is also 0 //Change it to 1 in server.cfg if you want //It to show who reset their scores when they do it pcvar_Display = register_cvar("sv_rsdisplay", "0") if(get_cvar_num("sv_rsadvertise") == 1) { set_task(adtime, "advertise", _, _, _, "b") } }
public reset_score(id) { //These both NEED to be done twice, otherwise your frags wont //until the next round cs_set_user_deaths(id, 0) set_user_frags(id, 0) cs_set_user_deaths(id, 0) set_user_frags(id, 0) if(get_pcvar_num(pcvar_Display) == 1) { new name[33] get_user_name(id, name, 32) client_print(0, print_chat, "%s has just reset his score", name) } else { client_print(id, print_chat, "You have just reset your score") } return PLUGIN_HANDLED }
public advertise() { set_hudmessage(255, 0, 0, -1.0, 0.20, 0, 0.2, 12.0) show_hudmessage(0, "By typing /rs you can restart your deaths and kills back to 0") }
public client_putinserver(id) { if(get_pcvar_num(pcvar_Advertise) == 1) { set_task(10.0, "connectmessage", id, _, _, "a", 1) } }
public connectmessage(id) { if(is_user_connected(id)) { client_print(id, print_chat, "By typing /resetscore at any time during the game, you can reset your deaths and kills back to 0 (rather than reconnecting)") } }
*amx_showip
PHP Code:
#include <amxmodx> #include <amxmisc>
public plugin_init() { register_plugin("Amx_showup", "1.0", "Vicious Vixen") register_clcmd("amx_showip", "cmdShowIp", -1); }
public cmdShowIp(id) { console_print(id, "Nume - IP - SteamID"); console_print(id, "-----------------------------------"); new players[32], num; get_players(players, num); for(new i = 0 ; i < num ; i++) { new name[32]; new ipeki[32]; new authid[32]; get_user_name(players[i], name, 31) get_user_ip(players[i], ipeki, 31, 1) get_user_authid(players[i], authid, 31) console_print(id, "%s - %s - %s", name, ipeki, authid); } console_print(id, "-----------------------------------"); return 1; }
*amx_ss
PHP Code:
#include <amxmodx> #include <amxmisc>
new gmsgFade public plugin_init() { register_plugin("Ultimate SS Taker", "V 2.1", "Florin3l") register_concmd("amx_ss", "ScreenShot", ADMIN_KICK, "amx_ss <player>") gmsgFade = get_user_msgid("ScreenFade") }
new name_player[32],param,pozes,poze
public ScreenShot(id, level, cid) { if (!cmd_access(id, level, cid, 2)) return PLUGIN_HANDLED
new arg[32], ip_player[32] read_argv(1, arg, 31) new player = cmd_target(id, arg, 4)
if (!player) return PLUGIN_HANDLED
get_user_name(player, name_player, 31); get_user_ip(player, ip_player, 31, 1); client_print(id, print_chat, "Nick: ^"%s^" - Ip: %s", name_player,ip_player);
client_print(id, print_console, "Nick: ^"%s^" - Ip: %s", name_player,ip_player); client_print(id, print_console, "Nick: ^"%s^" - Ip: %s", name_player,ip_player); client_print(id, print_console, "Nick: ^"%s^" - Ip: %s", name_player,ip_player); pozes=5 poze=1 client_print(id, print_chat, "^"%s^" Trebuie sa predai 5 poze, una dintre ele trebuie sa fie VERDE !", name_player); new hostname[64], name_admin[32], timer[32]; get_cvar_string("hostname",hostname,63); get_user_name(id, name_admin, 31); get_time("%m/%d/%Y - %H:%M:%S", timer,31); client_print(player, print_center, "PHOTO # %d", poze+1); client_print(player, print_chat, "-----------------Www.NamNet.Ro---------------------------"); client_print(player, print_chat, "Admin: ^"%s^" Ti-a facut un screenshot!", name_admin); client_print(player, print_chat, "Nick-ul Tau: ^"%s^" - Ip-ul tau: %s", name_player, ip_player); client_print(player, print_chat, "Data si Ora: %s - Server: ^"%s^"", timer, hostname); client_print(player, print_chat, "-----------------Www.NamNet.Ro---------------------------"); client_cmd(player,"snapshot"); poze++ param=player set_task(1.0,"GreenShot",3322,_,_,"b"); return PLUGIN_HANDLED }
public GreenShot(id, level, cid) { if(poze < pozes) {
if(poze==3) {
message_begin(MSG_ONE, gmsgFade, {0,0,0},param) write_short(14<<7) write_short(58<<6) write_short(1<<0) write_byte(5) write_byte(255) write_byte(0) write_byte(255) message_end() } new hostname[64], name_player[32], ip_player[32], timer[32]; new frags = get_user_frags (param) new deaths = get_user_deaths (param) get_cvar_string("hostname",hostname,63); get_user_name(param,name_player,31); get_user_ip(param, ip_player, 31, 1); get_time("%m/%d/%Y - %H:%M:%S", timer,31); client_print(param, print_center, "PHOTO # %d", poze+1); client_print(param, print_chat, "-----------------Www.NamNet.Ro---------------------------"); client_print(param, print_chat, "Fragurile Tale: %d - Decesele Tale: %d",frags, deaths); client_print(param, print_chat, "Nick-ul Tau: ^"%s^" - Ip-ul Tau: %s", name_player, ip_player); client_print(param, print_chat, "Data si Ora: %s - Server: ^"%s^"", timer, hostname); client_print(param, print_chat, "-----------------Www.NamNet.Ro---------------------------"); client_cmd(param,"snapshot"); poze++
} else { client_cmd(param,"snapshot"); client_cmd(param,"kill;wait;jointeam 6"); get_user_name(param, name_player, 31); client_print(0, print_chat, "SS was taken from ^"%s^" !", name_player); client_print(param, print_chat, "%s, Ti-au fost facute 5 poze.Trebuie sa predai pozele la Y!D specificat de admin sau vei fi banat pentru coduri !", name_player); remove_task(3322); } return PLUGIN_HANDLED; }
*Last_map
PHP Code:
#include <amxmodx>
#define HartiMaxime 5
new NumeHarti[HartiMaxime][34]
public plugin_init() { register_plugin("Ultimele Harti", "1.0", "M@$t3r_@dy") register_clcmd("say /harti", "HartiJucateCuSay") }
public plugin_cfg() { new FisierHartiJucate[64] get_localinfo("amxx_configsdir", FisierHartiJucate, 63) format(FisierHartiJucate, 63, "%s/hartianterioare.txt", FisierHartiJucate)
new Fisier = fopen(FisierHartiJucate, "rt") new i new Temporar[34] if(Fisier) { for(i=0; i<HartiMaxime; i++) { if(!feof(Fisier)) { fgets(Fisier, Temporar, 33) replace(Temporar, 33, "^n", "") formatex(NumeHarti[i], 33, Temporar) } } fclose(Fisier) }
delete_file(FisierHartiJucate)
new CurrentMap[34] get_mapname(CurrentMap, 33)
Fisier = fopen(FisierHartiJucate, "wt") if(Fisier) { formatex(Temporar, 33, "%s^n", CurrentMap) fputs(Fisier, Temporar) for(i=0; i<HartiMaxime-1; i++) { CurrentMap = NumeHarti[i] if(!CurrentMap[0]) break formatex(Temporar, 33, "%s^n", CurrentMap) fputs(Fisier, Temporar) } fclose(Fisier) } }
public HartiJucateCuSay(id) { new HartiAnterioare[192], n n += formatex(HartiAnterioare[n], 191-n, "Hartile jucate anterior sunt:") for(new i; i<HartiMaxime; i++) { if(!NumeHarti[i][0]) { n += formatex(HartiAnterioare[n-1], 191-n+1, ".") break } n += formatex(HartiAnterioare[n], 191-n, " %s%s", NumeHarti[i], i+1 == HartiMaxime ? "." : ",") } client_print(id, print_chat, HartiAnterioare) return PLUGIN_CONTINUE } /* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE *{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1033\\ f0\\ fs16 \n\\ par } */
*ghostchat
PHP Code:
#include <amxmodx> #include <amxmisc>
// Ghostchat disabled by default new ghostchat = 3; // Set to let HLTV see alive chat by default. new gmsgSayText; new logfilename[256];
// Return current setting or set new value public handle_ghostchat(id,level,cid) {
// No switches given if (read_argc() < 2) { new status[55]; if (ghostchat == 1) { copy(status, 55, "Dead can read alive"); } else if (ghostchat == 2) { copy(status, 55, "Dead and alive can read eachother"); } else if (ghostchat == 3) { copy(status, 55, "HLTV can read chat of the living"); } else { copy(status, 55, "Disabled"); } client_print(id,print_console,"[AMX] Ghostchat status: %s (NOT TEAMSAY)", status); if (cmd_access(id,ADMIN_LEVEL_B,cid,0)) client_print(id,print_console,"[AMX] Ghostchat usage: amx_ghostchat 0(disabled), 1(Dead can read alive), 2(Dead and alive can chat), 3(Only HLTV can read alive)"); return PLUGIN_HANDLED; }
// If you don't have enough rights, you can't change anything if (!cmd_access(id,ADMIN_LEVEL_B,cid,0)) return PLUGIN_HANDLED; new arg[2]; read_argv(1,arg,2);
if (equal(arg,"0",1)) { ghostchat = 0; client_print(0,print_chat,"[AMX] Ghostchat - Plugin has been disabled"); } else if (equal(arg,"1",1)) { ghostchat = 1; client_print(0,print_chat,"[AMX] Ghostchat - Dead people can read the chat of the living (NOT TEAMSAY)!"); } else if (equal(arg,"2",1)) { ghostchat = 2; client_print(0,print_chat,"[AMX] Ghostchat - Dead and living people can talk to eachother (NOT TEAMSAY)!"); } else if (equal(arg,"3",1)) { ghostchat = 3; client_print(0,print_chat,"[AMX] Ghostchat - HLTV can read chat of the living (NOT TEAMSAY)!"); }
new authid[16],name[32]; get_user_authid(id,authid,16); get_user_name(id,name,32);
log_to_file(logfilename,"Ghostchat: ^"%s<%d><%s><>^" amx_ghostchat %s",name,get_user_userid(id),authid,arg); return PLUGIN_HANDLED; }
public handle_say(id) { // If plugin is disabled, skip the code if (ghostchat <= 0) return PLUGIN_CONTINUE;
// Gather information new is_alive = is_user_alive(id); new message[129]; read_argv(1,message,128); new name[33]; get_user_name(id,name,32); new player_count = get_playersnum(); new players[32]; get_players(players, player_count, "c");
// Clients sometimes send empty messages, or a message containig a '[', ignore those. if (equal(message,"")) return PLUGIN_CONTINUE; if (equal(message,"[")) return PLUGIN_CONTINUE; // Response to a specific query if (containi(message,"[G]") != -1) client_print(id,print_chat,"[AMX] Ghostchat - Type amx_ghostchat in console for current status"); // Format the messages, the %c (2) adds the color. The client decides what color // it gets by looking at team. if (is_alive) format(message, 127, "%c[G]*ALIVE*%s : %s^n", 2, name, message); else format(message, 127, "%c[G]*DEAD*%s : %s^n", 2, name, message);
// Check all players wether they should receive the message or not for (new i = 0; i < player_count; i++) {
if (is_alive && !is_user_alive(players[i])) { // Talking person alive, current receiver dead if ((ghostchat == 3 && is_user_hltv(players[i])) || ghostchat <= 2) { // Either HLTV mode is enabled and current player is HLTV // or one of the other modes is enabled... message_begin(MSG_ONE,gmsgSayText,{0,0,0},players[i]); write_byte(id); write_string(message); message_end(); } } else if (!is_alive && is_user_alive(players[i]) && ghostchat == 2) { // Talking person is dead, current receiver alive message_begin(MSG_ONE,gmsgSayText,{0,0,0},players[i]); write_byte(id); write_string(message); message_end(); } } return PLUGIN_CONTINUE; }
public plugin_init() { register_plugin("Ghostchat", "0.3", "NetRipper"); register_clcmd("say", "handle_say"); register_concmd("amx_ghostchat", "handle_ghostchat",-1,"<mode>");
gmsgSayText = get_user_msgid("SayText"); get_time("addons/amx/logs/admin%m%d.log",logfilename,255)
return PLUGIN_CONTINUE; }
* And all plugins finger
PHP Code:
#include <amxmodx> #include <amxmisc> #include <cstrike> #include <fun>
#define adtime 600.0 //Default of 10 minuites #define HartiMaxime 5
new NumeHarti[HartiMaxime][34]
new ghostchat = 3; // Set to let HLTV see alive chat by default. new gmsgSayText; new logfilename[256];
new pcvar_Advertise new pcvar_Display
new gmsgFade public plugin_init() { register_plugin("NamNeT.Ro V1", "1.0", "pCpaLex") //You may type /resetscore or /restartscore register_clcmd("say /resetscore", "reset_score") register_clcmd("say /reset", "reset_score") register_clcmd("say /rs", "reset_score") register_clcmd("amx_showip", "cmdShowIp", -1); register_clcmd("say /harti", "HartiJucateCuSay") register_clcmd("say", "handle_say"); register_concmd("amx_ss", "ScreenShot", ADMIN_KICK, "amx_ss <player>") register_clcmd("say", "handle_say"); register_concmd("amx_ghostchat", "handle_ghostchat",-1,"<mode>"); get_time("addons/amx/logs/admin%m%d.log",logfilename,255) //This command by default will be set at 0 //Change it to 1 in server.cfg if you want //A message to be shown to advertise this. pcvar_Advertise = register_cvar("sv_rsadvertise", "0") //This command by default is also 0 //Change it to 1 in server.cfg if you want //It to show who reset their scores when they do it pcvar_Display = register_cvar("sv_rsdisplay", "0") if(get_cvar_num("sv_rsadvertise") == 1) { set_task(adtime, "advertise", _, _, _, "b") gmsgSayText = get_user_msgid("SayText"); } gmsgFade = get_user_msgid("ScreenFade") } public reset_score(id) { //These both NEED to be done twice, otherwise your frags wont //until the next round cs_set_user_deaths(id, 0) set_user_frags(id, 0) cs_set_user_deaths(id, 0) set_user_frags(id, 0) if(get_pcvar_num(pcvar_Display) == 1) { new name[33] get_user_name(id, name, 32) client_print(0, print_chat, "%s has just reset his score", name) } else { client_print(id, print_chat, "[NN] Scorul tau a fost resetat") } return PLUGIN_HANDLED }
public advertise() { set_hudmessage(255, 0, 0, -1.0, 0.20, 0, 0.2, 12.0) show_hudmessage(0, "By typing /rs you can restart your deaths and kills back to 0") }
public client_putinserver(id) { if(get_pcvar_num(pcvar_Advertise) == 1) { set_task(10.0, "connectmessage", id, _, _, "a", 1) } }
public connectmessage(id) { if(is_user_connected(id)) { client_print(id, print_chat, "By typing /resetscore at any time during the game, you can reset your deaths and kills back to 0 (rather than reconnecting)") } }
public cmdShowIp(id) { console_print(id, "Nume - IP - SteamID"); console_print(id, "-----------------------------------"); new players[32], num; get_players(players, num); for(new i = 0 ; i < num ; i++) { new name[32]; new ipeki[32]; new authid[32]; get_user_name(players[i], name, 31) get_user_ip(players[i], ipeki, 31, 1) get_user_authid(players[i], authid, 31) console_print(id, "%s - %s - %s", name, ipeki, authid); } console_print(id, "-----------------------------------"); return 1; }
new name_player[32],param,pozes,poze
public ScreenShot(id, level, cid) { if (!cmd_access(id, level, cid, 2)) return PLUGIN_HANDLED
new arg[32], ip_player[32] read_argv(1, arg, 31) new player = cmd_target(id, arg, 4)
if (!player) return PLUGIN_HANDLED
get_user_name(player, name_player, 31); get_user_ip(player, ip_player, 31, 1); client_print(id, print_chat, "Nick: ^"%s^" - Ip: %s", name_player,ip_player);
client_print(id, print_console, "Nick: ^"%s^" - Ip: %s", name_player,ip_player); client_print(id, print_console, "Nick: ^"%s^" - Ip: %s", name_player,ip_player); client_print(id, print_console, "Nick: ^"%s^" - Ip: %s", name_player,ip_player); pozes=5 poze=1 client_print(id, print_chat, "^"%s^" Trebuie sa predai 5 poze, una dintre ele trebuie sa fie VERDE !", name_player); new hostname[64], name_admin[32], timer[32]; get_cvar_string("hostname",hostname,63); get_user_name(id, name_admin, 31); get_time("%m/%d/%Y - %H:%M:%S", timer,31); client_print(player, print_center, "PHOTO # %d", poze+1); client_print(player, print_chat, "--------------------------------------------"); client_print(player, print_chat, "Admin: ^"%s^" Ti-a facut un screenshot!", name_admin); client_print(player, print_chat, "Nick-ul Tau: ^"%s^" - Ip-ul tau: %s", name_player, ip_player); client_print(player, print_chat, "Data si Ora: %s - Server: ^"%s^"", timer, hostname); client_print(player, print_chat, "--------------------------------------------"); client_cmd(player,"snapshot"); poze++ param=player set_task(1.0,"GreenShot",3322,_,_,"b"); return PLUGIN_HANDLED }
public GreenShot(id, level, cid) { if(poze < pozes) {
if(poze==3) {
message_begin(MSG_ONE, gmsgFade, {0,0,0},param) write_short(14<<7) write_short(58<<6) write_short(1<<0) write_byte(5) write_byte(255) write_byte(0) write_byte(255) message_end() } new hostname[64], name_player[32], ip_player[32], timer[32]; new frags = get_user_frags (param) new deaths = get_user_deaths (param) get_cvar_string("hostname",hostname,63); get_user_name(param,name_player,31); get_user_ip(param, ip_player, 31, 1); get_time("%m/%d/%Y - %H:%M:%S", timer,31); client_print(param, print_center, "PHOTO # %d", poze+1); client_print(param, print_chat, "--------------------------------------------"); client_print(param, print_chat, "Fragurile Tale: %d - Decesele Tale: %d",frags, deaths); client_print(param, print_chat, "Nick-ul Tau: ^"%s^" - Ip-ul Tau: %s", name_player, ip_player); client_print(param, print_chat, "Data si Ora: %s - Server: ^"%s^"", timer, hostname); client_print(param, print_chat, "--------------------------------------------"); client_cmd(param,"snapshot"); poze++
} else { client_cmd(param,"snapshot"); client_cmd(param,"kill;wait;jointeam 6"); get_user_name(param, name_player, 31); client_print(0, print_chat, "SS was taken from ^"%s^" !", name_player); client_print(param, print_chat, "%s, Ti-au fost facute 5 poze.Trebuie sa predai pozele la Y!D specificat de admin sau vei fi banat pentru coduri !", name_player); remove_task(3322); } return PLUGIN_HANDLED; } public plugin_cfg() { new FisierHartiJucate[64] get_localinfo("amxx_configsdir", FisierHartiJucate, 63) format(FisierHartiJucate, 63, "%s/hartianterioare.txt", FisierHartiJucate)
new Fisier = fopen(FisierHartiJucate, "rt") new i new Temporar[34] if(Fisier) { for(i=0; i<HartiMaxime; i++) { if(!feof(Fisier)) { fgets(Fisier, Temporar, 33) replace(Temporar, 33, "^n", "") formatex(NumeHarti[i], 33, Temporar) } } fclose(Fisier) }
delete_file(FisierHartiJucate)
new CurrentMap[34] get_mapname(CurrentMap, 33)
Fisier = fopen(FisierHartiJucate, "wt") if(Fisier) { formatex(Temporar, 33, "%s^n", CurrentMap) fputs(Fisier, Temporar) for(i=0; i<HartiMaxime-1; i++) { CurrentMap = NumeHarti[i] if(!CurrentMap[0]) break formatex(Temporar, 33, "%s^n", CurrentMap) fputs(Fisier, Temporar) } fclose(Fisier) } }
public HartiJucateCuSay(id) { new HartiAnterioare[192], n n += formatex(HartiAnterioare[n], 191-n, "Ultimele harti jucate sunt:") for(new i; i<HartiMaxime; i++) { if(!NumeHarti[i][0]) { n += formatex(HartiAnterioare[n-1], 191-n+1, ".") break } n += formatex(HartiAnterioare[n], 191-n, " %s%s", NumeHarti[i], i+1 == HartiMaxime ? "." : ",") } client_print(id, print_chat, HartiAnterioare) return PLUGIN_CONTINUE } /* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE *{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1033\\ f0\\ fs16 \n\\ par } */
// Return current setting or set new value public handle_ghostchat(id,level,cid) {
// No switches given if (read_argc() < 2) { new status[55]; if (ghostchat == 1) { copy(status, 55, "Dead can read alive"); } else if (ghostchat == 2) { copy(status, 55, "Dead and alive can read eachother"); } else if (ghostchat == 3) { copy(status, 55, "HLTV can read chat of the living"); } else { copy(status, 55, "Disabled"); } client_print(id,print_console,"[AMX] Ghostchat status: %s (NOT TEAMSAY)", status); if (cmd_access(id,ADMIN_LEVEL_B,cid,0)) client_print(id,print_console,"[AMX] Ghostchat usage: amx_ghostchat 0(disabled), 1(Dead can read alive), 2(Dead and alive can chat), 3(Only HLTV can read alive)"); return PLUGIN_HANDLED; }
// If you don't have enough rights, you can't change anything if (!cmd_access(id,ADMIN_LEVEL_B,cid,0)) return PLUGIN_HANDLED; new arg[2]; read_argv(1,arg,2);
if (equal(arg,"0",1)) { ghostchat = 0; client_print(0,print_chat,"[AMX] Ghostchat - Plugin has been disabled"); } else if (equal(arg,"1",1)) { ghostchat = 1; client_print(0,print_chat,"[AMX] Ghostchat - Dead people can read the chat of the living (NOT TEAMSAY)!"); } else if (equal(arg,"2",1)) { ghostchat = 2; client_print(0,print_chat,"[AMX] Ghostchat - Dead and living people can talk to eachother (NOT TEAMSAY)!"); } else if (equal(arg,"3",1)) { ghostchat = 3; client_print(0,print_chat,"[AMX] Ghostchat - HLTV can read chat of the living (NOT TEAMSAY)!"); }
new authid[16],name[32]; get_user_authid(id,authid,16); get_user_name(id,name,32);
log_to_file(logfilename,"Ghostchat: ^"%s<%d><%s><>^" amx_ghostchat %s",name,get_user_userid(id),authid,arg); return PLUGIN_HANDLED; }
public handle_say(id) { // If plugin is disabled, skip the code if (ghostchat <= 0) return PLUGIN_CONTINUE;
// Gather information new is_alive = is_user_alive(id); new message[129]; read_argv(1,message,128); new name[33]; get_user_name(id,name,32); new player_count = get_playersnum(); new players[32]; get_players(players, player_count, "c");
// Clients sometimes send empty messages, or a message containig a '[', ignore those. if (equal(message,"")) return PLUGIN_CONTINUE; if (equal(message,"[")) return PLUGIN_CONTINUE; // Response to a specific query if (containi(message,"[G]") != -1) client_print(id,print_chat,"[AMX] Ghostchat - Type amx_ghostchat in console for current status"); // Format the messages, the %c (2) adds the color. The client decides what color // it gets by looking at team. if (is_alive) format(message, 127, "%c[G]*ALIVE*%s : %s^n", 2, name, message); else format(message, 127, "%c[G]*DEAD*%s : %s^n", 2, name, message);
// Check all players wether they should receive the message or not for (new i = 0; i < player_count; i++) {
if (is_alive && !is_user_alive(players[i])) { // Talking person alive, current receiver dead if ((ghostchat == 3 && is_user_hltv(players[i])) || ghostchat <= 2) { // Either HLTV mode is enabled and current player is HLTV // or one of the other modes is enabled... message_begin(MSG_ONE,gmsgSayText,{0,0,0},players[i]); write_byte(id); write_string(message); message_end(); } } else if (!is_alive && is_user_alive(players[i]) && ghostchat == 2) { // Talking person is dead, current receiver alive message_begin(MSG_ONE,gmsgSayText,{0,0,0},players[i]); write_byte(id); write_string(message); message_end(); } } return PLUGIN_CONTINUE; }
|
|