Hallo Leser,
ich habe /members in einem Dialog gemacht. Immer wenn man beim Dialog unten auf "Schliessen klickt bekommt man ein Server close the Connection.
hier ist ein Auszug des Befehls /members
if(strcmp(cmdtext, "/members", true)==0)
{
if(PlayerInfo[playerid][pMember] > 0)
{
new dialogstring[300],string2[50];
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
new mymember;
mymember = PlayerInfo[playerid][pMember];
new myleader;
myleader = PlayerInfo[playerid][pMember];
if(PlayerInfo[i][pMember] == mymember || PlayerInfo[i][pLeader] == myleader)
{
GetPlayerName(i, sendername, sizeof(sendername));
if(PlayerInfo[i][pLeader])format(string2, sizeof(string2), "\n* %s [ID:%d][Rang:%d]", sendername,i,PlayerInfo[i][pLeader]);
else format(string2, sizeof(string2), "\n* %s [ID:%d][Rang:%d]", sendername,i,PlayerInfo[i][pRank]);
strcat(dialogstring,string2);
strdel(string2,0,sizeof(string2));
}
}
}
ShowPlayerDialog(playerid,0,DIALOG_STYLE_MSGBOX,"Member deiner Fraktion online",dialogstring,"Schließen","");
return 1;
}
if(PlayerInfo[playerid][pLeader] > 0)
{
new dialogstring[300],string2[50];
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
new mymember;
mymember = PlayerInfo[playerid][pLeader];
new myleader;
myleader = PlayerInfo[playerid][pLeader];
if(PlayerInfo[i][pMember] == mymember || PlayerInfo[i][pLeader] == myleader)
{
GetPlayerName(i, sendername, sizeof(sendername));
if(PlayerInfo[i][pLeader])format(string2, sizeof(string2), "\n* %s [ID:%d][Rang:%d]", sendername,i,PlayerInfo[i][pLeader]);
else format(string2, sizeof(string2), "\n* %s [ID:%d][Rang:%d]", sendername,i,PlayerInfo[i][pRank]);
strcat(dialogstring,string2);
strdel(string2,0,sizeof(string2));
}
}
}
ShowPlayerDialog(playerid,0,DIALOG_STYLE_MSGBOX,"Member deiner Fraktion online",dialogstring,"Schließen","");
return 1;
}
return 1;
}
Bei Fragen fragt mich gerne
mfg fabii