sziasztok!
Hoztam neket egy infobox-néven futó FilterScriptet:
Eredeti Készítõ: Bence
[pawn]#include <a_samp>
new Text:doboz, Text:info, Text:csatlakozo, Text:tavozo, Text:jatekosok, Text:ido;
new szamlalo;
new ora, perc, mperc;
forward IdoFrissites();
public IdoFrissites()
{
new string[128];
gettime(ora, perc, mperc);
format(string,sizeof(string),\"Pontos id§: %02d:%02d:%02d\",ora,perc,mperc);
TextDrawSetString(ido,string);
}
public OnFilterScriptInit()
{
new string[128], string2[256];
print(\"|-----------------------------------------------|\");
print(\"| |\");
print(\"| Infobox keszitette: Bence |\");
print(\"| Betoltve |\");
print(\"| |\");
print(\"|-----------------------------------------------|\");
doboz = TextDrawCreate(641.000000, 397.000000, \" Segitségért:/help \");
TextDrawBackgroundColor(doboz, 255);
TextDrawFont(doboz, 1);
TextDrawLetterSize(doboz, 0.500000, 1.000000);
TextDrawColor(doboz, -1);
TextDrawSetOutline(doboz, 1);
TextDrawSetProportional(doboz, 0);
TextDrawUseBox(doboz, 1);
TextDrawBoxColor(doboz, 16777010);
TextDrawTextSize(doboz, 386.000000, 210.000000);
info = TextDrawCreate(398.000000, 387.000000, \"Infobox\");
TextDrawBackgroundColor(info, 16711935);
TextDrawFont(info, 1);
TextDrawLetterSize(info, 0.439999, 1.399999);
TextDrawColor(info, 255);
TextDrawSetOutline(info, 1);
TextDrawSetProportional(info, 1);
csatlakozo = TextDrawCreate(404.000000, 404.000000, \"Scripter:MaD_Dog skype:BauerBence \");
TextDrawBackgroundColor(csatlakozo, 255);
TextDrawFont(csatlakozo, 1);
TextDrawLetterSize(csatlakozo, 0.300000, 1.100000);
TextDrawColor(csatlakozo, 1690894335);
TextDrawSetOutline(csatlakozo, 0);
TextDrawSetProportional(csatlakozo, 1);
TextDrawSetShadow(csatlakozo, 1);
tavozo = TextDrawCreate(404.000000, 415.000000, \" tulaj: Ryan_Stark Skype: cssgamer76\");
TextDrawBackgroundColor(tavozo, 255);
TextDrawFont(tavozo, 1);
TextDrawLetterSize(tavozo, 0.300000, 1.000000);
TextDrawColor(tavozo, 1690894335);
TextDrawSetOutline(tavozo, 0);
TextDrawSetProportional(tavozo, 1);
TextDrawSetShadow(tavozo, 1);
jatekosok = TextDrawCreate(393.000000, 430.000000, \"J˜atkosok sz˜ma: XX/XX\");
TextDrawBackgroundColor(jatekosok, 255);
TextDrawFont(jatekosok, 1);
TextDrawLetterSize(jatekosok, 0.280000, 1.000000);
TextDrawColor(jatekosok, 16711935);
TextDrawSetOutline(jatekosok, 0);
TextDrawSetProportional(jatekosok, 1);
TextDrawSetShadow(jatekosok, 1);
ido = TextDrawCreate(530.000000, 430.000000, \"Pontos id§: XX:XX:XX\");
TextDrawBackgroundColor(ido, 255);
TextDrawFont(ido, 1);
TextDrawLetterSize(ido, 0.300000, 1.000000);
TextDrawColor(ido, 16711935);
TextDrawSetOutline(ido, 0);
TextDrawSetProportional(ido, 1);
TextDrawSetShadow(ido, 1);
SetTimer(\"IdoFrissites\",1000,1);
for(new i; i < MAX_PLAYERS; i ++)
{
if(IsPlayerConnected(i))
{
TextDrawShowForPlayer(i, doboz);
TextDrawShowForPlayer(i, info);
TextDrawShowForPlayer(i, csatlakozo);
TextDrawShowForPlayer(i, tavozo);
TextDrawShowForPlayer(i, jatekosok);
TextDrawShowForPlayer(i, ido);
gettime(ora, perc, mperc);
format(string, sizeof(string), \"J˜t¾kosok sz˜ma: %d/%d\", GetOnlinePlayers(), GetMaxPlayers());
format(string2,sizeof(string2),\"Pontos id§: %02d:%02d:%02d\",ora,perc, mperc);
TextDrawSetString(jatekosok, string);
TextDrawSetString(ido, string2);
}
}
return 1;
}
public OnFilterScriptExit()
{
print(\"|-----------------------------------------------|\");
print(\"| |\");
print(\"| Infobox keszitette: Bence |\");
print(\"| Kiveve |\");
print(\"| |\");
print(\"|-----------------------------------------------|\");
TextDrawHideForAll(doboz);
TextDrawDestroy(doboz);
TextDrawHideForAll(info);
TextDrawDestroy(info);
TextDrawHideForAll(csatlakozo);
TextDrawDestroy(csatlakozo);
TextDrawHideForAll(tavozo);
TextDrawDestroy(tavozo);
TextDrawHideForAll(jatekosok);
TextDrawDestroy(jatekosok);
TextDrawHideForAll(ido);
TextDrawDestroy(ido);
return 1;
}
public OnPlayerSpawn(playerid)
{
TextDrawShowForPlayer(playerid, doboz);
TextDrawShowForPlayer(playerid, info);
TextDrawShowForPlayer(playerid, csatlakozo);
TextDrawShowForPlayer(playerid, tavozo);
TextDrawShowForPlayer(playerid, jatekosok);
TextDrawShowForPlayer(playerid, ido);
return 1;
}
public OnPlayerConnect(playerid)
{
szamlalo++;
gettime(ora, perc, mperc);
new string[128], string2[128], string3[128], nev[MAX_PLAYER_NAME];
GetPlayerName(playerid, nev, sizeof(nev));
format(string, sizeof(string), \"%s csatlakozott a szerverhez üdv a MK szerverén! [%02d:%02d ]\", nev, ora, perc);
format(string2, sizeof(string2), \"J˜t¾kosok sz˜ma: %d/%d\", szamlalo, GetMaxPlayers());
format(string3,sizeof(string3),\"Pontos id§: %02d:%02d:%02d\",ora,perc, mperc);
TextDrawSetString(csatlakozo, string);
TextDrawSetString(jatekosok, string2);
TextDrawSetString(ido, string3);
TextDrawShowForPlayer(playerid, doboz);
TextDrawShowForPlayer(playerid, info);
TextDrawShowForPlayer(playerid, csatlakozo);
TextDrawShowForPlayer(playerid, tavozo);
TextDrawShowForPlayer(playerid, jatekosok);
TextDrawShowForPlayer(playerid, ido);
return 1;
}
public OnPlayerDisconnect(playerid, reason)
{
szamlalo--;
gettime(ora, perc);
new indok[3][] = {{\"Id§tull¾p¾s\"},{\"Kil¾p¾s\"},{\"Kirªg˜s\"}};
new string[128], string2[128], nev[MAX_PLAYER_NAME];
GetPlayerName(playerid, nev, sizeof(nev));
format(string, sizeof(string), \"%s elhagyta a szervert (%s) [%02d:%02d ]\", nev, indok[reason], ora, perc);
format(string2, sizeof(string2), \"J˜atekosok sz˜ama: %d/%d!\", szamlalo, GetMaxPlayers());
TextDrawSetString(tavozo, string);
TextDrawSetString(jatekosok, string2);
return 1;
}
stock GetOnlinePlayers()
{
new count,g=GetMaxPlayers();
for(new d; d<g; d++) if(IsPlayerConnected(d) && !IsPlayerNPC(d)) count++;
return count;
}
[/pawn]
Készítõ: Nemtudom ki én csak javítottam
A tulajokat meg ezeket benne hagytam szedjétek ki nyugodtan :angry: :angry: