[Pomoć]Megafon

Započeo Rush, Februar 14, 2014, 20:02:23 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 2 gostiju pregledaju ovu temu.

Skripta koju koristim:UP
Detaljan opis problema:Stavio sam da može PD i FBI ali džaba što sam lider piše Niste član PD
Dio skripte:YCMD:m(playerid, params[], help)
{
    //#pragma unused help
    if(UlogovanProvera[playerid] == 0) return SCM(playerid,-1,"MG|RP | "CRVENA"Moras se ulogovati da bi koristio ovu komandu!");
if(PlayerInfo[playerid][pClan] != 1 && PlayerInfo[playerid][pLider] != 1 || PlayerInfo[playerid][pClan] != 7 && PlayerInfo[playerid][pLider] != 7) return SendClientMessage(playerid,-1,""PLAVA"[GRESKA] "SIVA"Samo clanovi LSPD/FBI!");
if(PolicajacNaDuznosti[playerid] == 0) return SendClientMessage(playerid, -1, ""PLAVA"(PD/FBI) "SIVA"Niste uzeli znacku(duznost) pa nemozete koristi tu komandu!");
if(PlayerInfo[playerid][pMutiran] != 0) return SCM(playerid,-1, ""CRVENA"[MG|RP] "SIVA"Mutiran si pa nemozes koristit ovu komandu!");
if(!IsPlayerInAnyVehicle(playerid)) return SCM(playerid,-1, ""PLAVA"[MG|RP] "BELA"Morate biti u vozilu!");
new result[256],text;
if(sscanf(params, "s[100]",text )) return SendClientMessage(playerid, -1, ""PLAVA"MG|RP Pomoc | "BELA"/m [megaphone text]");
new tekst1 = strlen(result);
for(new i = 0; i<tekst1; i++) { if(IsNumeric(result[i])) result[i] = '*' ; }
format(result, sizeof(result), ""ZUTA"[ Policajac %s(megafon): %s ]",GetName(playerid), text);
ProxDetector(60.0, playerid, result,BELA2,BELA2,BELA2,BELA2,BELA2);
return 1;
}

if(PlayerInfo[playerid][pClan] != 1 && PlayerInfo[playerid][pLider] != 1 || PlayerInfo[playerid][pClan] != 7 && PlayerInfo[playerid][pLider] != 7) return SendClientMessage(playerid,-1,""PLAVA"[GRESKA] "SIVA"Samo clanovi LSPD/FBI!");

Stavi ga u

if(PlayerInfo[playerid][pClan] != 1 || PlayerInfo[playerid][pLider] != 1 || PlayerInfo[playerid][pClan] != 7 || PlayerInfo[playerid][pLider] != 7) return SendClientMessage(playerid,-1,""PLAVA"[GRESKA] "SIVA"Samo clanovi LSPD/FBI!");

umesto && stavi || eto gore sam ti pomogo :)

Citat: Horst:3 poslato Februar 14, 2014, 20:09:38 POSLE PODNE
if(PlayerInfo[playerid][pClan] != 1 && PlayerInfo[playerid][pLider] != 1 || PlayerInfo[playerid][pClan] != 7 && PlayerInfo[playerid][pLider] != 7) return SendClientMessage(playerid,-1,""PLAVA"[GRESKA] "SIVA"Samo clanovi LSPD/FBI!");

Stavi ga u

if(PlayerInfo[playerid][pClan] != 1 || PlayerInfo[playerid][pLider] != 1 || PlayerInfo[playerid][pClan] != 7 || PlayerInfo[playerid][pLider] != 7) return SendClientMessage(playerid,-1,""PLAVA"[GRESKA] "SIVA"Samo clanovi LSPD/FBI!");

umesto && stavi || eto gore sam ti pomogo :)
opet isto svejedno ili && ili ||

Ovako ... kada imas primer if(PlayerInfo[playerid][pMember] i hoces i membera i lidera moras stavit || a ako hoces primer sad imas kapiju na kucu i hoces 2-3 igraca i tek tad moras imat kako if(strcmp(sendername, "Rush", true) == 0) && strcmp(sendername,"Rushh", true) == 0) mislim da si me razumeo :))

Citat: Horst:3 poslato Februar 14, 2014, 20:21:03 POSLE PODNE
Ovako ... kada imas primer if(PlayerInfo[playerid][pMember] i hoces i membera i lidera moras stavit || a ako hoces primer sad imas kapiju na kucu i hoces 2-3 igraca i tek tad moras imat kako if(strcmp(sendername, "Rush", true) == 0) && strcmp(sendername,"Rushh", true) == 0) mislim da si me razumeo :))
Kontam ja tebe ali ništa mi to ne znači ovde

Daj mi tvoj fejs dodacu te i resi cu ti problema ...

if(PlayerInfo[playerid][pClan] !< 1 && PlayerInfo[playerid][pLider] !< 1 || PlayerInfo[playerid][pClan] !< 7 && PlayerInfo[playerid][pLider] !< 7) return SendClientMessage(playerid,-1,""PLAVA"[GRESKA] "SIVA"Samo clanovi LSPD/FBI!");

Probaj ovako ?

Citat: Vitez El arambasa poslato Februar 14, 2014, 21:35:25 POSLE PODNE
if(PlayerInfo[playerid][pClan] !< 1 && PlayerInfo[playerid][pLider] !< 1 || PlayerInfo[playerid][pClan] !< 7 && PlayerInfo[playerid][pLider] !< 7) return SendClientMessage(playerid,-1,""PLAVA"[GRESKA] "SIVA"Samo clanovi LSPD/FBI!");

Probaj ovako ?
sad imam errore na tu liniju

nije isto, pazi na && i ||, ovo && ti znaci da igrac mora imati sve te varijable navedene u liniji, a ovo oznacava da mora imati || samo jednu od njih


e to je vec nemoguce, sigurno nisi ni pokusao

Citat: Blaeks poslato Februar 15, 2014, 16:56:17 POSLE PODNE
e to je vec nemoguce, sigurno nisi ni pokusao
Pokušao sam opet piše "Niste clan BGPD/FBI"

YCMD:m(playerid, params[], help)
{
    //#pragma unused help
    if(UlogovanProvera[playerid] == 0) return SCM(playerid,-1,"MG|RP | "CRVENA"Moras se ulogovati da bi koristio ovu komandu!");
if(PlayerInfo[playerid][pClan] != 1 ||PlayerInfo[playerid][pLider] != 1 || PlayerInfo[playerid][pClan] != 7 || PlayerInfo[playerid][pLider] != 7) return SendClientMessage(playerid,-1,""PLAVA"[GRESKA] "SIVA"Samo clanovi LSPD/FBI!");
if(PolicajacNaDuznosti[playerid] == 0) return SendClientMessage(playerid, -1, ""PLAVA"(PD/FBI) "SIVA"Niste uzeli znacku(duznost) pa nemozete koristi tu komandu!");
if(PlayerInfo[playerid][pMutiran] != 0) return SCM(playerid,-1, ""CRVENA"[MG|RP] "SIVA"Mutiran si pa nemozes koristit ovu komandu!");
if(!IsPlayerInAnyVehicle(playerid)) return SCM(playerid,-1, ""PLAVA"[MG|RP] "BELA"Morate biti u vozilu!");
new result[256],text;
if(sscanf(params, "s[100]",text )) return SendClientMessage(playerid, -1, ""PLAVA"MG|RP Pomoc | "BELA"/m [megaphone text]");
new tekst1 = strlen(result);
for(new i = 0; i<tekst1; i++) { if(IsNumeric(result[i])) result[i] = '*' ; }
format(result, sizeof(result), ""ZUTA"[ Policajac %s(megafon): %s ]",GetName(playerid), text);
ProxDetector(60.0, playerid, result,BELA2,BELA2,BELA2,BELA2,BELA2);
return 1;
}

Citat: Blaeks poslato Februar 15, 2014, 19:23:12 POSLE PODNE
YCMD:m(playerid, params[], help)
{
    //#pragma unused help
    if(UlogovanProvera[playerid] == 0) return SCM(playerid,-1,"MG|RP | "CRVENA"Moras se ulogovati da bi koristio ovu komandu!");
if(PlayerInfo[playerid][pClan] != 1 ||PlayerInfo[playerid][pLider] != 1 || PlayerInfo[playerid][pClan] != 7 || PlayerInfo[playerid][pLider] != 7) return SendClientMessage(playerid,-1,""PLAVA"[GRESKA] "SIVA"Samo clanovi LSPD/FBI!");
if(PolicajacNaDuznosti[playerid] == 0) return SendClientMessage(playerid, -1, ""PLAVA"(PD/FBI) "SIVA"Niste uzeli znacku(duznost) pa nemozete koristi tu komandu!");
if(PlayerInfo[playerid][pMutiran] != 0) return SCM(playerid,-1, ""CRVENA"[MG|RP] "SIVA"Mutiran si pa nemozes koristit ovu komandu!");
if(!IsPlayerInAnyVehicle(playerid)) return SCM(playerid,-1, ""PLAVA"[MG|RP] "BELA"Morate biti u vozilu!");
new result[256],text;
if(sscanf(params, "s[100]",text )) return SendClientMessage(playerid, -1, ""PLAVA"MG|RP Pomoc | "BELA"/m [megaphone text]");
new tekst1 = strlen(result);
for(new i = 0; i<tekst1; i++) { if(IsNumeric(result[i])) result[i] = '*' ; }
format(result, sizeof(result), ""ZUTA"[ Policajac %s(megafon): %s ]",GetName(playerid), text);
ProxDetector(60.0, playerid, result,BELA2,BELA2,BELA2,BELA2,BELA2);
return 1;
}

Opet isto