Dialog
#1

Код:
if(PInfo[playerid][TotalScore] == 0)
	        {
	            new msg[200];
				format(msg,sizeof(msg),"{FFFF00}Hey! It looks like you have not completed a flight yet! This is just to help you out:");
				SendClientMessage(playerid, COLOR_GREEN, msg);
				format(msg,sizeof(msg),"{FFFF00}-When you do missions (/work), it will ask you to fly to a destination. Fly there and land, and it will give another checkpoint.");
				SendClientMessage(playerid, COLOR_GREEN, msg);
				format(msg,sizeof(msg),"{FFFF00}-When you complete the mission, you gain money, in which you can purchase vehicle's, houses or even your own airline!");
				SendClientMessage(playerid, COLOR_GREEN, msg);
				format(msg,sizeof(msg),"{FFFF00}-All of that information is just to help you understand the main features of the PoT, but there is ALOT more to come! - Have fun!");
				SendClientMessage(playerid, COLOR_GREEN, msg);
			}
I want to replace the sendclientmessages to Dialog msgbox... how it can be possible?
Reply
#2

Try This then :-
pawn Код:
if(PInfo[playerid][TotalScore] == 0)
            {
                new msg[350];
                strcat(msg, "{FFFF00}Hey! It looks like you have not completed a flight yet! This is just to help you out:");
                strcat(msg, "{FFFF00}-When you do missions (/work), it will ask you to fly to a destination. Fly there and land, and it will give another checkpoint.");
                strcat(msg, "{FFFF00}-When you complete the mission, you gain money, in which you can purchase vehicle's, houses or even your own airline!");
                strcat(msg, "{FFFF00}-All of that information is just to help you understand the main features of the PoT, but there is ALOT more to come! - Have fun!");

                ShowPlayerDialog(playerid, DIALOG_MSG1, DIALOG_STYLE_MSGBOX, "Dialog Title Goes Here:", msg, "OK", "");
            }
make sure you've defined 'DIALOG_MSG1' you can change it to anything :-
pawn Код:
#define DIALOG_MSG1 1999
and Make sure that '1999' is not taken by other defined Dialogs.

EDIT :-
If you've wanted to use Formats (w/ Specifiers) and Strcats together,
Try this :-
pawn Код:
new string[100], dialogstring[200];
format(string, sizeof(string), "text %specifier", variable);
strcat(dialogstring, string);
format(string, sizeof(string), "text %specifier", variable);
strcat(dialogstring, string);
ShowPlayerDialog(... dialogstring ...); // blah... blah... blah... do the rest of the parameters on yourself
Reply
#3

Its done but how can i do this same?
Код:
else if(!strcmp(cmd, "/rules"))
	{
	    SendClientMessage(playerid, COLOR_BLUE, "---- Rules of The Pilots Paradise ----");
	    SendClientMessage(playerid, COLOR_WHITE, "1) Do not deathmatch under any circumstances. - This includes planebombing.");
	    SendClientMessage(playerid, COLOR_WHITE, "2) Do not abuse bugs which may have occured.");
	    SendClientMessage(playerid, COLOR_WHITE, "3) Never attempt to cheat by using hacking tools, trainers or anything alike.");
	    SendClientMessage(playerid, COLOR_WHITE, "4) Do not advertise any server which isn't related to the Pilots Paradise here.");
	    SendClientMessage(playerid, COLOR_WHITE, "5) Be mature while playing, do not insult others. - Don't be a troll.");
	    SendClientMessage(playerid, COLOR_BLUE, "--- For a full list of rules, visit the /forums ---");
	    return 1;
	}
to dialog msgbox
Reply
#4

pawn Код:
else if(!strcmp(cmd, "/rules"))
    {
        new rulesmsg[500];
        strcat(rulesmsg, "---- Rules of The Pilots Paradise ----");
        strcat(rulesmsg, "1) Do not deathmatch under any circumstances. - This includes planebombing.");
        strcat(rulesmsg, "2) Do not abuse bugs which may have occured.");
        strcat(rulesmsg, "3) Never attempt to cheat by using hacking tools, trainers or anything alike.");
        strcat(rulesmsg, "4) Do not advertise any server which isn't related to the Pilots Paradise here.");
        strcat(rulesmsg, "5) Be mature while playing, do not insult others. - Don't be a troll.");
        strcat(rulesmsg, "--- For a full list of rules, visit the /forums ---");

        ShowPlayerDialog(playerid, DIALOG_RULESMSG1, DIALOG_STYLE_MSGBOX, "Dialog Title Goes Here:", rulesmsg, "OK", "");
        return 1;
    }
You can decrease or increase the string size, if it doesn't show the full text then increase it by changing '500' in :-
pawn Код:
new rulesmsg[500];
make sure you've defined 'DIALOG_RULESMSG1' too, you can change it to anything :-
pawn Код:
#define DIALOG_RULESMSG1 2999
and Make sure that '2999' is not taken by other defined Dialogs.
Reply
#5

pawn Код:
new rulesmsg[440];
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)