SA-MP Forums Archive
Dialog help fast look here - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Dialog help fast look here (/showthread.php?tid=248287)



Dialog help fast look here - boyan96 - 13.04.2011

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;
	}



Re: Dialog help fast look here - Kwarde - 13.04.2011

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.



Re: Dialog help fast look here - boyan96 - 13.04.2011

didn't work


Re: Dialog help fast look here - Kwarde - 13.04.2011

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.


Re: Dialog help fast look here - boyan96 - 13.04.2011

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");