19.07.2018, 03:57
(
Последний раз редактировалось IdonTmiss; 19.07.2018 в 06:57.
)
Well since I'm working on an "activity" system I need some help, I have gangs and stuff defined as "PlayerInfo[playerid][pMember]" and... just look at the code it should do more talking than me
So I want to load the players "pMember" and him his organisation members, my folder for that "scriptfiles/organisation/%d/member_%d [ first %s going from 1 to 17, the other one from 0 to 40 ( the member slo t ) ]" like I want, I mean i want to load the "playerid" organisation and show him his members
PHP код:
else if(dialogid == D_MEMBERS_1)
{
if(!response) return true;
if(response)
{
new atext[64];
new bbzb[1024];
new online;
for(new b = 21; b < 41; b++)
{
if(!strcmp(MMB[b][mmbName], "No-one", true))
{
format(atext, sizeof(atext), "{FFFFFF}[%d] No-one\n", b);
strcat(bbzb, atext);
}
else
{
format(atext, sizeof(atext), "{FFFFFF}[%d] %s | ", b, MMB[b][mmbName]);
strcat(bbzb, atext);
online = 0;
foreach(new i : Player)
{
if(IsPlayerConnected(i) && PlayerInfo[i][pMember] == b)
{
online = 1;
format(atext, sizeof(atext), "Online");
strcat(bbzb, atext);
}
}
if(online == 0)
{
format(atext, sizeof(atext), "Offline (%dhours)\n", MMB[b][mmbOff]);
strcat(bbzb, atext);
}
}
}
SPD(playerid, D_MEMBERS_2, DSM, "Members", bbzb, "Close", "Back");
}
}
EDIT: The command for that
PHP код:
cmd:members(playerid,params[])
{
new atext[64];
new zbzbz[1024];
new online;
for(new b = 1; b < 21; b++)
{
if(!strcmp(MMB[b][mmbName], "No-one", true))
{
format(atext, sizeof(atext), "{FFFFFF}[%d] No-one\n", b);
strcat(zbzbz, atext);
}
else
{
format(atext, sizeof(atext), "{FFFFFF}[%d] %s | ", b, MMB[b][mmbName]);
strcat(zbzbz, atext);
online = 0;
for(new i=0; i<MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i) && PlayerInfo[i][pMember] == b)
{
online = 1;
format(atext, sizeof(atext), "Online");
strcat(zbzbz, atext);
}
}
if(online == 0)
{
format(atext, sizeof(atext), "Offline (%dhours)\n", MMB[b][mmbNeakt]);
strcat(zbzbz, atext);
}
}
}
SPD(playerid, D_MEMBERS_1, DSM, ""Members", zbzbz, "Next", "Close");
return true;
}