Witamy w Nieoficjalnym polskim support'cie AMX Mod X
Witamy w Nieoficjalnym polskim support'cie AMX Mod X, jak w większości społeczności internetowych musisz się zarejestrować aby móc odpowiadać lub zakładać nowe tematy, ale nie bój się to jest prosty proces w którym wymagamy minimalnych informacji.
|
Pokazywanie motd niekoniecznie z pliku .txt
#1 Gość_deLL_*
Napisano 03.01.2010 15:38
Jak zrobić żeby np. po wpisaniu /info pokazał się MOTD ale nie z pliku np. info.txt tylko motd z tym co wpiszę w .*sma?
#2
Napisano 03.01.2010 17:59
#3
Napisano 03.01.2010 19:11
show_motd
[ Main ] [ Core ] [ amxmodx.inc ]
[ comments ]
show_motd - Displays an MOTD style window to a user.
Syntax:
show_motd ( player, const message[], [ const header[] ] )
Type:
Native
Notes:
player is a player index from 1 to 32.
message can either be a filename or a string formatted message. With VGUI2, the message can be HTML formatted.
You can supply an optional title bar for the window. If not supplied, it will default to the server name.
The length of the message should not be more than around 1,200 characters - going over this limit could potentially crash the client.
Czyli:
show_motd ( id, "Jakas wiadomosc z ograniczeniem do 1200 znakow", "naglowek okna motd (ktory nie jest wymagany)" )
#4 Gość_deLL_*
Napisano 03.01.2010 21:03
#5
Napisano 03.01.2010 21:09
napisz nowe bibliotekiA jakoś inaczej żeby limit znaków był większy niż 1200?
znaczy się możesz(chyba) dać więcej ale nie będzie działał pasek przewijania na stronie
#6
Napisano 03.01.2010 21:19
potentially crash the client
#7
Napisano 04.01.2010 01:01
#8
Napisano 04.01.2010 08:47
#9
Napisano 04.01.2010 10:56
public cmd_who(id) { static motd[1000],header[100],name[32],len,i len = 0 new team[32] static players[32], numplayers get_players(players, numplayers, "a") new playerid // Table i background len += formatex(motd[len],sizeof motd - 1 - len,"<body bgcolor=#000000 text=#FFB000>") len += formatex(motd[len],sizeof motd - 1 - len,"<center><table width=700 border=1 cellpadding=4 cellspacing=4>") len += formatex(motd[len],sizeof motd - 1 - len,"<tr><td>Name</td><td>Klasa</td><td>Level</td><td>Team</td></tr>") //Title formatex(header,sizeof header - 1,"Diablo Mod Statystyki") for (i=0; i< numplayers; i++) { playerid = players[i] if ( get_user_team(playerid) == 1 ) team = "Terrorist" else if ( get_user_team(playerid) == 2 ) team = "CT" else team = "Spectator" get_user_name( playerid, name, 31 ) get_user_name( playerid, name, 31 ) len += formatex(motd[len],sizeof motd - 1 - len,"<tr><td>%s</td><td>%s</td><td>%d</td><td>%s</td></tr>",name,Race[player_class[playerid]], player_lvl[playerid],team) } len += formatex(motd[len],sizeof motd - 1 - len,"</table></center>") show_motd(id,motd,header) }
Chcesz wysłać do mnie PW ? użyj nazwy GoQ zamiast G[o]Q
Chcesz Kupić moduł płatności via Pukawka,Tserwery, Gamesol, Zabijaka do mojego sklepu? napisz PW cena to tylko 10 zł/sztuka
GG:6022845 (nie pomagam za free osobom ponizej rangi MoD)
Użytkownicy przeglądający ten temat: 0
0 użytkowników, 0 gości, 0 anonimowych