[pomoc] rcon i admin/gm label

Započeo MicroSD_
9. Apr. 2012. Zaključano
452
pregleda
3
postova
CH | Marko
5
Underboss
9. Apr. 2012.
Skripta koju koristim: nx
Detaljan opis problema: kada admin/gs ode na duty, label stoji mozda nekih 1 i pol min, i onda nestane.
Dio skripte:
CMD:aon(playerid, params[])
{
if(PlayerInfo == 1 || PlayerInfo == 2 ||PlayerInfo == 3 ||PlayerInfo == 4 ||PlayerInfo == 1337 ||PlayerInfo == 1338)
if(GetPVarInt(playerid, "ADuty") == 0)
{
new string;
    SetPVarInt(playerid, "ADuty", 1);
    new sMsg[ 128 ];
      GetPlayerName( playerid, sMsg, MAX_PLAYER_NAME );

label = Create3DTextLabel("Na Admin Duznosti! (Ne ometaj!)",COLOR_LIGHTBLUE,30.0,40.0,50.0,40.0,0);
Attach3DTextLabelToPlayer(label, playerid, 0.0, 0.0, 0.7);
D_SetPlayerHealth(playerid,200.0);
SetPlayerArmour(playerid,100.0);
format(string, sizeof(string), "Admin %s je na duznosti", sMsg);
ABroadCast(0x33AA33AA,string,1);


 





  //DutyLabel = CreatePlayer3DTextLabel(playerid,"Admin na Duznosti \n Ne ometaj!", 0xE30000FF, 0.0, 0.0, 0.0, 25.0, INVALID_PLAYER_ID,INVALID_VEHICLE_ID,0);

}
return 1;
}

CMD:aoff(playerid, params[])
{
if(PlayerInfo >= 1)
if(GetPVarInt(playerid, "ADuty") == 1)
{
{

    SetPVarInt(playerid, "ADuty", 0);
    new sMsg[ 128 ];
      GetPlayerName( playerid, sMsg, MAX_PLAYER_NAME );
           
D_SetPlayerHealth(playerid,100.0);
Delete3DTextLabel(label);
SetPlayerArmour(playerid,0.0);

SendClientMessage(playerid, COLOR_YELLOW, "Iskljucio si Admin duznost!");

}
}
else
        {
                SendClientMessage(playerid, COLOR_GRAD1, "upaljen ti je duty");
}
  else
  {
    SendClientMessage(playerid, COLOR_GRAD1, "nisi admin");
  }
return 1;
}

Neke slike/video za lakse dobivanje pomoci(neobavezno):

Skripta koju koristim: nx
Detaljan opis problema: Napravio sam public za rcon, da moze samo Peter_Black koristit, ali kada promjenim nick i pokusam se logirat kao rcon, logira me umjesto da mi izbaci text da nisam ta osoba
Dio skripte:
public OnRconLoginAttempt(ip[], password[], success)
{
  if(!success) return 1;
  new pip, pName;
  for(new i; i  {
      //GetPlayerIp,i,pip,sizeof(pip);
      if(!strcmp(ip,pip,true))
      {
          GetPlayerName(i,pName,24);
          if(strcmp(pName, "Peter_Black"))//Only the player with this name can log in rcon ingame.
          {

            SendClientMessage(i, COLOR_RED," Bote, nisi Peter_Black!");//(Kick(i); //You can change this to ban.
        }
      }
  }
  return 1;
}

Neke slike/video za lakse dobivanje pomoci(neobavezno):
pHon
4
Made Man
13. Apr. 2012.
Prvo, što bi ovo trebalo značiti:
if(PlayerInfo == 1 || PlayerInfo == 2 ||PlayerInfo == 3 ||PlayerInfo == 4 ||PlayerInfo == 1337 ||PlayerInfo == 1338)


Jednostavno staviš: if(PlayerInfo>=1)
i to je to..
Marko Koprivanac
5
Underboss
13. Apr. 2012.
Nemoj koristiti
Attach3DTextLabelToPlayer(label, playerid, 0.0, 0.0, 0.7);
Koristi
SetPlayerChatBubble(playerid, "", COLOR_BLACK, 40.0, 6600000);


http://wiki.sa-mp.com/wiki/SetPlayerChatBubble

Bolje je,stajace TACNO IZNAD GLAVE,lepo ce se uklopiti 🙂

Morate biti prijavljeni da biste odgovorili na ovu temu.

Prijava

© 2026 SmartShark. All rights reserved.

Powered by Momentum|v2026.3.001 Alpha