[pawn]
#include <a_samp>
new bool: aDuty[MAX_PLAYERS], Text3D: aDutyText[MAX_PLAYERS], string[128], name[MAX_PLAYER_NAME];
public OnPlayerConnect(playerid) return aDuty[playerid] = false;
public OnPlayerCommandText(playerid, cmdtext[])
{
if(!strcmp(\"/aduty\", cmdtext, true))
{
switch(IsPlayerAdmin(playerid))
{
case false: SendClientMessage(playerid, 0xFFFF00AA,\"Nem vagy admin!\");
case true:
{
switch(aDuty[playerid])
{
case false:
{
GetPlayerName(playerid, name, MAX_PLAYER_NAME);
format(string,sizeof(string),\"%s Adminszolgálatba lépett! Figyelj, mert ha nem szabályszerûen játszol könnyen megbüntenek.\",name);
SendClientMessageToAll(0xFFFF00AA,string);
aDuty[playerid] = true;
aDutyText[playerid] = Create3DTextLabel(\"Adminszolgálat\", 0x008080FF, 30.0, 40.0, 50.0, 40.0, 0);
Attach3DTextLabelToPlayer(aDutyText[playerid], playerid, 0.0, 0.0, 0.7);
}
case true:
{
SendClientMessage(playerid, 0xFFFF00AA,\"Kiléptél a szolgálatból!\");
aDuty[playerid] = false;
Delete3DTextLabel(aDutyText[playerid]);
}
}
}
}
}
return 1;
}
[/pawn]