rcon admin and admin help please!
#1

I'm trying to make it when a player logs into /rcon they automatically get level 1337 admin. What's the code? and do I put it under public OnPlayerSpawn?
Reply
#2

What mode are you using..
Reply
#3

Godfather edit
Reply
#4

Код:
new IsRconAdmin[MAX_PLAYERS];
Код:
public OnGameModeInit()
{
  SetTimer("AdminCheck", 1000, 1);
  return 1;
}
Код:
public OnPlayerConnect(playerid)
{
  IsRconAdmin[playerid] = 0;
  return 1;
}
Код:
forward AdminCheck();
public AdminCheck()
{
  for(new i; i<MAX_PLAYERS; i++)
  {
    if(IsPlayerAdmin(i) && IsRconAdmin[i] == 0)
    {
	  IsRconAdmin[i] = 1;
      OnPlayerRconLogin(i);
    }
  }
}

forward OnPlayerRconLogin(playerid);
public OnPlayerRconLogin(playerid)
{
  SendClientMessage(playerid, 0xFFFF00AA, "You logged in as rcon Admin!");
  //adminlevel[playerid] == 1337; 
  return 1;
}
Reply
#5

Looks good and all but when I try to compile the compiler crashes but the box stays up but no message comes up.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)