[Pomoc]Kako da skratim ovaj red

Započeo Orion, Oktobar 11, 2011, 22:10:35 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

Skripta koju koristim: gf edit
Detaljan opis problema:ddobivam onaj errora da mi je red predugacak
Dio skripte:if(PlayerInfo[playerid][pMember] == 6 || PlayerInfo[playerid][pMember] == 5 || PlayerInfo[playerid][pLeader] == 6 || PlayerInfo[playerid][pLeader] == 5 || PlayerInfo[playerid][pMember] == 12 || PlayerInfo[playerid][pLeader] == 12 || PlayerInfo[playerid][pMember] == 13 || PlayerInfo[playerid][pLeader] == 13 || PlayerInfo[playerid][pMember] == 8 || PlayerInfo[playerid][pLeader] == 8 || PlayerInfo[playerid][pMember] == 14 || PlayerInfo[playerid][pLeader] == 14 || PlayerInfo[playerid][pMember] == 15 || PlayerInfo[playerid][pLeader] == 15)
Neke slike/video za lakse dobivanje pomoci(neobavezno):

Moj predlog ti je da napravis ovako:

new L;
L == PlayerInfo[playerid][pLeader];
new M;
M == PlayerInfo[playerid][pMember];

i onda umesto da pises sve ovo

if(PlayerInfo[playerid][pMember] == 6 || PlayerInfo[playerid][pMember] == 5 || PlayerInfo[playerid][pLeader] == 6 || PlayerInfo[playerid][pLeader] == 5 || PlayerInfo[playerid][pMember] == 12 || PlayerInfo[playerid][pLeader] == 12 || PlayerInfo[playerid][pMember] == 13 || PlayerInfo[playerid][pLeader] == 13 || PlayerInfo[playerid][pMember] == 8 || PlayerInfo[playerid][pLeader] == 8 || PlayerInfo[playerid][pMember] == 14 || PlayerInfo[playerid][pLeader] == 14 || PlayerInfo[playerid][pMember] == 15 || PlayerInfo[playerid][pLeader] == 15)

Napises ovako

if(M == 6 ||M == 5 || L == 6 || L == 5 || M == 12 ||L == 12 || M == 13 || L == 13 || M == 8 || L == 8 || M == 14 || L == 14 || M == 15 ||L == 15)
Poslednja Izmena: Oktobar 11, 2011, 22:26:41 POSLE PODNE od dock

if(PlayerInfo[playerid][pMember] == 1 || PlayerInfo[playerid][pLeader] == 1)

ne slusaj dock-a, nije ti plaho pomogao :)
Uradi sebi fini stock i neces imati problema :D

evo ti na brzinu nesto sam smlatio, ti samo dodaj pored jos  koje  ID od  organizacija trebas :)

stock IsAMafia(playerid)
{
if(IsPlayerConnected(playerid))
{
    new leader = PlayerInfo[playerid][pLeader];
    new member = PlayerInfo[playerid][pMember];
    if(member==5 || member==6|| member==8)
{
    return 1;
}
else if(leader==5 || leader==6 || leader==8)
{
    return 1;
}
}
return 0;
}


I umjesto tog tvog silnog
if(PlayerInfo[playerid][pMember] == 6 || PlayerInfo[playerid][pMember] == 5 || PlayerInfo[playerid][pLeader] == 6 || PlayerInfo[playerid][pLeader] == 5 || PlayerInfo[playerid][pMember] == 12 || PlayerInfo[playerid][pLeader] == 12 || PlayerInfo[playerid][pMember] == 13 || PlayerInfo[playerid][pLeader] == 13 || PlayerInfo[playerid][pMember] == 8 || PlayerInfo[playerid][pLeader] == 8 || PlayerInfo[playerid][pMember] == 14 || PlayerInfo[playerid][pLeader] == 14 || PlayerInfo[playerid][pMember] == 15 || PlayerInfo[playerid][pLeader] == 15)



stavis samo
if(IsAMafia(playerid))

Citat: dock poslato Oktobar 11, 2011, 22:26:21 POSLE PODNE
Moj predlog ti je da napravis ovako:

new L;
L == PlayerInfo[playerid][pLeader];
new M;
M == PlayerInfo[playerid][pMember];

i onda umesto da pises sve ovo

if(PlayerInfo[playerid][pMember] == 6 || PlayerInfo[playerid][pMember] == 5 || PlayerInfo[playerid][pLeader] == 6 || PlayerInfo[playerid][pLeader] == 5 || PlayerInfo[playerid][pMember] == 12 || PlayerInfo[playerid][pLeader] == 12 || PlayerInfo[playerid][pMember] == 13 || PlayerInfo[playerid][pLeader] == 13 || PlayerInfo[playerid][pMember] == 8 || PlayerInfo[playerid][pLeader] == 8 || PlayerInfo[playerid][pMember] == 14 || PlayerInfo[playerid][pLeader] == 14 || PlayerInfo[playerid][pMember] == 15 || PlayerInfo[playerid][pLeader] == 15)

Napises ovako

if(M == 6 ||M == 5 || L == 6 || L == 5 || M == 12 ||L == 12 || M == 13 || L == 13 || M == 8 || L == 8 || M == 14 || L == 14 || M == 15 ||L == 15)


puno hvala moze lock

Jesi to ozbiljno uradio kako ti je dock rekao ?
Kad uradis po ovom mom tj. kreiras stock  dje god oces mozes stavljati if(IsAMafia(playerid))

A po dock-ovom ces morat u svakoj komandi kreirati
new L;
L == PlayerInfo[playerid][pLeader];
new M;
M == PlayerInfo[playerid][pMember];


i Onda opt. silni red upisivat :S
Al i ne cudi me kad malo bolje razmislim, takvi su balkanci "Sto bi jednostavno, kad moze i komplikovano..."

if(PlayerInfo[playerid][pMember] == 6 || PlayerInfo[playerid][pMember] == 5 || PlayerInfo[playerid][pLeader] == 6 || PlayerInfo[playerid][pLeader] == 5 || PlayerInfo[playerid][pMember] == 12 || PlayerInfo[playerid][pLeader] == 12 || PlayerInfo[playerid][pMember] == 13
|| PlayerInfo[playerid][pLeader] == 13 || PlayerInfo[playerid][pMember] == 8 || PlayerInfo[playerid][pLeader] == 8 || PlayerInfo[playerid][pMember] == 14 || PlayerInfo[playerid][pLeader] == 14 || PlayerInfo[playerid][pMember] == 15 || PlayerInfo[playerid][pLeader] == 15)


mozes enter samo na pola ili gdjegod...
Poslednja Izmena: Oktobar 11, 2011, 23:59:17 POSLE PODNE od Dude