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

Wysłany: 2013-07-19, 18:52


Rumun







Wiek: 30
Na forum: 5235 dni
Posty: 316
Nick w MP: Rumun

Piwa: 25

Respekt: 69

Witam.Posiadam komend? po kt?rej wpisaniu powinno nada? range.Wszystkie cmd takiej rangi dzia?aj? ,ale ju? ranga przy nicku gracza nie.Oto kod.

Kod:

CMD:vip(playerid, params[])
{
new pname[MAX_PLAYER_NAME+1];
GetPlayerName(playerid, pname, sizeof(pname));
if( !strcmp(pname, "nick", true) || !strcmp(pname, "nick2", true) )
{
if(IsPlayerConnected(playerid))
{
if(!viq[playerid])
{
viq[playerid]=1;
SendClientMessage(playerid, -1, "zalogowano.");
return 1;
}
else if(viq[playerid])
{
SendClientMessage(playerid, -1, "juz sie zalogowales");
return 1;
}
}
}
else
{
Kick(playerid);
}
return 1;
}



I tu ranga.

Kod:

new nuda1[256];

if(viq[playerid])
{
format(nuda1, sizeof(nuda1), " (VIP %d): %s", playerid, text);
SendPlayerMessageToAll(playerid, nuda1);
return 0;
}


Za pomoc piwko i respekt.

Postaw piwo autorowi tego posta
 

 
Wysłany: 2013-07-19, 19:01


radeh2

Performer






Wiek: 32
Na forum: 6329 dni
Posty: 141
Nick w MP: Mr.R

Piwa: 875

Respekt: 120
Respekt: 120

Je?li zmienn?
Kod:

viq[playerid]
nie masz w formacie logicznym(bool) to spr?buj w warunku da?
Kod:

viq[playerid]==1


Postaw piwo autorowi tego posta
 

 
Wysłany: 2013-07-19, 19:15


Rumun







Wiek: 30
Na forum: 5235 dni
Posty: 316
Nick w MP: Rumun

Piwa: 25

Respekt: 69

Czyli pozamienia?

Cytat:

if(!viq[playerid])


na

Kod:

viq[playerid]==1


Wsz?dzie w cmd /vip ? + w randze te? ?

Postaw piwo autorowi tego posta
 

 
Wysłany: 2013-07-19, 19:20


radeh2

Performer






Wiek: 32
Na forum: 6329 dni
Posty: 141
Nick w MP: Mr.R

Piwa: 875

Respekt: 120
Respekt: 120

Je?li masz "!" przed
Kod:

viq[playerid]
to zr?b
Kod:

viq[playerid] != 1


ale nie wiem czy Ci to pomoze

Postaw piwo autorowi tego posta
 

 
Wysłany: 2013-07-19, 19:31


Rumun







Wiek: 30
Na forum: 5235 dni
Posty: 316
Nick w MP: Rumun

Piwa: 25

Respekt: 69

Ale w cmd vip czy w randze ?

Postaw piwo autorowi tego posta
 

 
Wysłany: 2013-07-19, 19:46


radeh2

Performer






Wiek: 32
Na forum: 6329 dni
Posty: 141
Nick w MP: Mr.R

Piwa: 875

Respekt: 120
Respekt: 120

w randze

Postaw piwo autorowi tego posta
 

 
Wysłany: 2013-07-19, 19:55


Rumun







Wiek: 30
Na forum: 5235 dni
Posty: 316
Nick w MP: Rumun

Piwa: 25

Respekt: 69

Zero error?w,ale niestety nie dzia?a.

Postaw piwo autorowi tego posta
 

 
Wysłany: 2013-07-19, 19:55


radeh2

Performer






Wiek: 32
Na forum: 6329 dni
Posty: 141
Nick w MP: Mr.R

Piwa: 875

Respekt: 120
Respekt: 120

pokaz caly public OnPlayerText

Postaw piwo autorowi tego posta
 

 
Wysłany: 2013-07-19, 20:00


Rumun







Wiek: 30
Na forum: 5235 dni
Posty: 316
Nick w MP: Rumun

Piwa: 25

Respekt: 69

Kod:

public OnPlayerText(playerid, text[])
{

if(Muted[playerid] == 1)
{
SendClientMessage(playerid,0xFF0000FF,"Masz zakaz pisania");
return 0;
}

new ad[256];
if(IsPlayerAdmin(playerid)){
format(ad, sizeof(ad)," (Admin %d):%s", playerid, text);
SendPlayerMessageToAll(playerid, ad);
return 0;
}

new te[256];
{
format(te, sizeof(te),"(Gracz %d):%s", playerid, text);
SendPlayerMessageToAll(playerid, te);
return 0;
}

new nuda1[256];
if(viq[playerid] != 1)
{
format(nuda1, sizeof(nuda1), "(ranga %d):%s", playerid, text);
SendPlayerMessageToAll(playerid, nuda1);
return 0;
}

return 1;
}


Postaw piwo autorowi tego posta
 

 
Wysłany: 2013-07-19, 20:06


radeh2

Performer






Wiek: 32
Na forum: 6329 dni
Posty: 141
Nick w MP: Mr.R

Piwa: 875

Respekt: 120
Respekt: 120

Kod:

new nuda1[256];
if(viq[playerid] == 1)
{
format(nuda1, sizeof(nuda1), "(VIP %d):%s", playerid, text);
SendPlayerMessageToAll(playerid, nuda1);
return 0;
}


Sprawdz to

Postaw piwo autorowi tego posta
 

 
Wysłany: 2013-07-19, 20:14


Rumun







Wiek: 30
Na forum: 5235 dni
Posty: 316
Nick w MP: Rumun

Piwa: 25

Respekt: 69

Zn?w error?w 0,a nie dzia?a.

Postaw piwo autorowi tego posta
 

 
Wysłany: 2013-07-19, 21:19


ToxiC.







Wiek: 28
Na forum: 5246 dni
Posty: 3792

Piwa: 8590

Respekt: 1143,8
Respekt: 1143,8

Kod:


new nuda1[256];
if(viq[playerid])
{
format(nuda1, sizeof(nuda1), "(VIP %d):%s", playerid, text);
SendPlayerMessageToAll(playerid, nuda1);
return 0;
}



dodaj po

Kod:


if(Muted[playerid] == 1)
{
SendClientMessage(playerid,0xFF0000FF,"Masz zakaz pisania");
return 0;
}

new ad[256];
if(IsPlayerAdmin(playerid)){
format(ad, sizeof(ad)," (Admin %d):%s", playerid, text);
SendPlayerMessageToAll(playerid, ad);
return 0;
}


Postaw piwo autorowi tego posta
 

 
Wysłany: 2013-07-19, 22:47


Rumun







Wiek: 30
Na forum: 5235 dni
Posty: 316
Nick w MP: Rumun

Piwa: 25

Respekt: 69

Doda?em t? rang? na samej g?rze OnPlayerText i dzia?a.Thx za pomoc. ;)

Postaw piwo autorowi tego posta
 

 
Tagi: rangi :: brak...
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 brak... 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