[Pomoc]Problem sa /giverank

Započeo [SG]Davy, Avgust 03, 2011, 13:02:38 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

Skripta koju koristim:Raven's RolePlay 0.3c
Detaljan opis problema:Pa npr. Ja sam lider PD a jedan drugi lik je clan GSF-a i sad ja mu mogu promjenit rank, to jest promjeni mu se skin za org koju ja vodim, a uopce nisam lider njegove org.
Dio skripte:Komanda /giverank

if(strcmp(cmd, "/giverank", true) == 0)
{
if(IsPlayerConnected(playerid))
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_DGOLD, "KORISTENJE: /giverank [ID/DioImena] [1-6]");
return 1;
}
new para1;
new level;
para1 = ReturnUser(tmp);
tmp = strtok(cmdtext, idx);
level = strval(tmp);
if(level > 6 || level < 1) { SendClientMessage(playerid, COLOR_RED, " SERVER: Nemozete dati toliki rank odabranom igracu - rankovi su od 1 do 6."); return 1; }
if (PlayerInfo[playerid][pLeader] >= 1)
{
if(IsPlayerConnected(para1))
{
if(para1 != INVALID_PLAYER_ID)
{
    GetPlayerName(para1, giveplayer, sizeof(giveplayer));
PlayerInfo[para1][pRank] = level;
format(string, sizeof(string), "SERVER: Dobili ste novi rank od strane lidera %s vase organizacije.", sendername);
SendClientMessage(para1, COLOR_GOLD, string);
if(PlayerInfo[playerid][pMember] == 1 || PlayerInfo[playerid][pLeader] == 1)
{
if(PlayerInfo[para1][pSex] == 1)
{
//Male Skin
if(PlayerInfo[para1][pRank] == 1) { PlayerInfo[para1][pChar] = 284; SetPlayerSkin(para1, 284); }
else if(PlayerInfo[para1][pRank] == 2) { PlayerInfo[para1][pChar] = 284; SetPlayerSkin(para1, 284); }
else if(PlayerInfo[para1][pRank] == 3) { PlayerInfo[para1][pChar] = 280; SetPlayerSkin(para1, 280); }
else if(PlayerInfo[para1][pRank] == 4) { PlayerInfo[para1][pChar] = 280; SetPlayerSkin(para1, 280); }
else if(PlayerInfo[para1][pRank] == 5) { PlayerInfo[para1][pChar] = 281; SetPlayerSkin(para1, 281); }
else if(PlayerInfo[para1][pRank] == 6) { PlayerInfo[para1][pChar] = 281; SetPlayerSkin(para1, 281); }

}
else if(PlayerInfo[para1][pSex] == 2)
{
PlayerInfo[para1][pChar] = 211; SetPlayerSkin(para1, 211);
}
}
else if(PlayerInfo[playerid][pMember] == 2 || PlayerInfo[playerid][pLeader] == 2)
{
if(PlayerInfo[para1][pSex] == 1)
{
//Male Skin
if(PlayerInfo[para1][pRank] == 1) { PlayerInfo[para1][pChar] = 123; SetPlayerSkin(para1, 123); }
else if(PlayerInfo[para1][pRank] == 2) { PlayerInfo[para1][pChar] = 123; SetPlayerSkin(para1, 123); }
else if(PlayerInfo[para1][pRank] == 3) { PlayerInfo[para1][pChar] = 59; SetPlayerSkin(para1, 59); }
else if(PlayerInfo[para1][pRank] == 4) { PlayerInfo[para1][pChar] = 59; SetPlayerSkin(para1, 59); }
else if(PlayerInfo[para1][pRank] == 5) { PlayerInfo[para1][pChar] = 120; SetPlayerSkin(para1, 120); }
else if(PlayerInfo[para1][pRank] == 6) { PlayerInfo[para1][pChar] = 120; SetPlayerSkin(para1, 120); }
}
else if(PlayerInfo[para1][pSex] == 2)
{
PlayerInfo[para1][pChar] = 211; SetPlayerSkin(para1, 211);
}
}
else if(PlayerInfo[playerid][pMember] == 3 || PlayerInfo[playerid][pLeader] == 3)
{
if(PlayerInfo[para1][pSex] == 1)
{
//Male Skin
if(PlayerInfo[para1][pRank] == 1) { PlayerInfo[para1][pChar] = 111; SetPlayerSkin(para1, 111); }
else if(PlayerInfo[para1][pRank] == 2) { PlayerInfo[para1][pChar] = 111; SetPlayerSkin(para1, 111); }
else if(PlayerInfo[para1][pRank] == 3) { PlayerInfo[para1][pChar] = 125; SetPlayerSkin(para1, 125); }
else if(PlayerInfo[para1][pRank] == 4) { PlayerInfo[para1][pChar] = 125; SetPlayerSkin(para1, 125); }
else if(PlayerInfo[para1][pRank] == 5) { PlayerInfo[para1][pChar] = 124; SetPlayerSkin(para1, 124); }
else if(PlayerInfo[para1][pRank] == 6) { PlayerInfo[para1][pChar] = 124; SetPlayerSkin(para1, 124); }

}
else if(PlayerInfo[para1][pSex] == 2)
{
PlayerInfo[para1][pChar] = 211; SetPlayerSkin(para1, 211);
}
}
else if(PlayerInfo[playerid][pMember] == 4 || PlayerInfo[playerid][pLeader] == 4)
{
if(PlayerInfo[para1][pRank] == 1) { PlayerInfo[para1][pChar] = 107; SetPlayerSkin(para1, 107); }
else if(PlayerInfo[para1][pRank] == 2) { PlayerInfo[para1][pChar] = 107; SetPlayerSkin(para1, 107); }
else if(PlayerInfo[para1][pRank] == 3) { PlayerInfo[para1][pChar] = 105; SetPlayerSkin(para1, 105); }
else if(PlayerInfo[para1][pRank] == 4) { PlayerInfo[para1][pChar] = 105; SetPlayerSkin(para1, 105); }
else if(PlayerInfo[para1][pRank] == 5) { PlayerInfo[para1][pChar] = 106; SetPlayerSkin(para1, 106); }
else if(PlayerInfo[para1][pRank] == 6) { PlayerInfo[para1][pChar] = 106; SetPlayerSkin(para1, 106); }
}
    else if(PlayerInfo[playerid][pMember] == 5 || PlayerInfo[playerid][pLeader] == 5)
{
if(PlayerInfo[para1][pSex] == 1)
{
//Male Skin
if(PlayerInfo[para1][pRank] == 1) { PlayerInfo[para1][pChar] = 102; SetPlayerSkin(para1, 102); }
else if(PlayerInfo[para1][pRank] == 2) { PlayerInfo[para1][pChar] = 102; SetPlayerSkin(para1, 102); }
else if(PlayerInfo[para1][pRank] == 3) { PlayerInfo[para1][pChar] = 103; SetPlayerSkin(para1, 103); }
else if(PlayerInfo[para1][pRank] == 4) { PlayerInfo[para1][pChar] = 103; SetPlayerSkin(para1, 103); }
else if(PlayerInfo[para1][pRank] == 5) { PlayerInfo[para1][pChar] = 104; SetPlayerSkin(para1, 104); }
else if(PlayerInfo[para1][pRank] == 6) { PlayerInfo[para1][pChar] = 104; SetPlayerSkin(para1, 104); }
}
else if(PlayerInfo[para1][pSex] == 2)
{
PlayerInfo[para1][pChar] = 211; SetPlayerSkin(para1, 211);
}
}
else if(PlayerInfo[playerid][pMember] == 6 || PlayerInfo[playerid][pLeader] == 6)
{
if(PlayerInfo[para1][pSex] == 1)
{
//Male Skin
if(PlayerInfo[para1][pRank] == 1) { PlayerInfo[para1][pChar] = 112; SetPlayerSkin(para1, 112); }
else if(PlayerInfo[para1][pRank] == 2) { PlayerInfo[para1][pChar] = 112; SetPlayerSkin(para1, 112); }
else if(PlayerInfo[para1][pRank] == 3) { PlayerInfo[para1][pChar] = 127; SetPlayerSkin(para1, 127); }
else if(PlayerInfo[para1][pRank] == 4) { PlayerInfo[para1][pChar] = 127; SetPlayerSkin(para1, 127); }
else if(PlayerInfo[para1][pRank] == 5) { PlayerInfo[para1][pChar] = 166; SetPlayerSkin(para1, 166); }
else if(PlayerInfo[para1][pRank] == 6) { PlayerInfo[para1][pChar] = 166; SetPlayerSkin(para1, 166); }

}
else if(PlayerInfo[para1][pSex] == 2)
{
PlayerInfo[para1][pChar] = 41; SetPlayerSkin(para1, 41);
}
}
else if(PlayerInfo[playerid][pMember] == 7 || PlayerInfo[playerid][pLeader] == 7)
{
if(PlayerInfo[para1][pSex] == 1)
{
//Male Skin
if(PlayerInfo[para1][pRank] == 1) { PlayerInfo[para1][pChar] = 188; SetPlayerSkin(para1, 188); }
else if(PlayerInfo[para1][pRank] == 2) { PlayerInfo[para1][pChar] = 188; SetPlayerSkin(para1, 188); }
else if(PlayerInfo[para1][pRank] == 3) { PlayerInfo[para1][pChar] = 187; SetPlayerSkin(para1, 187); }
else if(PlayerInfo[para1][pRank] == 4) { PlayerInfo[para1][pChar] = 187; SetPlayerSkin(para1, 187); }
else if(PlayerInfo[para1][pRank] == 5) { PlayerInfo[para1][pChar] = 147; SetPlayerSkin(para1, 147); }
else if(PlayerInfo[para1][pRank] == 6) { PlayerInfo[para1][pChar] = 147; SetPlayerSkin(para1, 147); }
}
else if(PlayerInfo[para1][pSex] == 2)
{
PlayerInfo[para1][pChar] = 211; SetPlayerSkin(para1, 211);
}
}

}
}
}
else
{
SendClientMessage(playerid, COLOR_RED, "SERVER: Niste autorizirani da koristite ovu komandu - samo lideri organizacija.");
}
}
return 1;
}

Neke slike/video za lakse dobivanje pomoci(neobavezno)://

Dodaj ovo u komandu

if(PlayerInfo[playerid][pLeader] == 2 && PlayerInfo[para1][pMember] != 2)
{
   SendClientMessage(playerid, COLOR_GRAD2, "Pristup odbijen!");
return 1;
}
if(PlayerInfo[playerid][pLeader] == 3 && PlayerInfo[para1][pMember] != 3)
{
   SendClientMessage(playerid, COLOR_GRAD2, "Pristup odbijen!");
return 1;
}
 ti dodaji posle 4 ,5,6 i koliko vec imas org ...Nisam testirao i ne garantujem ali mislim da je tako
Poslednja Izmena: Avgust 03, 2011, 14:30:47 POSLE PODNE od [BM]Mr.Saxobeat