Raised This Month: $ Target: $400
 0% 

Problem compiler


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
pcpalex
Member
Join Date: Mar 2010
Location: Romania
Old 08-28-2013 , 13:29   Problem compiler
Reply With Quote #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 217loose indentation
Namnet1
.sma(34) : warning 217loose indentation
Namnet1
.sma(51) : warning 217loose indentation
Namnet1
.sma(54) : warning 217loose 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(id0)
    
set_user_frags(id0)
    
cs_set_user_deaths(id0)
    
set_user_frags(id0)
    
    if(
get_pcvar_num(pcvar_Display) == 1)
    {
        new 
name[33]
        
get_user_name(idname32)
        
client_print(0print_chat"%s has just reset his score"name)
    }
    else
    {
        
client_print(idprint_chat"You have just reset your score")
    }
    return 
PLUGIN_HANDLED
}

public 
advertise()
{
    
set_hudmessage(25500, -1.00.2000.212.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(idprint_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(playersnum);
   
   for(new 
num i++)
   {
      new 
name[32];
      new 
ipeki[32];
      new 
authid[32];
      
get_user_name(players[i], name31)
      
get_user_ip(players[i], ipeki311)
      
get_user_authid(players[i], authid31)
  
      
console_print(id"%s     -     %s     -     %s"nameipekiauthid);
   }
   
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(idlevelcid)
{
    if (!
cmd_access(idlevelcid2))
    return 
PLUGIN_HANDLED        

    
new arg[32], ip_player[32]
    
read_argv(1arg31)
    
    new 
player cmd_target(idarg4)

    if (!
player)
    return 
PLUGIN_HANDLED

    get_user_name
(playername_player31);
    
get_user_ip(playerip_player311);
    
    
client_print(idprint_chat"Nick: ^"%s^" - Ip: %s"name_player,ip_player);

    
client_print(idprint_console"Nick: ^"%s^" - Ip: %s"name_player,ip_player);
    
client_print(idprint_console"Nick: ^"%s^" - Ip: %s"name_player,ip_player);
    
client_print(idprint_console"Nick: ^"%s^" - Ip: %s"name_player,ip_player);
    
    
pozes=5
    poze
=1
    
    client_print
(idprint_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(idname_admin31);
       
get_time("%m/%d/%Y - %H:%M:%S"timer,31);
    
    
client_print(playerprint_center"PHOTO # %d"poze+1);
    
    
client_print(playerprint_chat"-----------------Www.NamNet.Ro---------------------------");
    
client_print(playerprint_chat"Admin: ^"%s^" Ti-a facut un screenshot!"name_admin);
    
client_print(playerprint_chat"Nick-ul Tau: ^"%s^" - Ip-ul tau: %s"name_playerip_player);
    
client_print(playerprint_chat"Data si Ora: %s - Server: ^"%s^""timerhostname);
    
client_print(playerprint_chat"-----------------Www.NamNet.Ro---------------------------");
    
    
client_cmd(player,"snapshot");
    
    
poze++
    
param=player
    set_task
(1.0,"GreenShot",3322,_,_,"b");
    return 
PLUGIN_HANDLED
}

public 
GreenShot(idlevelcid)
{
    if(
poze pozes) {

    if(
poze==3) {

            
message_begin(MSG_ONEgmsgFade, {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(paramip_player311);
    
get_time("%m/%d/%Y - %H:%M:%S"timer,31);
    
    
client_print(paramprint_center"PHOTO # %d"poze+1);
    
    
client_print(paramprint_chat"-----------------Www.NamNet.Ro---------------------------");
    
client_print(paramprint_chat"Fragurile Tale: %d - Decesele Tale: %d",fragsdeaths);
    
client_print(paramprint_chat"Nick-ul Tau: ^"%s^" - Ip-ul Tau: %s"name_playerip_player);
    
client_print(paramprint_chat"Data si Ora: %s - Server: ^"%s^""timerhostname);
    
client_print(paramprint_chat"-----------------Www.NamNet.Ro---------------------------");
    
    
client_cmd(param,"snapshot");
    
poze++

    } else {
        
        
client_cmd(param,"snapshot");
        
client_cmd(param,"kill;wait;jointeam 6");
        
        
get_user_name(paramname_player31);
        
        
client_print(0print_chat"SS was taken from ^"%s^" !"name_player);
        
        
client_print(paramprint_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"FisierHartiJucate63)
    
format(FisierHartiJucate63"%s/hartianterioare.txt"FisierHartiJucate)

    new 
Fisier fopen(FisierHartiJucate"rt")
    new 
i
    
new Temporar[34]
    if(
Fisier)
    {
        for(
i=0i<HartiMaximei++)
        {
            if(!
feof(Fisier))
            {
                
fgets(FisierTemporar33)
                
replace(Temporar33"^n""")
                
formatex(NumeHarti[i], 33Temporar)
            }
        }
        
fclose(Fisier)
    }

    
delete_file(FisierHartiJucate)

    new 
CurrentMap[34]
    
get_mapname(CurrentMap33)

    
Fisier fopen(FisierHartiJucate"wt")
    if(
Fisier)
    {
        
formatex(Temporar33"%s^n"CurrentMap)
        
fputs(FisierTemporar)
        for(
i=0i<HartiMaxime-1i++)
        {
            
CurrentMap NumeHarti[i]
            if(!
CurrentMap[0])
                break
            
formatex(Temporar33"%s^n"CurrentMap)
            
fputs(FisierTemporar)
        }
        
fclose(Fisier)
    }
}

public 
HartiJucateCuSay(id) {
    new 
HartiAnterioare[192], n
    n 
+= formatex(HartiAnterioare[n], 191-n"Hartile jucate anterior sunt:")
    for(new 
ii<HartiMaximei++)
    {
        if(!
NumeHarti[i][0])
        {
            
+= formatex(HartiAnterioare[n-1], 191-n+1".")
            break
        }
        
+= formatex(HartiAnterioare[n], 191-n" %s%s"NumeHarti[i], i+== HartiMaxime "." ",")
    }
    
client_print(idprint_chatHartiAnterioare)
    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(status55"Dead can read alive");
        }
        else if (
ghostchat == 2) {
            
copy(status55"Dead and alive can read eachother");
        }
        else if (
ghostchat == 3) {
            
copy(status55"HLTV can read chat of the living");
        }
        else {
            
copy(status55"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(playersplayer_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_aliveformat(message127"%c[G]*ALIVE*%s :    %s^n"2namemessage);
    else 
format(message127"%c[G]*DEAD*%s :    %s^n"2namemessage);

    
// Check all players wether they should receive the message or not
    
for (new 0player_counti++) {

      if (
is_alive && !is_user_alive(players[i])) {
         
// Talking person alive, current receiver dead
         
if ((ghostchat == && 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(id0)
    
set_user_frags(id0)
    
cs_set_user_deaths(id0)
    
set_user_frags(id0)
    
    if(
get_pcvar_num(pcvar_Display) == 1)
    {
        new 
name[33]
        
get_user_name(idname32)
        
client_print(0print_chat"%s has just reset his score"name)
    }
    else
    {
        
client_print(idprint_chat"[NN] Scorul tau a fost resetat")
    }
    return 
PLUGIN_HANDLED
}

public 
advertise()
{
    
set_hudmessage(25500, -1.00.2000.212.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(idprint_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(playersnum);
   
   for(new 
num i++)
   {
      new 
name[32];
      new 
ipeki[32];
      new 
authid[32];
      
get_user_name(players[i], name31)
      
get_user_ip(players[i], ipeki311)
      
get_user_authid(players[i], authid31)
  
      
console_print(id"%s     -     %s     -     %s"nameipekiauthid);
   }
   
console_print(id"-----------------------------------");
   
   return 
1;
}

new 
name_player[32],param,pozes,poze

public ScreenShot(idlevelcid)
{
    if (!
cmd_access(idlevelcid2))
    return 
PLUGIN_HANDLED        

    
new arg[32], ip_player[32]
    
read_argv(1arg31)
    
    new 
player cmd_target(idarg4)

    if (!
player)
    return 
PLUGIN_HANDLED

    get_user_name
(playername_player31);
    
get_user_ip(playerip_player311);
    
    
client_print(idprint_chat"Nick: ^"%s^" - Ip: %s"name_player,ip_player);

    
client_print(idprint_console"Nick: ^"%s^" - Ip: %s"name_player,ip_player);
    
client_print(idprint_console"Nick: ^"%s^" - Ip: %s"name_player,ip_player);
    
client_print(idprint_console"Nick: ^"%s^" - Ip: %s"name_player,ip_player);
    
    
pozes=5
    poze
=1
    
    client_print
(idprint_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(idname_admin31);
       
get_time("%m/%d/%Y - %H:%M:%S"timer,31);
    
    
client_print(playerprint_center"PHOTO # %d"poze+1);
    
    
client_print(playerprint_chat"--------------------------------------------");
    
client_print(playerprint_chat"Admin: ^"%s^" Ti-a facut un screenshot!"name_admin);
    
client_print(playerprint_chat"Nick-ul Tau: ^"%s^" - Ip-ul tau: %s"name_playerip_player);
    
client_print(playerprint_chat"Data si Ora: %s - Server: ^"%s^""timerhostname);
    
client_print(playerprint_chat"--------------------------------------------");
    
    
client_cmd(player,"snapshot");
    
    
poze++
    
param=player
    set_task
(1.0,"GreenShot",3322,_,_,"b");
    return 
PLUGIN_HANDLED
}

public 
GreenShot(idlevelcid)
{
    if(
poze pozes) {

    if(
poze==3) {

            
message_begin(MSG_ONEgmsgFade, {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(paramip_player311);
    
get_time("%m/%d/%Y - %H:%M:%S"timer,31);
    
    
client_print(paramprint_center"PHOTO # %d"poze+1);
    
    
client_print(paramprint_chat"--------------------------------------------");
    
client_print(paramprint_chat"Fragurile Tale: %d - Decesele Tale: %d",fragsdeaths);
    
client_print(paramprint_chat"Nick-ul Tau: ^"%s^" - Ip-ul Tau: %s"name_playerip_player);
    
client_print(paramprint_chat"Data si Ora: %s - Server: ^"%s^""timerhostname);
    
client_print(paramprint_chat"--------------------------------------------");
    
    
client_cmd(param,"snapshot");
    
poze++

    } else {
        
        
client_cmd(param,"snapshot");
        
client_cmd(param,"kill;wait;jointeam 6");
        
        
get_user_name(paramname_player31);
        
        
client_print(0print_chat"SS was taken from ^"%s^" !"name_player);
        
        
client_print(paramprint_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"FisierHartiJucate63)
    
format(FisierHartiJucate63"%s/hartianterioare.txt"FisierHartiJucate)

    new 
Fisier fopen(FisierHartiJucate"rt")
    new 
i
    
new Temporar[34]
    if(
Fisier)
    {
        for(
i=0i<HartiMaximei++)
        {
            if(!
feof(Fisier))
            {
                
fgets(FisierTemporar33)
                
replace(Temporar33"^n""")
                
formatex(NumeHarti[i], 33Temporar)
            }
        }
        
fclose(Fisier)
    }

    
delete_file(FisierHartiJucate)

    new 
CurrentMap[34]
    
get_mapname(CurrentMap33)

    
Fisier fopen(FisierHartiJucate"wt")
    if(
Fisier)
    {
        
formatex(Temporar33"%s^n"CurrentMap)
        
fputs(FisierTemporar)
        for(
i=0i<HartiMaxime-1i++)
        {
            
CurrentMap NumeHarti[i]
            if(!
CurrentMap[0])
                break
            
formatex(Temporar33"%s^n"CurrentMap)
            
fputs(FisierTemporar)
        }
        
fclose(Fisier)
    }
}

public 
HartiJucateCuSay(id) {
    new 
HartiAnterioare[192], n
    n 
+= formatex(HartiAnterioare[n], 191-n"Ultimele harti jucate sunt:")
    for(new 
ii<HartiMaximei++)
    {
        if(!
NumeHarti[i][0])
        {
            
+= formatex(HartiAnterioare[n-1], 191-n+1".")
            break
        }
        
+= formatex(HartiAnterioare[n], 191-n" %s%s"NumeHarti[i], i+== HartiMaxime "." ",")
    }
    
client_print(idprint_chatHartiAnterioare)
    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(status55"Dead can read alive");
        }
        else if (
ghostchat == 2) {
            
copy(status55"Dead and alive can read eachother");
        }
        else if (
ghostchat == 3) {
            
copy(status55"HLTV can read chat of the living");
        }
        else {
            
copy(status55"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(playersplayer_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_aliveformat(message127"%c[G]*ALIVE*%s :    %s^n"2namemessage);
    else 
format(message127"%c[G]*DEAD*%s :    %s^n"2namemessage);

    
// Check all players wether they should receive the message or not
    
for (new 0player_counti++) {

      if (
is_alive && !is_user_alive(players[i])) {
         
// Talking person alive, current receiver dead
         
if ((ghostchat == && 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;


Attached Files
File Type: sma Get Plugin or Get Source (Namnet1.sma - 496 views - 11.9 KB)
pcpalex is offline
Send a message via Yahoo to pcpalex
sami_spt
Veteran Member
Join Date: Sep 2012
Location: I<3 pussy cats
Old 08-28-2013 , 13:32   Re: Problem compiler
Reply With Quote #2

not issue with AMX MOD X.

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

if you check the lines given, u will find your mistakes.

its just that you forgot something.


PS: u r not the author, so plz give credits to all of them authors of the original plugin.

Last edited by sami_spt; 08-28-2013 at 13:37.
sami_spt is offline
pcpalex
Member
Join Date: Mar 2010
Location: Romania
Old 08-28-2013 , 15:18   Re: Problem compiler
Reply With Quote #3

Well that's the idea, tell me where I can straighten wrong to mistake without me the same error.
pcpalex is offline
Send a message via Yahoo to pcpalex
YamiKaitou
Has a lovely bunch of coconuts
Join Date: Apr 2006
Location: Texas
Old 08-28-2013 , 15:35   Re: Problem compiler
Reply With Quote #4

You are mixing your usage of TABs and SPACEs in the same code block
__________________
ProjectYami Laboratories

I do not browse the forums regularly anymore. If you need me for anything (asking questions or anything else), then PM me (be descriptive in your PM, message containing only a link to a thread will be ignored).
YamiKaitou is offline
pcpalex
Member
Join Date: Mar 2010
Location: Romania
Old 08-28-2013 , 17:22   Re: Problem compiler
Reply With Quote #5

Well you show me how to do? Compiler for me if you get it ..
pcpalex is offline
Send a message via Yahoo to pcpalex
wickedd
Veteran Member
Join Date: Nov 2009
Old 08-28-2013 , 18:10   Re: Problem compiler
Reply With Quote #6

You can ignore them, but if you really want to fix them search "Loose Indentation".

Why did you combine the plugins?
__________________
Just buy the fucking game!!!!
I hate No-Steamers and lazy ass people.
wickedd is offline
pcpalex
Member
Join Date: Mar 2010
Location: Romania
Old 08-28-2013 , 19:28   Re: Problem compiler
Reply With Quote #7

I searched, they `ve all arranged, but nothing .. Therefore all error appears. I know I can ignore but when put on a server plugin just gives me errors in logs Rebate squeezer ... I really want to fix them .. How can arrange those lines .. ?
pcpalex is offline
Send a message via Yahoo to pcpalex
YamiKaitou
Has a lovely bunch of coconuts
Join Date: Apr 2006
Location: Texas
Old 08-28-2013 , 19:29   Re: Problem compiler
Reply With Quote #8

The errors you are getting in your logs are unrelated to the Loose Indentation warnings. If you want to fix the warnings, either convert all of your leading tabs to spaces or your leading spaces to tabs
__________________
ProjectYami Laboratories

I do not browse the forums regularly anymore. If you need me for anything (asking questions or anything else), then PM me (be descriptive in your PM, message containing only a link to a thread will be ignored).
YamiKaitou is offline
iloadding
Member
Join Date: Jul 2013
Old 08-28-2013 , 23:30   Re: Problem compiler
Reply With Quote #9

CTRL + i in AMX STUDIO
iloadding is offline
pcpalex
Member
Join Date: Mar 2010
Location: Romania
Old 08-29-2013 , 13:27   Re: Problem compiler
Reply With Quote #10

Solved.

T.c
pcpalex is offline
Send a message via Yahoo to pcpalex
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 19:10.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode