Dialog help fast look here
#1

how i can make this in dialog


Код HTML:
if(strcmp(cmd, "/leaders",true)==0)
	{
		if(IsPlayerConnected(playerid))
		{
			SendClientMessage(playerid, COLOR_LIGHTBLUE,"online leader:");
  			for(new i = 0; i < MAX_PLAYERS; i++)
			{
  				if(IsPlayerConnected(i))
				{
   					if(PlayerInfo[i][pMember] != TEAM_CIVILIAN && PlayerInfo[i][pRank] == 6)
					{
    					format(string, sizeof(string), "leader: %s  gang/mafia: %d - %s",PlayerName(i),PlayerInfo[i][pMember], TeamInfo[PlayerInfo[i][pMember]][TeamName]);
				    	SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
					}
				}
			}
		}
		return 1;
	}
Reply
#2

Change SendClientMessage(playerid, COLOR_LIGHTBLUE, string); for:
ShowPlayerDialog(playerid, 13378, DIALOG_STYLE_MSGBOX, "Faction", string, "OK", "");
At least, try that

This forum requires that you wait 120 seconds between posts. Please try again in 70seconds.
Reply
#3

didn't work
Reply
#4

Compiling or the ingame command?
Because that should work: https://sampwiki.blast.hk/wiki/ShowPlayerDialog
The info[] is that string. It should be the command itself then, I guess :P
Oh wait, you wanna see ALL leaders. Try this:

pawn Код:
if(strcmp(cmd, "/leaders",true)==0)
    {
        if(IsPlayerConnected(playerid))
        {
            SendClientMessage(playerid, COLOR_LIGHTBLUE,"online leader:");
            for(new i = 0; i < MAX_PLAYERS; i++)
            {
                if(IsPlayerConnected(i))
                {
                    if(PlayerInfo[i][pMember] != TEAM_CIVILIAN && PlayerInfo[i][pRank] == 6)
                    {
                        format(string, sizeof(string), "%s\r\nleader: %s  gang/mafia: %d - %s",PlayerName(i),PlayerInfo[i][pMember], TeamInfo[PlayerInfo[i][pMember]][TeamName]);
                    }
                }
            }
                        ShowPlayerDialog(playerid, 13378, DIALOG_STYLE_MSGBOX, "Faction leaders", string, "OK", "");
        }
        return 1;
    }
I gotta go now.
Reply
#5

can you show me how to stand this command
PHP код:
if(strcmp(cmd"/help"true) == 0)
    {
        if(
IsPlayerConnected(playerid))
        {
            
SendClientMessage(playeridCOLOR_GRAD2,"GENERAL: /stats (/t)eam /pm /turfhelp /givebounty");
            
SendClientMessage(playeridCOLOR_GRAD2,"GENERAL: /rules /report /changepass /id");
            
SendClientMessage(playeridCOLOR_GRAD2,"GENERAL: /hitman /teamstats /pay /lotto /bounties /admins");
            
SendClientMessage(playeridCOLOR_GRAD2,"GENERAL: /animlist / time  /count");
             
SendClientMessage(playeridCOLOR_YELLOW,"DUEL: /duel /aduel /dduel /dspec /lspec");
             
SendClientMessage(playeridCOLOR_YELLOW2,"DMZONE: /DMON /DMOFF /DMSTART /DMSTOP");
             
SendClientMessage(playeridCOLOR_RED,"VIP: /vip /vipusers /viphelp");
            
SendClientMessage(playeridCOLOR_GREEN,"Gangs: /acceptfaction(/af) /cancelfaction(/cf) / leaders"); 
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)