Zaloguj się by uzyskać pełen dostęp. Nie masz jeszcze konta? Założ je już teraz w kilka sekund.

Wysłany: 2014-02-12, 15:18


Avast99







Wiek: 28
Na forum: 4647 dni
Posty: 135
Nick w MP: Avast99

Piwa: 352

Respekt: 126
Respekt: 126

Witam, prosz? o pomoc B?ad z linijki "if(!zalogowany[playerid])"
Kod:

//RANGI


if(!zalogowany[playerid])
format(str, sizeof(ranga), "{FF0000}[Niezalogowany] (ID:%d)",playerid);



Kod:

error 017: undefined symbol "zalogowany"
warning 215: expression has no effect
error 001: expected token: ";", but found "]"
error 029: invalid expression, assumed zero
error 107: too many error messages on one line


Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-02-12, 15:45


zielo511







Wiek: 29
Na forum: 4910 dni
Posty: 24
Nick w MP: san

Piwa: 2

Respekt: 80

dodaj na g?rze mapy new zalogowany[MAX_PLAYERS];

Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-02-12, 21:03


Avast99







Wiek: 28
Na forum: 4647 dni
Posty: 135
Nick w MP: Avast99

Piwa: 352

Respekt: 126
Respekt: 126

Sorki za nie ogar. Wklei?em to co wys?a? kolega wy?ej do kodu, ale pokaza?y si? b??dy w linijkach
Kod:

if(gTeam[playerid] == TEAM_PD)
C:\Documents and Settings\Moje dokumenty\Rangi.pwn(38) : error 017: undefined symbol "gTeam"
C:\Documents and Settings\Moje dokumenty\Rangi.pwn(38) : warning 215: expression has no effect
C:\Documents and Settings\Moje dokumenty\Rangi.pwn(38) : error 001: expected token: ";", but found "]"
C:\Documents and Settings\Moje dokumenty\Rangi.pwn(38) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Moje dokumenty\Rangi.pwn(38) : fatal error 107: too many error messages on one line

i

Kod:

format(str, sizeof(ranga), "{FF0000}[Niezalogowany] (ID:%d)",playerid);
C:\Documents and Settings\Moje dokumenty\Rangi.pwn(36) : error 017: undefined symbol "str"
C:\Documents and Settings\Moje dokumenty\Rangi.pwn(36) : error 035: argument type mismatch (argument 1)


Ca?o?? skryptu:

Kod:

//Includki
#include <a_samp>
//Publicki
public OnPlayerText(playerid, text[])
{
new ranga[256];
new nick[MAX_PLAYER_NAME];
GetPlayerName(playerid, nick, sizeof(nick));

#define C_ZIELONY "{00A600}"
#define C_JZIELONY "{00FF00}"
#define C_CZERWONY "{FF0000}"
#define C_NIEBIESKI "{0000FF}"
#define C_BIALY "{FFFFFF}"
#define C_ZOLTY "{FFFF00}"

if(IsPlayerAdmin(playerid)) //Tutaj tylko dla admin?w
{
if(strcmp(nick, "Avast99", true)== 0) // Tu wpisujesz nick admina.
format(ranga, sizeof(ranga), "[Head Admin](ID:%d): %s",playerid, text);// Tu wpisujesz rang?, najlepiej w nawiasach.

else

format(ranga, sizeof(ranga), "[Admin](ID:%d): %s", playerid, text); // Dla zwyk?ych administrator?w!
SendPlayerMessageToAll(playerid, ranga);
return 0;
}


//RANGI

new zalogowany[MAX_PLAYERS];

if(!zalogowany[playerid])

format(str, sizeof(ranga), "{FF0000}[Niezalogowany] (ID:%d)",playerid);
else
if(gTeam[playerid] == TEAM_PD)
{
format(str, sizeof str, "{996600}[Pomoc Drogowa]{FFFFFF} {FFDEAD}(ID:%d){FFFFFF}: %s", playerid, text);
}
else
if(jestvip[playerid])
format(str, sizeof(ranga), "{ffff00}%s {ffffff}({ffff00}VIP{ffffff}): %s",PlayerName(playerid),text);
else
if(gTeam[playerid] == TEAM_POLICJA)
{
format(str, sizeof str, "{4169E1}[Policja] {FFFFFF}{FFDEAD}(ID:%d){FFFFFF}: %s", playerid, text);
}
else
if(gTeam[playerid] == TEAM_TAXI)
{
format(str, sizeof str, "{996600}[Taxi]{FFFFFF} {FFDEAD}(ID:%d){FFFFFF}: %s", playerid, text);
}
else
if(gTeam[playerid] == TEAM_TRUCKERS)
{
format(str, sizeof str, "(Kierowca | {FFDEAD}ID:%d{FFFFFF}): %s", playerid, text);
}
SendPlayerMessageToAll(playerid, str);


return 0;

}


Prosz? o pomoc, stawiam piwo.

Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-02-12, 21:13


Pyramid Head

-- TruckeR --






Wiek: 29
Na forum: 5006 dni
Posty: 16
Nick w MP: [V]ektor

Piwa: 6

Respekt: 69

Ten kod jest wyci?gni?ty z gamemoda czy skryptu?

Podpis

NO PAIN. NO GAIN.


Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-02-12, 21:49


Avast99







Wiek: 28
Na forum: 4647 dni
Posty: 135
Nick w MP: Avast99

Piwa: 352

Respekt: 126
Respekt: 126

To jest ca?y skrypt. Nie z gamemoda.

Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-02-12, 22:00


Pyramid Head

-- TruckeR --






Wiek: 29
Na forum: 5006 dni
Posty: 16
Nick w MP: [V]ektor

Piwa: 6

Respekt: 69

Cytat:

if(gTeam[playerid] == TEAM_POLICJA)
{
format(str, sizeof str, "{4169E1}[Policja] {FFFFFF}{FFDEAD}(ID:%d){FFFFFF}: %s", playerid, text);
}


Nie mo?esz w skrypcie stosowa? definicji frakcji kt?re masz zrobione w gamemode. Musisz ten kod wklei? do publica OnPlayerText do gamemode.

Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-02-13, 02:34


IgrexolonO







Wiek: 34
Na forum: 6809 dni
Posty: 1386

Piwa: 1062

Respekt: 651,8
Respekt: 651,8Respekt: 651,8

Ostatnio zmieniony przez IgrexolonO 2014-02-13, 11:19, w całości zmieniany 2 razy  
Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-02-13, 07:10


Avast99







Wiek: 28
Na forum: 4647 dni
Posty: 135
Nick w MP: Avast99

Piwa: 352

Respekt: 126
Respekt: 126

Kod:

C:\Documents and Settings\Moje dokumenty\Rangi.pwn(11) : error 017: undefined symbol "messagecmp"
C:\Documents and Settings\Moje dokumenty\Rangi.pwn(18) : error 017: undefined symbol "gTeam"
C:\Documents and Settings\Moje dokumenty\Rangi.pwn(18) : warning 215: expression has no effect
C:\Documents and Settings\Moje dokumenty\Pobieranie\Rangi.pwn(18) : error 001: expected token: ";", but found "]"
C:\Documents and Settings\Marek\Moje dokumenty\Rangi.pwn(18) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Moje dokumenty\Rangi.pwn(18) : fatal error 107: too many error messages on one line


Po wklejeniu tego od kolegi wy?ej do nowego pliku Pawn

Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-02-13, 11:19


IgrexolonO







Wiek: 34
Na forum: 6809 dni
Posty: 1386

Piwa: 1062

Respekt: 651,8
Respekt: 651,8Respekt: 651,8

Zobacz teraz..

Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-02-13, 15:19


Avast99







Wiek: 28
Na forum: 4647 dni
Posty: 135
Nick w MP: Avast99

Piwa: 352

Respekt: 126
Respekt: 126

Dzi?kuje bardzo.

Ostatni problem jaki mi zosta? to nie pokazywanie si? w og?le tych rang po zalogowaniu si? do frakcji. Przyk?ad


[15:13] <Avast99> (ID:0): e


Usuni?cie kolor?w ze skryptu nic nie da?o

Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-02-13, 16:49


IgrexolonO







Wiek: 34
Na forum: 6809 dni
Posty: 1386

Piwa: 1062

Respekt: 651,8
Respekt: 651,8Respekt: 651,8

"Avast99" napisał/a:

Dzi?kuje bardzo.

Ostatni problem jaki mi zosta? to nie pokazywanie si? w og?le tych rang po zalogowaniu si? do frakcji. Przyk?ad


[15] <Avast99> (ID:0): e


Usuni?cie kolor?w ze skryptu nic nie da?o


Bo u?ywasz tego w skrypcie, a w skrypcie nie definiujesz team?w tylko w mapie.

Dodaj ten 'skrypt' do mapy.

Postaw piwo autorowi tego posta
 

 
Tagi: rangi
Anonymous





Na forum: 245 dni
Posty: 1



Anonymous Koniecznie zajrzyj na:






Skocz do:  
Wyświetl posty z ostatnich:   
GTAONLINE.PL » JĘZYKI PROGRAMOWANIA » PAWN » [INNE] Rangi Ten temat jest zablokowany bez możliwości zmiany postów lub pisania odpowiedzi

Nie możesz pisać nowych tematów
Nie możesz odpowiadać w tematach
Nie możesz zmieniać swoich postów
Nie możesz usuwać swoich postów
Nie możesz głosować w ankietach
Dodaj temat do Ulubionych
Wersja do druku