User
Pass
2FA
 
 

nevoie de cineva care stie cu ce se mananca programarea

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Freakz Forum Index -> Trash Bin -> CS 2006-2019 (Archived) -> Resources
Author Message1216
Tyger

[Born Wild]



Status: Offline
(since 17-05-2014 22:04)
Joined: 15 Jun 2009
Posts: 440, Topics: 30
Location: Romania

Reputation: 300.4
Votes: 10

Post Posted: 12-12-2009, 23:45:39 | Translate post to: ... (Click for more languages)

Am un plugin care are urmatoarea functie: cand un player scrie in chat /admin ii apare in imagine de motd adminii cu clasele lor, pb este ca daca admini in server sunt peste 9 la al 10-lea arata o bucata dintr-o linie de cod din plugin, ce trebuie modificat in el este sa poata afisa toti adminii care sunt online indiferent cat de multi sunt, sper ca m-am facut inteles....Multumesc anticipat!!!


#include <amxmodx>
#include <amxmisc>

#define PLUGIN "New AMXX Who"
#define VERSION "1.0"
#define AUTHOR "Alka"

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

#define MAX_GROUPS 4

new g_groupNames[MAX_GROUPS][] = {

"Owners",
"Moderatori",
"Administratori",
"Slot/Rezervare Nume"
}

new g_groupFlags[MAX_GROUPS][] = {

"abcdefghijklmnostu", // Owners
"bcdefghijmnopstu", // Moderatori
"bcdefgijmq", // Administratori
"bir" // SloTs
}

new g_groupFlagsValue[MAX_GROUPS];

public plugin_init() {

register_plugin(PLUGIN, VERSION, AUTHOR);

for(new i = 0 ; i < MAX_GROUPS ; i++)
g_groupFlagsValue[i] = read_flags(g_groupFlags[i]);

register_clcmd("amx_who", "cmdWho", -1, "");
register_clcmd("say /who", "cmdWho", -1, "");
register_clcmd("say /admins", "cmdWho", -1, "");
register_concmd("say /admin", "cmdWho", -1, "");
register_concmd("admin_who", "cmdWho", -1, "");
}


public cmdWho(id)
{
static sPlayers[32], iNum, iPlayer;
static sName[32], sBuffer[1024];

static iLen;
iLen = formatex(sBuffer, sizeof sBuffer - 1, "<body bgcolor=#000000><font color=cyan><pre>");
iLen += formatex(sBuffer[iLen], CharsMax(sBuffer) - iLen,"<body background=http://poza.jpg bgProperties=fixed><center><font color=#FFFFFF><pre>");


get_players(sPlayers, iNum, "ch");

for(new i = 0; i < MAX_GROUPS ; i++)
{
iLen += formatex(sBuffer[iLen], CharsMax(sBuffer) - iLen, "<center><h5><font color=^"red^"><<--<B>%s</B>-->>^n</font></h5></center>", g_groupNames[i]);

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

if(get_user_flags(iPlayer) == g_groupFlagsValue[i])
{
get_user_name(iPlayer, sName, sizeof sName - 1);
iLen += formatex(sBuffer[iLen], CharsMax(sBuffer) - iLen, "<center><font color=cyan><pre><B>%s</B>^n</center>", sName);
}
}
}
show_motd(id, sBuffer, "OnlinE AdminS[Admini Conectati]");
return 0;
}


Edited: Fara reclama in semnatura
0 0
  
Back to top
View user's profile Send private message
nr913
[Banned user]


Banned


Status: Offline
(since 24-10-2013 10:06)
Joined: 24 Apr 2009
Posts: 4224, Topics: 223
Location: România

Reputation: 60.3
Votes: 156

 
Post Posted: 13-12-2009, 14:13:44 | Translate post to: ... (Click for more languages)

AmxModX wiki wrote:
The length of the message should not be more than around 1,200 characters - going over this limit could potentially crash the client.

Ai putea sa modifici din sBuffer[1024] in sBuffer[2048], dar pun pariu ca o sa iti dea crash. E complicat cu motd-ul. Mai bine faci cu HUD


Attitude - A little thing that makes a BIG difference
0 0
  
Back to top
View user's profile Send private message
PoSiTiOn Of PoWeR

[ZP.FREAKZ.RO OWNER]



Status: Offline
(since 07-10-2015 14:51)
Joined: 25 Oct 2008
Posts: 712, Topics: 77
Location: Germany

Reputation: 185.3
Votes: 18

Post Posted: 13-12-2009, 16:18:33 | Translate post to: ... (Click for more languages)

poti folosi maxim 2.500 de caractere ; http://www.amxmodx.org/funcwiki.php?search=show_motd&&go=search

mai bine faci cum zice nr913

0 0
  
Back to top
View user's profile Send private message
sTbA

[Dev C# && C++]



Status: Offline
(since 19-08-2022 13:09)
Joined: 15 Dec 2012
Posts: 963, Topics: 71
Location: United Kingdom

Reputation: 349.6
Votes: 52

    Battletag: postrow.ID_BATTLE_NET} 
Post Posted: 27-02-2013, 18:29:11 | Translate post to: ... (Click for more languages)

Aveam aceasi problema dar done ,Scuze daca am trezit din nou .. .topicu , dar daca nu se intelege o data ,nu se va intelege niciodata pe viitor.
0 0
  
Back to top
View user's profile Send private message Yahoo! Messenger ID
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Freakz Forum Index -> Trash Bin -> CS 2006-2019 (Archived) -> Resources  


The time now is 14-08-2025, 09:44:06
Copyright info

Based on phpBB ro/com
B

 
 
 







I forgot my password