This repository contains the code for the Dialog library.
Simple installation method:
sampctl package install Dialog-Include
You can then incorporate it into your game mode/script:
#include <Dialog-Include\dialog>
Dialog_Show(playerid, func[])
Name | Info |
---|---|
playerid |
player ID |
func |
The name of the dialog to show to the player |
Always returns true.
Shows the player a pre-created template for a dialog (DialogCreate:
).
Dialog_Open(playerid, func[], style, caption[], body[], button1[], button2[])
Name | Info |
---|---|
playerid |
player ID |
func |
The name of the dialog to show to the player |
style |
The style of the dialog |
title |
The title at the top of the dialog |
body |
The text to display in the main dialog |
button1 |
The text on the left button |
button2 |
The text on the right button |
Always returns the execution value of the ShowPlayerDialog
function.
Shows dialog to the player.
Dialog_Close(playerid)
Name | Info |
---|---|
playerid |
player ID |
Depending on the presence of the HidePlayerDialog
function, it returns either the result of executing the first function, or the result of ShowPlayerDialog
.
Closes the dialog shown to the player in case the player has it open.
Dialog_IsOpen(playerid, func[] = "")
Name | Info |
---|---|
playerid |
player ID |
func |
The name of dialog |
Checks if the player has any dialog open, or (depending on the optional parameter) checks if the player has any dialog open.
Pull requests are welcome.