Probleme who.amxx

Discutii legate de instalarea, configurarea si modificarea unui server de Counter-Strike.

Moderators: Moderatori ajutatori, Moderatori, Echipa eXtreamCS.com

Post Reply
NemesisAK
Membru, skill 0
Membru, skill 0
Posts: 14
Joined: 17 Feb 2016, 09:10
Detinator Steam: Nu
CS Status: Citesc forumul eXtreamCS.com...!
Fond eXtream: 0
Contact:

18 Feb 2016, 10:42

Cine imi poate Compila acest who.sma ? Mie imi da eroare.
| Afiseaza codul
#include <amxmodx>
#include <amxmisc>

#define PLUGIN "ULTIMATE WHO"
#define VERSION "1.1"
#define AUTHOR "P.Of.Pw"

#define CharsMax(%1) sizeof %1 - 1
#define time_shower 1.0

#define GROUPS_NAME 8
#define GROUPS_ACCESS 8

#define motd_msg "Admin's Online"

new color[][] =
{
"00FF00",
"FF0000",
"0000FF",
"545454"
}

#define MAX_GROUPS 9

new GroupNames[GROUPS_NAME][] = 
{
"Fondator",
"Owner",
"Co-Owner",
"GoD",
"Super-Mod",
"Moderator",
"Administrator",
"Helper",
"Slot"
}

new GroupFlags[GROUPS_ACCESS][] = 
{
"abcdefghijklmnopqrstu",
"bcdefghijklmnopqrsu",
"abcdefijmnopqrs",
"bcdefijmnopq",
"bcdefijmnop",
"bcdefijmno",
"bceijmn",
"beim",
"b"
}

new GroupFlagsValue[GROUPS_NAME]

public plugin_init() 
{
register_plugin(PLUGIN, VERSION, AUTHOR)

for(new p_of_pw = 0 ; p_of_pw < GROUPS_NAME ; p_of_pw++)
GroupFlagsValue[p_of_pw] = read_flags(GroupFlags[p_of_pw])

register_clcmd("say /who" , "cmdSay")
register_clcmd("say_team /who" , "cmdSay")
}

public cmdSay(id)
{
new say[8]
read_args(say, 7)

if ((containi(say, "/who") != -1 
|| containi(say, "/admin") != -1))

who_motd(id)

return PLUGIN_CONTINUE
}

who_motd(id)
{
new sPlayers[32], iNum, iPlayer
new sName[32], sBuffer[1024]
new iLen

iLen = formatex(sBuffer, sizeof sBuffer - 1, "<body bgcolor=#000000><font color=#7b68ee><pre>")

get_players(sPlayers, iNum, "ch")

for(new p_of_pw = 0; p_of_pw < GROUPS_NAME ; p_of_pw++)
{ 
iLen += formatex(sBuffer[iLen], CharsMax(sBuffer) - iLen, "<center><h5><font color=^"violet^">%s^n</font></h5></center>", GroupNames[p_of_pw])

for(new a = 0; a < iNum ; a++)
{ 
iPlayer = sPlayers[a]

if(get_user_flags(iPlayer) == GroupFlagsValue[p_of_pw])
{
get_user_name(iPlayer, sName, sizeof sName - 1)
iLen += formatex(sBuffer[iLen], CharsMax(sBuffer) - iLen, "<center><font color=^"%s^">%s^n</center></font>", color[p_of_pw], sName)
}
} 
}

show_motd(id, sBuffer, motd_msg)
return PLUGIN_CONTINUE
}
RoyalServer
User avatar
Constantin.
Membru, skill +1
Membru, skill +1
Posts: 273
Joined: 08 Feb 2016, 21:27
Detinator Steam: Da
SteamID: iamkurt69
Fond eXtream: 0
Location: Planeta Moldova
Contact:

09 Mar 2016, 00:42

Când dau la compilare , mie așa îmi apare | Afiseaza codul
amx_who.sma(35) : error 018: initialization data exceeds declared size
amx_who.sma(48) : error 018: initialization data exceeds declared size

2 Errors.
Compilarea failed!

P.S: Încearcă să îți creezi un amx_who , folosind amx_who plugin generator e destul de ușor :)!
User avatar
Nicholas
Membru eXtream
Membru eXtream
Posts: 3755
Joined: 03 Aug 2009, 00:21
Detinator Steam: Da
SteamID: ONEANDONLYY
Reputatie: Membru Club eXtreamCS (1 luna)
Has thanked: 110 times
Been thanked: 26 times
Contact:

09 Mar 2016, 02:03

Incearca acum.
| Afiseaza codul
#include <amxmodx>
#include <amxmisc>

#define PLUGIN "ULTIMATE WHO"
#define VERSION "1.1"
#define AUTHOR "P.Of.Pw"

#define CharsMax(%1) sizeof %1 - 1
#define time_shower 1.0

#define GROUPS_NAME 9
#define GROUPS_ACCESS 9

#define motd_msg "Admin's Online"

new color[][] =
{
"00FF00",
"FF0000",
"0000FF",
"545454"
}

#define MAX_GROUPS 9

new GroupNames[GROUPS_NAME][] = 
{
"Fondator",
"Owner",
"Co-Owner",
"GoD",
"Super-Mod",
"Moderator",
"Administrator",
"Helper",
"Slot"
}

new GroupFlags[GROUPS_ACCESS][] = 
{
"abcdefghijklmnopqrstu",
"bcdefghijklmnopqrsu",
"abcdefijmnopqrs",
"bcdefijmnopq",
"bcdefijmnop",
"bcdefijmno",
"bceijmn",
"beim",
"b"
}

new GroupFlagsValue[GROUPS_NAME]

public plugin_init() 
{
register_plugin(PLUGIN, VERSION, AUTHOR)

for(new p_of_pw = 0 ; p_of_pw < GROUPS_NAME ; p_of_pw++)
GroupFlagsValue[p_of_pw] = read_flags(GroupFlags[p_of_pw])

register_clcmd("say /who" , "cmdSay")
register_clcmd("say_team /who" , "cmdSay")
}

public cmdSay(id)
{
new say[8]
read_args(say, 7)

if ((containi(say, "/who") != -1 
|| containi(say, "/admin") != -1))

who_motd(id)

return PLUGIN_CONTINUE
}

who_motd(id)
{
new sPlayers[32], iNum, iPlayer
new sName[32], sBuffer[1024]
new iLen

iLen = formatex(sBuffer, sizeof sBuffer - 1, "<body bgcolor=#000000><font color=#7b68ee><pre>")

get_players(sPlayers, iNum, "ch")

for(new p_of_pw = 0; p_of_pw < GROUPS_NAME ; p_of_pw++)
{ 
iLen += formatex(sBuffer[iLen], CharsMax(sBuffer) - iLen, "<center><h5><font color=^"violet^">%s^n</font></h5></center>", GroupNames[p_of_pw])

for(new a = 0; a < iNum ; a++)
{ 
iPlayer = sPlayers[a]

if(get_user_flags(iPlayer) == GroupFlagsValue[p_of_pw])
{
get_user_name(iPlayer, sName, sizeof sName - 1)
iLen += formatex(sBuffer[iLen], CharsMax(sBuffer) - iLen, "<center><font color=^"%s^">%s^n</center></font>", color[p_of_pw], sName)
}
} 
}

show_motd(id, sBuffer, motd_msg)
return PLUGIN_CONTINUE
}
Image
User avatar
Rooberth
Membru, skill 0
Membru, skill 0
Posts: 18
Joined: 04 Mar 2016, 11:46
Detinator Steam: Da
CS Status: Lasa-mi mie noptile si tu ia-ti zilele!
Fond eXtream: 0
Contact:

09 Mar 2016, 12:30

Post Reply

Return to “Probleme la servere dedicate de Counter-Strike”

  • Information
  • Who is online

    Users browsing this forum: Bing [Bot] and 49 guests