Okay so i tried to make something like alliances and stuff for groups , i made everything now theres a problem while trying to get the ID of alliance and the ID of players alliance , if they match it will show the frequences now i debugged it and the players alliance id shows the corrent but the alliance id shows 0.
Heres my code i think im doing it wrong
Heres my code i think im doing it wrong
Code:
COMMAND:allyfreqs(playerid, params[])
{
if(PlayerInfo[playerid][pAlliance] == -1) return SendClientError(playerid,"You are not in any alliance");
AllianceLoop(i)
{
if(!IsPlayerConnected(i) || IsPlayerNPC(i)) continue;
{
printf("pAlliance - %d, alliance id %d",PlayerInfo[playerid][pAlliance],AllianceInfo[i][ID]);
if(PlayerInfo[playerid][pAlliance] == AllianceInfo[i][ID]) // PlayerInfo palliance it shows the right one and AllianceInfo ID shows always 0
{
new string[80];
format(string,sizeof(string),"Freqs %d - pAlliance %d - Alliance id %d", AllianceInfo[i][aFreq],PlayerInfo[playerid][pAlliance],AllianceInfo[i][ID]);
SendClientMessage(playerid,COLOR_WHITE,string);
}
}
}
return 1;
}