[POMOC]G CHAT

Započeo xLanmi, Novembar 29, 2014, 01:09:40 PRE PODNE

prethodna tema - sledeća tema

0 članova i 2 gostiju pregledaju ovu temu.

Skripta koju koristim:Moj Edit Upa
Problem:E Ovako imam jedan problem izbacuje mi samo admini/helperi/promoteri kada kucam /g jer ja sam dodavao za promotera i admina bilo samo za helpera ali nece stalno izbacuje kao da nisam nista...
Deo Skripte:LINIJA SAMO PROMOTERI/ADMINI/HELPERI
if(PlayerInfo[playerid][pPromoter] < 1 || PlayerInfo[playerid][pAdmin] < 1 || PlayerInfo[playerid][pHelper] < 1 ) return SCM(playerid, -1, ""ORANGE"[GM:RP] "SIVA"Samo Promoteri/Admini/Helperi!");
Ceo /g chat
YCMD:g(playerid, params[],help)
{
    #pragma unused help
    if(UlogovanProvera[playerid] == 0) return SCM(playerid,-1,"GM:RP | "CRVENA"Moras se ulogovati da bi koristio ovu komandu!");
if(PlayerInfo[playerid][pPromoter] < 1 || PlayerInfo[playerid][pAdmin] < 1 || PlayerInfo[playerid][pHelper] < 1 ) return SCM(playerid, -1, ""ORANGE"[GM:RP] "SIVA"Samo Promoteri/Admini/Helperi!");
new text[64], string[128], sendername[MAX_PLAYER_NAME];
GetPlayerName(playerid, sendername, sizeof(sendername));
if(sscanf(params, "s[1024]", text)) return SCM(playerid, -1, ""ORANGE"GM:RP Pomoc | "SIVA" /a [tekst]");
new arank[124];
if(PlayerInfo[playerid][pAdmin] == 1) { arank = "Admin"; }
else if(PlayerInfo[playerid][pAdmin] == 2) { arank = "Admin"; }
else if(PlayerInfo[playerid][pAdmin] == 3) { arank = "Admin"; }
else if(PlayerInfo[playerid][pAdmin] == 4) { arank = "Head Admin"; }
else if(PlayerInfo[playerid][pAdmin] == 5) { arank = "Direktor"; }
else if(PlayerInfo[playerid][pAdmin] == 6) { arank = "Vlasnik"; }
else if(PlayerInfo[playerid][pAdmin] == 7) { arank = "Vlasnik & Skripter"; }
else if(PlayerInfo[playerid][pHelper] == 1) { arank = "Helper Level 1"; }
else if(PlayerInfo[playerid][pHelper] == 2) { arank = "Helper Level 2"; }
else if(PlayerInfo[playerid][pHelper] == 3) { arank = "Helper Level 3"; }
else if(PlayerInfo[playerid][pHelper] == 4) { arank = "Zamenik Head Helpera"; }
else if(PlayerInfo[playerid][pHelper] == 5) { arank = "Head Helper"; }
else if(PlayerInfo[playerid][pPromoter] == 1) { arank = "Promoter"; }
format(string, sizeof(string), ""SIVA"G | "SIVA"%s "CRVENA"%s"BELA": %s",arank,sendername,text);
AdminGameMasterPromoter(-1,string);
return 1;
}

ADMIN GAMEMASTER PROMOTER
forward AdminGameMasterPromoter(color, string[]);
public AdminGameMasterPromoter(color, string[])
{
foreach(Player,i)
{
if(PlayerInfo[i][pHelper] >= 1|| PlayerInfo[i][pAdmin] >= 1 || PlayerInfo[i][pPromoter] >= 1)
{
SendClientMessage(i, color, string);
}
}
}

Slika neka://

One And Only
Old Member
Since AVGUST 2013. :)
GAME OVER - SCRIPTING
SINCE 2009 - 2020

U tom uslovu ide && umesto || jer ako stavis || tj. ili tebi ce on proveriti da li je bar jedno od tih < 1 ako jeste nece proci uslov. A ako stavis && on ce proveriti da li su svi < 1 i ako je jedno bar razlicito uslov nece biti ispunjen i proci ce tj. on je promoter,helper ili admin

Probaj ovako dodat gore u ycmd:

if(PlayerInfo[playerid][pAdmin] >= 1 || PlayerInfo[playerid][pHelper] >= 1 || PlayerInfo[playerid][pPromoter] >= 1)

procitaj od Gagia post pa ćeš skuzit #Dado
if(PlayerInfo[playerid][pPromoter] < 1 || PlayerInfo[playerid][pAdmin] < 1 || PlayerInfo[playerid][pHelper] < 1 ) return SCM(playerid, -1, ""ORANGE"[GM:RP] "SIVA"Samo Promoteri/Admini/Helperi!");
// novi:
if(PlayerInfo[playerid][pPromoter] < 1 && PlayerInfo[playerid][pAdmin] < 1 && PlayerInfo[playerid][pHelper] < 1 ) return SCM(playerid, -1, ""ORANGE"[GM:RP] "SIVA"Samo Promoteri/Admini/Helperi!");