#include <a_samp>
#include <zcmd>
#define msg SendClientMessage
#define msgall SendClientMessageToAll
new rduty[MAX_PLAYERS];
CMD:rduty(playerid)
{
new string[128];
new nev[MAX_PLAYER_NAME];
GetPlayerName(playerid,nev,sizeof(nev));
if(!IsPlayerAdmin(playerid)) return msg(playerid,-1,\"Nem vagy RCON admin!\");
if(rduty[playerid] == 0)
{
rduty[playerid] = 1;
format(string,sizeof(string),\"%s RCON adminszolgálatba lépett!\",nev);
msgall(-1,string);
}
else
{
rduty[playerid] = 0;
format(string,sizeof(string),\"%s RCON kilépett az adminszolgálatból!\",nev);
msgall(-1,string);
}
return 1;
}
public OnPlayerConnect(playerid)
{
rduty[playerid] = 0;
return 1;
}
public OnPlayerDisconnect(playerid,reason)
{
rduty[playerid] = 0;
return 1;
}
Remélem mûködik.