Dialog - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Dialog (
/showthread.php?tid=584186)
Dialog -
Ugaustin - 02.08.2015
it appears only One name!!!dosent appear all names only one row!one name!!
PHP код:
if (listitem == 0)
{
new count = 0;
for(new i=0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(PlayerInfo[i][pMember] == 1 || PlayerInfo[i][pLeader] == 1)
{
new dia[1000];
GetPlayerName(i, giveplayer, sizeof(giveplayer));
format(dia, sizeof(dia), " Name: %s | Rank %d | Ph: %d\n", giveplayer,PlayerInfo[i][pRank],PlayerInfo[i][pPtel]);
//SendClientMessage(playerid,COLOR_ORANGE,dia);
ShowPlayerDialog(playerid,1,DIALOG_STYLE_MSGBOX,"San Andreas Police Department",dia,"Close","");
count++;
}
}
}
if(count == 0)
{
new ria[24];
strcat(ria," No Members Online!");
ShowPlayerDialog(playerid,1,DIALOG_STYLE_MSGBOX,"San Andreas Police Department",ria,"Close","");
}
}
Re: Dialog -
Ugaustin - 02.08.2015
anyone please??
Re: Dialog -
RowdyrideR - 03.08.2015
Can you tell me what you exactly want to do?
Re: Dialog -
Variable™ - 03.08.2015
Removed.
AW: Dialog -
Nero_3D - 03.08.2015
If you show the dialog inside the loop your result will be unavoidable
Simply replacing SendClientMessage with ShowPlayerDialog wont work...
PHP код:
if(listitem == 0) {
new
dia[1024]
;
for(new i = GetPlayerPoolSize(); i >= 0; --i) {
if(GetPlayerName(i, giveplayer, sizeof giveplayer) && (PlayerInfo[i][pMember] == 1 || PlayerInfo[i][pLeader] == 1)) {
format(dia, sizeof dia, "%s\n Name: %s | Rank %d | Ph: %d", dia, giveplayer, PlayerInfo[i][pRank], PlayerInfo[i][pPtel]);
}
}
if(dia[0] == EOS) {
dia = "\n No Members Online!";
}
ShowPlayerDialog(playerid, 1, DIALOG_STYLE_MSGBOX, "San Andreas Police Department", dia[1], "Close", "");
}