[POMOĆ] - Rankovi mi se miješaju ?

Započeo elemental., Septembar 05, 2012, 18:14:40 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

Skripta koju koristim: Xoomer RP(od 0)
Detaljan opis problema: Rankovi mi se miješaju. Postavim sebi lidera SFPDa, uzme mi rankove od FBIa, a ako postavim sebi lidera FBIa, onda mi bude normalno, znači FBI rankovi. Kako god, samo mi FBI rankove pokazuje.
Dio skripte: Evo rankovi i /r komanda:
stock GetPlayerRank(playerid)
{
new
szRankName[29],
iPlayerOrg = (P_Data[playerid][pMember] > 0) ? (P_Data[playerid][pMember]) : (P_Data[playerid][pLeader]);

switch(iPlayerOrg)
{
case 1:
{
switch(P_Data[playerid][pRank])
{
case 1:
szRankName = "Vježbenik";
case 2:
szRankName = "Kadet";
case 3:
szRankName = "Policajac";
case 4:
szRankName = "Narednik";
case 5:
szRankName = "Poručnik";
case 6:
szRankName = "Načelnik";
default:
szRankName = "Nepoznato";
}
}
case 2:
{
switch(P_Data[playerid][pRank])
{
case 1:
szRankName = "Professional Staff";
case 2:
szRankName = "Special Agent Trainee";
case 3:
szRankName = "Special Agent";
case 4:
szRankName = "Special Agent in Charge";
case 5:
szRankName = "Assistant Director in Charge";
case 6:
szRankName = "Director";
default:
szRankName = "Nepoznato";
}
}
}
return szRankName;
}


/r:

YCMD:r(playerid, params[], help)
{
if(P_Data[playerid][pMember] == 1 || P_Data[playerid][pLeader] == 1 || P_Data[playerid][pMember] == 2 || P_Data[playerid][pLeader] == 2)
{
new
szChatMsg[128],
string[128];

if (sscanf(params, "s[128]", szChatMsg))
return SendClientMessage(playerid, -1, "Korištenje: /r [text]");

foreach(Player, i)
{
if (P_Data[playerid][pMember] == 1 || P_Data[playerid][pLeader] == 1)
{
format(string, sizeof(string), "%s %s kaze: %s", GetPlayerRank(playerid), GetName(playerid), szChatMsg);
                SendPoliceMessagee(COLOR_PROMOVIRAN, string);
}
if (P_Data[playerid][pMember] == 2 || P_Data[playerid][pLeader] == 2)
{
format(string, sizeof(string), "%s %s kaze: %s", GetPlayerRank(playerid), GetName(playerid), szChatMsg);
                SendFBIMessagee(COLOR_PROMOVIRAN, string);
}
}
}
else
SendClientMessage(playerid, COLOR_RED, "Moras biti član neke legalne organizacije da koristiš ovu komandu.");
return 1;
}



Hmmm,switch u switchu,case u case-u,jesi siguran da to tako moze ?
Izvinjavam se na svim glupostima i ako sam nekome napisao nesto lose, neko drugi je koristio moj profil!
__________________________________________
https://bk.gta.world - GTA World Balkan - RAGEMP