15.02.2019, 21:32
(
Последний раз редактировалось d3Pedro; 15.02.2019 в 22:03.
)
You can do them using strcat
Continue doing like that until you finish tutorial! Make sure at the end of tutorial to spawn the player or do whatever you'd like with them!
ShowPlayerDialog is a one-time use, you cannot show 2 or more dialogs in the same time.
Here's a example:
You can't do them like this:
Edit:
If you want to use more than one language then you'll have to do a variable just for that and use if or else if
But this will make you do a language selection before the tutorial.
pawn Код:
//on player registration
format(string, sizeof(string), "{FFFFFF}LEA ESTAS REGLAS. NO OBEDECERLAS PROVOCARA QUE TERMINES {FF0000}BANEADO.\n\n");
strcat(str, string);
format(string, sizeof(string), "{FFFFFF}La ignorancia no es excusa, todas estas cosas usted ya las debe saber.\n\n");
strcat(str, string);
format(string, sizeof(string), "Si rompes alguna de las reglas descritas aquн, {FF0000}NO SERAS DESBANEADO.");
strcat(str, string);
ShowPlayerDialog(playerid, DIALOG_TUTO1, DIALOG_STYLE_MSGBOX, "{0092FF}|____ El Comienzo ____|", str, "Siguiente", "Saltar");
//ondialogresponse
case DIALOG_TUTO1:
{
format(string, sizeof(string), "{FFFFFF}Este servidor es un {0092FF}servidor RP {FFFFFF}lo que significa {0092FF}Role Playing.\n\n");
strcat(str, string);
format(string, sizeof(string), "{FFFFFF}Deathmatching, o DMing, {FF0000}NO ESTA PERMITIDO. {FFFFFF}Deathmatching significa matar a alguien sin ninguna razуn, sin ninguna justificaciуn de carбcter.\n");
strcat(str, string);
format(string, sizeof(string), "Si solo quieres pelear, hay otros servidores para eso. Aquн, si quieres matar a alguien, necesitas tener una razуn.\n\n");
strcat(str, string);
format(string, sizeof(string), "Si viola esta regla provocaras como consecuencia como que te multen {FF0000}(FINED) {FFFFFF}/ te saquen del servidor {FF0000}(KICKED) {FFFFFF}/ te encierren como penalizacion {FF0000}(JAILED) {FFFFFF}o te den una advertencia {FF0000}(WARNING).\n\n");
strcat(str, string);
format(string, sizeof(string), "{FFFFFF}Hacer esto una y otra vez provocaras que te {FFFFFF}prohiban del servidor {FF0000}(BANNED). {FFFFFF}\n\n");
strcat(str, string);
format(string, sizeof(string), "Pero no te preocupes, hay miles de razones para matar personas por aqui.\n\n");
strcat(str, string);
format(string, sizeof(string), "Pretender hacer un {0092FF}ROL {FFFFFF}de una persona loca o un policia maton {FF0000}NO TE DA UNA RAZУN {FFFFFF}para hacer Deathmatch (matar a alguien).");
strcat(str, string);
ShowPlayerDialog(playerid, DIALOG_TUTO2, DIALOG_STYLE_MSGBOX, "{0092FF}|____ El Combate a Muerte ____|", str, "Siguiente", "Saltar");
}
case DIALOG_TUTO2:
{
//tutorial messages
//showplayerdialog DIALOG_TUTO3
}
case DIALOG_TUTO3:
{
//tutorial messages
//showplayerdialog DIALOG_TUTO4
}
ShowPlayerDialog is a one-time use, you cannot show 2 or more dialogs in the same time.
Here's a example:
pawn Код:
CMD:showmeonedialog(playerid)
{
ShowPlayerDialog(playerid, 0, DIALOG_STYLE_MSGBOX, "Dialog one", "Here's a dialog!", "Okay", "Close");
return 1;
}
CMD:showmetwodialog(playerid, params[])
{
if(strcmp(params, "1", true))
{
ShowPlayerDialog(playerid, DIALOGID, DIALOG_STYLE_MSGBOX, "Dialog", "This is dialog number one!", "Okay", "Close");
}
else
{
ShowPlayerDialog(playerid, DIALOGID, DIALOG_STYLE_MSGBOX, "Dialog", "This is dialog number two!", "Okay", "Close");
}
return 1;
}
pawn Код:
CMD:dialog(playerid) // i used a command just to show you! This might cause a crash or show no dialog!
{
ShowPlayerDialog(playerid, DIALOGID, DIALOG_STYLE_MSGBOX, "Dialog", "This is dialog number one!", "Okay", "Close");
ShowPlayerDialog(playerid, DIALOGID, DIALOG_STYLE_MSGBOX, "Dialog", "This is dialog number two!", "Okay", "Close");
return 1;
}
If you want to use more than one language then you'll have to do a variable just for that and use if or else if
pawn Код:
new Language[MAX_PLAYERS] = 0; //0 = english, 1 = spanish or whatever language that is.
if(Language[playerid] == 0)
{
//showplayerdialog in english language
}
else
{
//showplayerdialog in spanish language
}