Balkan SA:MP

PAWN skriptanje, gamemodovi, filterskripte, include fajlovi, mape, pluginovi => Razgovor u vezi PAWN - skriptanja => Temu započeo: Dragan_Kesic poslato Februar 15, 2014, 08:55:47 PRE PODNE

Naslov: [POMOC]Iznad glave da pise[admin]
Poruka od: Dragan_Kesic poslato Februar 15, 2014, 08:55:47 PRE PODNE
Skripta koju koristim:edit UP-a
Detaljan opis problema:zanima me kako da pise [admin] iznad glave admina znam da ide setplayerchatbubble ali kako detaljnije mi objasnite? gde sta trebam da ubacim...
Dio skripte:dacu ako bude potrebno
Neke slike/video za lakse dobivanje pomoci(neobavezno):isto ko i za skriptu
Naslov: Odg: [POMOC]Iznad glave da pise[admin]
Poruka od: Denis_Lapi poslato Februar 15, 2014, 09:59:31 PRE PODNE
Ako te dobro razumem hoces da napravis kad je admin na duty da mu pise to sto zelis

U tom slucaju u komandu /aduty ili kako god ubaci
    SetPlayerChatBubble ( playerid, text, 0xFF0000FF, 100.0 , 10000 ) ;

I prilagodi tekst
Naslov: Odg: [POMOC]Iznad glave da pise[admin]
Poruka od: Dragan_Kesic poslato Februar 15, 2014, 10:06:14 PRE PODNE
ne samo kad je na duty nego uopsteno celi vreme...
Naslov: Odg: [POMOC]Iznad glave da pise[admin]
Poruka od: Denis_Lapi poslato Februar 15, 2014, 10:14:07 PRE PODNE
Napravi public (nazovi kako hoces) napravi forward i u public ubaci if sa uslovom i ako igrac zadovoljava onda da mu se pojavi chatbubble
Naslov: Odg: [POMOC]Iznad glave da pise[admin]
Poruka od: Dragan_Kesic poslato Februar 15, 2014, 10:16:24 PRE PODNE
aj mi ti napravi ja cu ubaciti samo if tj proveru zato sto neznam bas oko pawna mnogo...
Naslov: Odg: [POMOC]Iznad glave da pise[admin]
Poruka od: Horst:3 poslato Februar 15, 2014, 10:28:57 PRE PODNE
forward stavi kod drugih forwarda ne odmah iznad publica

forward AdminIme(playerid);
public AdminIme(playerid);
{
new string[265];
format(string, sizeof(string), "[ADMIN]\n");
SetPlayerChatBubble(playerid, string, 0xFF0000FF, 100.0, 1000000) ;
}

Pod publica


OnGameModeInit
{
AdminIme();
}
Naslov: Odg: [POMOC]Iznad glave da pise[admin]
Poruka od: Dragan_Kesic poslato Februar 15, 2014, 10:36:01 PRE PODNE
dali i tu da ubacim proveru ili netreba?
Naslov: Odg: [POMOC]Iznad glave da pise[admin]
Poruka od: .::^FrAjLo^::. poslato Februar 15, 2014, 10:38:18 PRE PODNE
Citat: Horst:3 poslato Februar 15, 2014, 10:28:57 PRE PODNE
forward stavi kod drugih forwarda ne odmah iznad publica

forward AdminIme(playerid);
public AdminIme(playerid);
{
new string[265];
format(string, sizeof(string), "[ADMIN]\n");
SetPlayerChatBubble(playerid, string, 0xFF0000FF, 100.0, 1000000) ;
}

Pod publica


OnGameModeInit
{
AdminIme();
}


Malo si pogresio ne treba da stavi u "public OnGameModeInit" nego kod "public OnPlayerSpawn" :)
Naslov: Odg: [POMOC]Iznad glave da pise[admin]
Poruka od: Dragan_Kesic poslato Februar 15, 2014, 10:40:16 PRE PODNE
Jel trebam da stavim proveru dal je admin?
Naslov: Odg: [POMOC]Iznad glave da pise[admin]
Poruka od: Nikola_Dzony poslato Februar 15, 2014, 10:41:47 PRE PODNE
Kod forwarda:
forward ChatDouble();
Kod tajmera:
SetTimer("ChatDouble",3000,1);
Pri kraju skripte:
public ChatDouble()
{
foreach (Player, i)
{
if(AfkCheck[i] == 1)
{
SetPlayerChatBubble(i, "[ KORISTI ESCAPE MENI ]", COLOR_LIGHTGREEN, 40.0,4000);
}
if(PlayerInfo[i][pPromoter] == 1)
{
SetPlayerChatBubble(i, "[ S.G. PROMOTER ]", COLOR_YELLOW, 30.0,60000);
}
if(PlayerInfo[i][pAdmin] == 1)
{
SetPlayerChatBubble(i, "[ OSC ]", COLOR_BLACK, 30.0,60000);
}
else if(PlayerInfo[i][pGm] == 1)
{
SetPlayerChatBubble(i, "[ HELPER ]", SVETLOPLAVAA, 30.0,60000);
}
else if(PlayerInfo[i][pGm] == 2)
{
SetPlayerChatBubble(i, "[ HELPER ]", SVETLOPLAVAA, 30.0,60000);
}
else if(PlayerInfo[i][pGm] == 3)
{
SetPlayerChatBubble(i, "[ ZAMENIK V.HELPERA ]", SVETLOPLAVAA, 30.0,60000);
}
else if(PlayerInfo[i][pGm] == 4)
{
SetPlayerChatBubble(i, "[ VODJA HELPERA ]", SVETLOPLAVAA, 30.0,60000);
}
else if(PlayerInfo[i][pAdmin] == 2)
{
SetPlayerChatBubble(i, "[ OSC ]", COLOR_BLACK, 30.0,60000);
}
else if(PlayerInfo[i][pAdmin] == 3)
{
SetPlayerChatBubble(i, "[ OSC ]", COLOR_BLACK, 30.0,60000);
}
else if(PlayerInfo[i][pAdmin] == 4)
{
SetPlayerChatBubble(i, "[ OSC ]", COLOR_BLACK, 30.0,60000);
}
else if(PlayerInfo[i][pAdmin] == 5)
{
SetPlayerChatBubble(i, "[ OSC ]", COLOR_BLACK, 30.0,60000);
}
else if(PlayerInfo[i][pAdmin] == 6)
{
SetPlayerChatBubble(i, "[ OSC ]", COLOR_BLACK, 30.0,60000);
}
else if(PlayerInfo[i][pAdmin] == 1337)
{
SetPlayerChatBubble(i, "[ HEAD OSC ]", COLOR_BLACK, 30.0,60000);
}
else if(PlayerInfo[i][pAdmin] == 1338)
{
SetPlayerChatBubble(i, "[ DIREKTOR ]", COLOR_BLACK, 30.0,60000);
}
else if(PlayerInfo[i][pAdmin] == 1339)
{
SetPlayerChatBubble(i, "[ SUVLASNIK ]", COLOR_BLACK, 30.0,60000);
}
else if(PlayerInfo[i][pAdmin] == 1340)
{
SetPlayerChatBubble(i, "[ CO - VLASNIK ]", COLOR_BLACK, 30.0,60000);
}
else if(PlayerInfo[i][pAdmin] == 1341)
{
SetPlayerChatBubble(i, "[ VLASNIK ]", COLOR_BLACK, 30.0,60000);
}
else if(PlayerInfo[i][pVip] >= 1)
{
SetPlayerChatBubble(i, "[ DONATORSKI VIP ]", COLOR_RED, 30.0,60000);
}
else if(PlayerInfo[i][pLevel] == 3)
{
SetPlayerChatBubble(i, "[ Turista ]", COLOR_RED, 30.0,60000);
}
else if(PlayerInfo[i][pLevel] >= 40)
{
SetPlayerChatBubble(i, "[ Penzioner ]", COLOR_RED, 30.0,60000);
}
else if(PlayerInfo[i][pKazna] == 1)
{
SetPlayerChatBubble(i, "[ JA SAM KAZNJEN ]", COLOR_RED, 30.0,60000);
}
else if(PlayerInfo[i][pKazna] == 2)
{
SetPlayerChatBubble(i, "[ JA SAM KAZNJEN ]", COLOR_RED, 30.0,60000);
}
else if(GetPVarInt(i,"ESCTajmer") == 1)
{
SetPlayerChatBubble(i, "[ KORISTI ESCCAPE MENI ]", COLOR_LIGHTGREEN, 30.0,60000);
}
}
return 1;
}
Naslov: Odg: [POMOC]Iznad glave da pise[admin]
Poruka od: Dragan_Kesic poslato Februar 15, 2014, 11:03:28 PRE PODNE
if(PlayerInfo[playerid][pAdmin] >= 1)
ovako mi ide provera na moj mod
kad sam ubacio izbacilo mi neke erore da nije mozda zbog provere?
Naslov: Odg: [POMOC]Iznad glave da pise[admin]
Poruka od: Blaeks poslato Februar 15, 2014, 11:17:10 PRE PODNE
if(PlayerInfo[i][pAdmin] > 0)
{
SetPlayerChatBubble(i, "[ admin ]", -1, 30.0,60000);
}
stavi ovo pod OnPlayerUpdate
Naslov: Odg: [POMOC]Iznad glave da pise[admin]
Poruka od: Dragan_Kesic poslato Februar 15, 2014, 12:21:14 POSLE PODNE
   /////////////////////////////////////////////////////////////////////////////////////
   if(PlayerInfo[playerid][pAdmin] > 1)
   {
    SetPlayerChatBubble(playerid, "[ ADMIN ]", -1, 30.0,60000);
    }
    ////////////////////////////////////////////////////////////////////////////////////////
    if(PlayerInfo[playerid][pAdmin] > 2)
   {
    SetPlayerChatBubble(playerid, "[ ADMIN ]", -1, 30.0,60000);
    }
    ////////////////////////////////////////////////////////////////////////////////////////
    if(PlayerInfo[playerid][pAdmin] > 3)
   {
    SetPlayerChatBubble(playerid, "[ ADMIN ]", -1, 30.0,60000);
    }
   /////////////////////////////////////////////////////////////////////////////////////////
    if(PlayerInfo[playerid][pAdmin] > 4)
   {
    SetPlayerChatBubble(playerid, "[ ADMIN ]", -1, 30.0,60000);
    }
    //////////////////////////////////////////////////////////////////////////////////////////
    if(PlayerInfo[playerid][pAdmin] > 5)
   {
    SetPlayerChatBubble(playerid, "[ SUVLASNIK ]", -1, 30.0,60000);
    }
    ///////////////////////////////////////////////////////////////////////////////////////////
    if(PlayerInfo[playerid][pAdmin] > 6)
   {
    SetPlayerChatBubble(playerid, "[ VLASNIK ]", -1, 30.0,60000);
    }
    ///////////////////////////////////////////////////////////////////////////////////////////
    if(PlayerInfo[playerid][pAdmin] > 7)
   {
    SetPlayerChatBubble(playerid, "[ SKRIPTER ]", -1, 30.0,60000);
    }
   ///////////////////////////////////////////////////////////////////////////////////////////
stavio sam ovo pod onplayerupdate,ali kad naprimer dam igracu admin lvl 1 pise suvlasnik dali neko zna sta bih trebao da uradim?
Naslov: Odg: [POMOC]Iznad glave da pise[admin]
Poruka od: Mehmed_Samp poslato Februar 15, 2014, 12:34:54 POSLE PODNE
Na vrh moda stavi ovo:
//////////////////////////////////////////////////////////
#define COLOR_RED       0xFF0000
////////////////////////////////////////////////////////
Pod OnGameModeInit stavi ovo:
///////////////////////////////////////////////////////
SetTimer("ChatDouble",3000,1);
////////////////////////////////////////////////////
A na dnu moda stavi ovo:
//////////////////////////////////////////////////
public ChatDouble()
{
foreach(Player,i)
{
if(PlayerInfo[pAdmin] == 1)
{
SetPlayerChatBubble(i, "[Admin level 1]", COLOR_RED, 30.0,60000);
}
if(PlayerInfo[pAdmin] == 2)
{
SetPlayerChatBubble(i, "[Admin level 2]", COLOR_RED, 30.0,60000);
}
else if(PlayerInfo[pAdmin] == 3)
{
SetPlayerChatBubble(i, "[Head Admin]", COLOR_RED, 30.0,60000);
}
else if(PlayerInfo[pAdmin] == 4)
{
SetPlayerChatBubble(i, "[Direktor]", COLOR_RED, 30.0,60000);
}
else if(PlayerInfo[pAdmin] == 5)
{
SetPlayerChatBubble(i, "[Suvlasnik]", COLOR_RED, 30.0,60000);
}
else if(PlayerInfo[pAdmin] == 6)
{
SetPlayerChatBubble(i, "[Vlasnik]", COLOR_RED, 30.0,60000);
}
else if(PlayerInfo[pAdmin] == 7)
{
SetPlayerChatBubble(i, "[Skripter]", COLOR_RED, 30.0,60000);
}
else if(PlayerInfo[pGM] == 1)
{
SetPlayerChatBubble(i, "[GameMaster level 1]", COLOR_RED, 30.0,60000);
}
else if(PlayerInfo[pGM] == 2)
{
SetPlayerChatBubble(i, "[Head GameMaster]", COLOR_RED, 30.0,60000);
}
}
return 1;
}
///////////////////////////////////////////////////////////////////////////////////

To prilagodi svom modu :D
Naslov: Odg: [POMOC]Iznad glave da pise[admin]
Poruka od: Ermin. poslato Februar 15, 2014, 13:45:29 POSLE PODNE
Ovako kad mu vec ne mozete pomoc nemojte mu ni odmagat, covjek trazi jednu stvar vi njemu dajete tonu stvari koje on ustvari ne trazi -.-

U neki tajmer (Ili koristi tajmer koji vec postoji - OnPlayerUpdate)
SetPlayerChatBubble(playerid, "[ADMIN]", -1, 30.0, 1000);

Edit: Blakes ti je vec dao.
Naslov: Odg: [POMOC]Iznad glave da pise[admin]
Poruka od: Blaeks poslato Februar 15, 2014, 16:55:57 POSLE PODNE
Citat: Blaeks poslato Februar 15, 2014, 11:17:10 PRE PODNE
if(PlayerInfo[i][pAdmin] > 0)
{
SetPlayerChatBubble(i, "[ admin ]", -1, 30.0,60000);
}
stavi ovo pod OnPlayerUpdate
a ti autore ne vidis ovaj moj post ?
Naslov: Odg: [POMOC]Iznad glave da pise[admin]
Poruka od: Dragan_Kesic poslato Februar 15, 2014, 20:29:57 POSLE PODNE
Moze lock resio sam,hvala svima na pomoci ;)