Outil★ 2mis à jour avr. 2017MITSourcePawn
Ouvrir sur GitHubREADME.md
Dialogs-Samp
Include to make easy your life with dialogs.
| Total downloads | Latest release |
|---|
Features
- Response for dialogs(Like ZCMD processor)
- Create dynamic dialogs
- Format the info directly in the dialog, without need use format.
- A new callback
OnDialogPerformed, called before showing dialog to player
Examples
Creating and show the dialog for player
CreateDialog:Dialog(playerid, style, caption[], info[], button1[], button2[])
{
style = DIALOG_STYLE_MSGBOX;
caption = "Hello World!";
button1 = "Hello";
button2 = "World";
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof(name));
format(info, sizeof(info), "Hello %s. What you think about?", name);
}
public OnPlayerConnect(playerid)
{
ShowDialog(playerid, Dialog);
}
Dialog:Dialog(playerid, dialogid, response, listitem, inputtext[])
{
SendClientMessage(playerid, -1, response ? "You clicked at button 1" : "You clicked at button 0");
return true;
}
Show dialog without create
public OnPlayerConnect(playerid)
{
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof(name));
ShowPlayerDialog(playerid, Dialog, DIALOG_STYLE_MSGBOX, "Hello World!", "Hello %s. What you think about?", "Hello", "World", name);
}
Dialog:Dialog(playerid, dialogid, response, listitem, inputtext[])
{
SendClientMessage(playerid, -1, response ? "You clicked at button 1" : "You clicked at button 0");
return true;
}
Cette page est construite à partir de ce que GitHub publie sur le dépôt. samp.directory n’héberge pas le code. Signaler un problème avec cette fiche