SA-MP Forums Archive
[Ajuda] Dialog - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: Non-English (https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Português/Portuguese (https://sampforum.blast.hk/forumdisplay.php?fid=34)
+---- Thread: [Ajuda] Dialog (/showthread.php?tid=607439)



Dialog - K0Y0T3 - 19.05.2016

Como Passo esse codigo para dialog?

PHP код:
if(!strcmp("/gangs",cmdtext,true))
    {
        new 
Gangs[MAX_GANGS],fmt[64];
        
SendClientMessage(playerid,laranja,"|- Gangs online no momento -|");
        for(new 
i=0;i<MAX_PLAYERS;i++)
            if(
IsPlayerConnected(i))
                if(
Gangs[GangID[i]]!=2&&GangID[i]!=0)
                {
                    
Gangs[GangID[i]]=2;
                    
format(fmt,64,"|- %s - ID: %d",DOF2_GetString(FormatGang(GangID[i]),"Nome"),GangID[i]);
                    
SendClientMessage(playerid,branco,fmt);
                }
        return 
1;
    }
    return 
0;




Re: Dialog - F1N4L - 19.05.2016

Код:
if(!strcmp("/gangs",cmdtext,true)) 
    { 
        new Gangs[MAX_GANGS],fmt[64], stc[400]; 
        for(new i=0;i<MAX_PLAYERS;i++) {
            if(IsPlayerConnected(i)) 
                if(Gangs[GangID[i]]!=2&&GangID[i]!=0) 
                { 
                    Gangs[GangID[i]]=2; 
                    format(fmt,64,"|- %s - ID: %d\n",DOF2_GetString(FormatGang(GangID[i]),"Nome"),GangID[i]); 
                    strcat(stc, fmt);
                } }
		ShowPlayerDialog(playerid, 1254, DIALOG_STYLE_MSGBOX, "|- Gangs online no momento -|", stc, "OK","");
        return 1; 
    } 
    return 0; 
}