22.02.2012, 15:37
pawn Код:
COMMAND:infoorg(playerid,params[])
{
#pragma unused params
if(Team[playerid] == 0) SendClientMessage(playerid, -1,"Vocк nгo й membro de nenhuma organizaзгo");
{
if(Team[playerid] > 0 || TeamLider[playerid] > 0)
{
new org[128], org2[128], Org[32], tmp[32], giveid, string[2048];
format(org,128,"/Orgs/%s.ini", OrgsNames[PlayerInfo[playerid][pMembro]]);
string = " ";
Org = OrgsNames[GetPlayerOrg(playerid)];
for(new i = 0; i < sizeof(OrgsCargos); i++)
{
format(tmp,32,"%s",Dini_Get(org,OrgsCargos[i]));
giveid = ReturnUser(tmp);
if(IsPlayerConnected(giveid))
format(org2,128,"{FFFFFF}%s - %s - {00D900}Online\n",OrgsCargos[i],Dini_Get(org,OrgsCargos[i]));
else if(strcmp(Dini_Get(org,OrgsCargos[i]),"Nenhum",true)==0)
format(org2,128,"{FFFFFF}%s - Nenhum\n",OrgsCargos[i]);
else
format(org2,128,"{FFFFFF}%s - %s - {AA3333}Offline\n",OrgsCargos[i],Dini_Get(org,OrgsCargos[i]));
if(strlen(string) < 1000)
format(string, 2048, "%s %s",string, org2);
}
ShowPlayerDialog(playerid, 15210, DIALOG_STYLE_MSGBOX, Org, string, "Fechar", "");
}
}
return 1;
}