/*
Adminszolgálat szkript
Készítõ: Sheet - 2011
*/
//----------------------
#include <a_samp>
//----------------------
#define COLOR_RED 0xFF0000FF
#define COLOR_GREEN 0x008000FF
#define COLOR_YELLOW 0xFFFF00FF
//----------------------
new Text3D: ASZ;
new bool: Adminszolgalat[MAX_PLAYERS];
//----------------------
public OnFilterScriptInit() {SendClientMessageToAll(COLOR_GREEN, \"Sheet adminszolgálat betöltve!\"); print(\"Sheet adminszolgálat betöltve!\"); return 1;}
public OnFilterScriptExit() {SendClientMessageToAll(COLOR_GREEN, \"Sheet adminszolgálat kikapcsolva!\"); print(\"Sheet adminszolgálat kikapcsolva!\"); return 1;}
public OnPlayerCommandText(playerid, cmdtext[])
{
new sendername[MAX_PLAYER_NAME];
new string[128];
if (strcmp(\"/aduty\", cmdtext, true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(IsPlayerAdmin(playerid))
{
if(Adminszolgalat[playerid] == false)
{
ASZ = Create3DTextLabel(\"RCON Admin Szolgálatban\", COLOR_RED, 0.0, 0.0, 2.0, 40, 0, 0);
Attach3DTextLabelToPlayer(ASZ, playerid, 0.0, 0.0, 0.4);
for(new i = 0; i < MAX_PLAYERS; i++) ShowPlayerNameTagForPlayer(playerid, i, true);
GetPlayerName(playerid, sendername, sizeof(sendername));
SendClientMessageToAll(COLOR_GREEN, \"-------------------------------\");
format(string, sizeof(string), \"RCON admin %s szolgálatba lépett!\", sendername);
SendClientMessageToAll(COLOR_YELLOW,string);
SendClientMessageToAll(COLOR_GREEN, \"-------------------------------\");
Adminszolgalat[playerid] = true;
}
else if(Adminszolgalat[playerid] == true)
{
Delete3DTextLabel(ASZ);
for(new i = 0; i < MAX_PLAYERS; i++) ShowPlayerNameTagForPlayer(playerid, i, false);
GetPlayerName(playerid, sendername, sizeof(sendername));
SendClientMessageToAll(COLOR_GREEN, \"-------------------------------\");
format(string, sizeof(string), \"RCON admin %s kilépett a szolgálatból!\", sendername);
SendClientMessageToAll(COLOR_YELLOW,string);
SendClientMessageToAll(COLOR_GREEN, \"-------------------------------\");
Adminszolgalat[playerid] = false;
}
}
else return SendClientMessage(playerid, COLOR_RED, \"Nem vagy RCON admin!\");
}
return 1;
}
return 0;
}