Üdv!
Ez a script arra szolgál hogy megmutatja hány rcon admin van online.
A scriptet én írtam ha kérdésetek van kérdezzetek nyugodtan!
/********************************************
-------------[Online Rcon Admin]-------------
-----------[Készítette: John_Cena]-----------
*********************************************/
#include
#include
new Text:AdminText[MAX_PLAYERS];
new OnlineAdmin;
new emberek[MAX_PLAYERS];
public OnFilterScriptInit()
{
SetTimer(\"Idozit\",500,1);
return 1;
}
public OnPlayerConnect(playerid)
{
AdminText[playerid] = TextDrawCreate(15.0, 320.0, \" \");
TextDrawBackgroundColor(AdminText[playerid], 255);
TextDrawFont(AdminText[playerid], 2);
TextDrawLetterSize(AdminText[playerid], 0.40, 1.40);
if (IsPlayerAdmin(playerid)) OnlineAdmin++;
if (IsPlayerAdmin(playerid)) emberek[playerid]++;
return 1;
}
public OnPlayerDisconnect(playerid, reason)
{
TextDrawDestroy(AdminText[playerid]);
if (IsPlayerAdmin(playerid)) OnlineAdmin--;
if (IsPlayerAdmin(playerid)) emberek[playerid]--;
return 1;
}
forward Idozit();
public Idozit()
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
new string[264];
format(string,sizeof(string), \"~w~Online Rcon Admin: ~r~%i\", OnlineAdmin);
TextDrawSetString(AdminText, string);
if(OnlineAdmin > 0)
{
format(string,sizeof(string), \"~w~Online Rcon Admin: ~g~%i\", OnlineAdmin);
TextDrawSetString(AdminText, string);
}
}
}
return 1;
}
public OnRconLoginAttempt(ip[], password[], success)
{
if(success)
{
for(new i=0; i {
if(IsPlayerConnected(i))
{
OnlineAdmin++;
emberek++;
}
}
}
return 1;
}
CMD:radmins(playerid, params[])
{
new RAdmin[500], Neve[128];
for (new i; i < MAX_PLAYERS; i++)
{
if (IsPlayerConnected(i))
{
GetPlayerName(i, Neve, sizeof(Neve));
if (IsPlayerAdmin(i))
{
format(RAdmin, 500, \"%s{00FF00}%s{FF0000} (id: %i)\\n\", RAdmin, Neve, i);
}
}
}
if(OnlineAdmin > 0)
ShowPlayerDialog(playerid, 10, DIALOG_STYLE_MSGBOX, \"{FFFFFF}Online Rcon Admin:\", RAdmin, \"Rendben\", \"\");
else
ShowPlayerDialog(playerid, 10, DIALOG_STYLE_MSGBOX, \" \", \"{FF0000}Egy rcon admin sincs!\", \"Rendben\", \"\");
return 1;
}
public OnPlayerSpawn(playerid)
{
TextDrawShowForPlayer(playerid, AdminText[playerid]);
return 1;
}
Képek:
Letöltés:
http://data.hu/get/7111278/RconAdminsOnline.rar