Skocz do zawartości

Witamy w Nieoficjalnym polskim support'cie AMX Mod X

Witamy w Nieoficjalnym polskim support'cie AMX Mod X, jak w większości społeczności internetowych musisz się zarejestrować aby móc odpowiadać lub zakładać nowe tematy, ale nie bój się to jest prosty proces w którym wymagamy minimalnych informacji.
  • Rozpoczynaj nowe tematy i odpowiedaj na inne
  • Zapisz się do tematów i for, aby otrzymywać automatyczne uaktualnienia
  • Dodawaj wydarzenia do kalendarza społecznościowego
  • Stwórz swój własny profil i zdobywaj nowych znajomych
  • Zdobywaj nowe doświadczenia

Dołączona grafika Dołączona grafika

Guest Message by DevFuse
 

Zdjęcie

Wyświetlywanie jak w cod


  • Zamknięty Temat jest zamknięty
12 odpowiedzi w tym temacie

#1 LucKy_skiLL

    Godlike

  • Power User

Reputacja: 163
Profesjonalista

  • Postów:1 301
  • GG:
  • Lokalizacja:Kraków
Offline

Napisano 27.08.2011 09:35

Mógłby ktoś przerobić ten kod, aby level itp. wyświetlał się tak samo jak w call of duty tzn. w hudzie


public RefreshLevel(id)
{
if(is_user_alive(id))
{
  new format_text[256];
 
  if(gbSeeLevel[id])
  {
   formatex(format_text, sizeof(format_text) - 1, "Level: %d / 100 Exp: %d / %d (+%d) Monety: %d", gPlayerLevel[id], gPlayerExp[id], gszExperienceTable[gPlayerLevel[id]], gszExperienceTable[gPlayerLevel[id]] - gPlayerExp[id], gPlayerCoins[id]);
   /* (+%d exp) */
   /* gszExperienceTable[gPlayerLevel[id]] - gPlayerExp[id] */
  
   /* (%d procent) */
   /* (gPlayerExp[id] * 100) / gszExperienceTable[gPlayerLevel[id]], "%%" */
  }
  else
  {
   formatex(format_text, sizeof(format_text) - 1, "");
  }
 
  message_begin(MSG_ONE, gmsgStatusText, {0,0,0}, id);
  write_byte(0);
  write_string(format_text);
  message_end();
}                                                          
}

  • +
  • -
  • 0

Oglądasz seriale typu: The Flash, Arrow, Daredevil, The Walking Dead? Jeśli tak, to zapraszam na mój kanał YouTube


#2 DarkGL

    Nie oddam ciasteczka !

  • Administrator

Reputacja: 6 554
Godlike

  • Postów:11 979
  • GG:
  • Steam:steam
  • Imię:Rafał
  • Lokalizacja:Warszawa
Offline

Napisano 27.08.2011 11:04

new SyncHudObj; zmienna globalna

SyncHudObj = CreateHudSyncObj(); w plugin_init

new SyncHudObj;

SyncHudObj = CreateHudSyncObj();

public RefreshLevel(id)
{
    if(is_user_alive(id))
    {
   	 new format_text[256];
   	 
   	 if(gbSeeLevel[id])
   	 {
   		 formatex(format_text, sizeof(format_text) - 1, "Level: %d / 100 Exp: %d / %d (+%d) Monety: %d", gPlayerLevel[id], gPlayerExp[id], gszExperienceTable[gPlayerLevel[id]], gszExperienceTable[gPlayerLevel[id]] - gPlayerExp[id], gPlayerCoins[id]);
   		 /* (+%d exp) */
   		 /* gszExperienceTable[gPlayerLevel[id]] - gPlayerExp[id] */
   		 
   		 /* (%d procent) */
   		 /* (gPlayerExp[id] * 100) / gszExperienceTable[gPlayerLevel[id]], "%%" */
   	 }
   	 else
   	 {
   		 formatex(format_text, sizeof(format_text) - 1, "");
   	 }
   	 
   	 set_hudmessage(0, 255, 0, 0.21, 0.02, 0, 0.0, 0.3, 0.0, 0.0);
   	 ShowSyncHudMsg(id, SyncHudObj, format_text);
    }                                                     	 
}

  • +
  • -
  • 0

#3 LucKy_skiLL

    Godlike

  • Autor tematu
  • Power User

Reputacja: 163
Profesjonalista

  • Postów:1 301
  • GG:
  • Lokalizacja:Kraków
Offline

Napisano 27.08.2011 12:16

No prawie działa, poniewaz raz na 30sekund mignie :D
  • +
  • -
  • 0

Oglądasz seriale typu: The Flash, Arrow, Daredevil, The Walking Dead? Jeśli tak, to zapraszam na mój kanał YouTube


#4 DarkGL

    Nie oddam ciasteczka !

  • Administrator

Reputacja: 6 554
Godlike

  • Postów:11 979
  • GG:
  • Steam:steam
  • Imię:Rafał
  • Lokalizacja:Warszawa
Offline

Napisano 27.08.2011 12:18

public RefreshLevel(id)
{
	if(is_user_alive(id))
	{
     	new format_text[256];
    	 
     	if(gbSeeLevel[id])
     	{
             	formatex(format_text, sizeof(format_text) - 1, "Level: %d / 100 Exp: %d / %d (+%d) Monety: %d", gPlayerLevel[id], gPlayerExp[id], gszExperienceTable[gPlayerLevel[id]], gszExperienceTable[gPlayerLevel[id]] - gPlayerExp[id], gPlayerCoins[id]);
             	/* (+%d exp) */
             	/* gszExperienceTable[gPlayerLevel[id]] - gPlayerExp[id] */
            	 
             	/* (%d procent) */
             	/* (gPlayerExp[id] * 100) / gszExperienceTable[gPlayerLevel[id]], "%%" */
     	}
     	else
     	{
             	formatex(format_text, sizeof(format_text) - 1, "");
     	}
    	 
     	set_hudmessage(0, 255, 0, 0.21, 0.02, 0, 0.0, 99999.0, 0.0, 0.0)
     	ShowSyncHudMsg(id, SyncHudObj, format_text);
	}                                                       	 
}
uruchamiaj częściej to funkcje bo może iny plugin nadpisać wiadomośc
  • +
  • -
  • 0

#5 LucKy_skiLL

    Godlike

  • Autor tematu
  • Power User

Reputacja: 163
Profesjonalista

  • Postów:1 301
  • GG:
  • Lokalizacja:Kraków
Offline

Napisano 27.08.2011 12:28

erroe 001: expected token: ";", but found "-identifier-"


Błąd na tej lini:

ShowSyncHudMsg(id, SyncHudObj, format_text);


A plugin sprawdzam na czystym serwerze wiec nie ma z czym sie nadpisac
  • +
  • -
  • 0

Oglądasz seriale typu: The Flash, Arrow, Daredevil, The Walking Dead? Jeśli tak, to zapraszam na mój kanał YouTube


#6 speedkill

    Godlike

  • Przyjaciel

Reputacja: 1 592
Godlike

  • Postów:2 733
  • GG:
  • Steam:steam
  • Imię:Michał
  • Lokalizacja:Prudnik
Offline

Napisano 27.08.2011 14:24


public RefreshLevel(id)

{

    	if(is_user_alive(id))

    	{

    	new format_text[256];

        

    	if(gbSeeLevel[id])

    	{

            	formatex(format_text, sizeof(format_text) - 1, "Level: %d / 100 Exp: %d / %d (+%d) Monety: %d", gPlayerLevel[id], gPlayerExp[id], gszExperienceTable[gPlayerLevel[id]], gszExperienceTable[gPlayerLevel[id]] - gPlayerExp[id], gPlayerCoins[id]);

            	/* (+%d exp) */

            	/* gszExperienceTable[gPlayerLevel[id]] - gPlayerExp[id] */

                

            	/* (%d procent) */

            	/* (gPlayerExp[id] * 100) / gszExperienceTable[gPlayerLevel[id]], "%%" */

    	}

    	else

    	{

            	formatex(format_text, sizeof(format_text) - 1, "");

    	}

        

    	set_hudmessage(0, 255, 0, 0.21, 0.02, 0, 0.0, 99999.0, 0.0, 0.0);

    	ShowSyncHudMsg(id, SyncHudObj, format_text);

    	}                                                               

}


  • +
  • -
  • 1

If you can dream it, you can do it.


#7 LucKy_skiLL

    Godlike

  • Autor tematu
  • Power User

Reputacja: 163
Profesjonalista

  • Postów:1 301
  • GG:
  • Lokalizacja:Kraków
Offline

Napisano 27.08.2011 17:57

Teraz działa jeszcze tylko mógłbyś przenieść go pod radar i z enterami
Level: %d / 100^nExp: %d / %d (+%d)^nMonety: %d

  • +
  • -
  • 0

Oglądasz seriale typu: The Flash, Arrow, Daredevil, The Walking Dead? Jeśli tak, to zapraszam na mój kanał YouTube


#8 speedkill

    Godlike

  • Przyjaciel

Reputacja: 1 592
Godlike

  • Postów:2 733
  • GG:
  • Steam:steam
  • Imię:Michał
  • Lokalizacja:Prudnik
Offline

Napisano 27.08.2011 20:51

AmxxStudio - Generators - Hudmessage Generator i ustawiasz gdzie chcesz ;]
nowa linia to : ^n
  • +
  • -
  • 0

If you can dream it, you can do it.


#9 LucKy_skiLL

    Godlike

  • Autor tematu
  • Power User

Reputacja: 163
Profesjonalista

  • Postów:1 301
  • GG:
  • Lokalizacja:Kraków
Offline

Napisano 27.08.2011 21:48

No wiem wiem, ale zmianiając cokolwiek automatycznie się psuje tzn. mignie raz na 30 sek
  • +
  • -
  • 0

Oglądasz seriale typu: The Flash, Arrow, Daredevil, The Walking Dead? Jeśli tak, to zapraszam na mój kanał YouTube


#10 speedkill

    Godlike

  • Przyjaciel

Reputacja: 1 592
Godlike

  • Postów:2 733
  • GG:
  • Steam:steam
  • Imię:Michał
  • Lokalizacja:Prudnik
Offline

Napisano 28.08.2011 07:10

To daj mi ten twój hudmessage gdzie chcesz to dodam to do tego :)
  • +
  • -
  • 0

If you can dream it, you can do it.


#11 LucKy_skiLL

    Godlike

  • Autor tematu
  • Power User

Reputacja: 163
Profesjonalista

  • Postów:1 301
  • GG:
  • Lokalizacja:Kraków
Offline

Napisano 28.08.2011 11:17

set_hudmessage(42, 255, 42, 0.02, 0.21, 0, 6.0, 0.0)

show_hudmessage(id, "Level: %d / 100^nExp: %d / %d (+%d)^nMonety: %d")

  • +
  • -
  • 0

Oglądasz seriale typu: The Flash, Arrow, Daredevil, The Walking Dead? Jeśli tak, to zapraszam na mój kanał YouTube


#12 speedkill

    Godlike

  • Przyjaciel

Reputacja: 1 592
Godlike

  • Postów:2 733
  • GG:
  • Steam:steam
  • Imię:Michał
  • Lokalizacja:Prudnik
Offline

Napisano 28.08.2011 11:20

Nowa linia to : ^n
public RefreshLevel(id)
{
    	if(is_user_alive(id))
    	{
    	new format_text[256];
       
    	if(gbSeeLevel[id])
    	{
            	formatex(format_text, sizeof(format_text) - 1, "Level: %d / 100 Exp: %d / %d (+%d) Monety: %d", gPlayerLevel[id], gPlayerExp[id], gszExperienceTable[gPlayerLevel[id]], gszExperienceTable[gPlayerLevel[id]] - gPlayerExp[id], gPlayerCoins[id]);
            	/* (+%d exp) */
            	/* gszExperienceTable[gPlayerLevel[id]] - gPlayerExp[id] */
               
            	/* (%d procent) */
            	/* (gPlayerExp[id] * 100) / gszExperienceTable[gPlayerLevel[id]], "%%" */
    	}
    	else
    	{
            	formatex(format_text, sizeof(format_text) - 1, "");
    	}
       
    	set_hudmessage(0, 255, 0, 0.02, 0.21, 0, 0.0, 99999.0, 0.0, 0.0);
    	ShowSyncHudMsg(id, SyncHudObj, format_text);
    	}                                                              
}

  • +
  • -
  • 2

If you can dream it, you can do it.


#13 LucKy_skiLL

    Godlike

  • Autor tematu
  • Power User

Reputacja: 163
Profesjonalista

  • Postów:1 301
  • GG:
  • Lokalizacja:Kraków
Offline

Napisano 28.08.2011 12:40

Wielkie dzięki działa, ale jest problem, po dołączeniu do CT serwer się crashuje

Załączone pliki


  • +
  • -
  • 0

Oglądasz seriale typu: The Flash, Arrow, Daredevil, The Walking Dead? Jeśli tak, to zapraszam na mój kanał YouTube





Użytkownicy przeglądający ten temat: 0

0 użytkowników, 0 gości, 0 anonimowych