samp.directory
← Skrypty i biblioteki

MassonNN/mas_listdialog

Simple library for list dialogs

Biblioteka★ 1zaktualizowano paź 2020Brak licencjiPawnsampctl
Otwórz na GitHubie

To repozytorium nie ma pliku licencji. Jest publiczne do odczytu, ale samo to nie daje pozwolenia na ponowne użycie.

Zainstaluj za pomocą sampctl

sampctl package install MassonNN/mas_listdialog

Uruchom to w folderze swojego projektu. sampctl pobiera pakiet i to, od czego zależy.

Wypróbuj w kompilatorze Pawn →

Dodaje jej pliki include, razem z bibliotekami, od których zależy, do kompilatora Pawn w twojej przeglądarce, gotowe do dołączenia w skrypcie.

Zależy od 1 pakietu

README.md

mas_listdialog

ListDialogs is a simple library for dialogs with lists

Installation

Simply install to your project:

sampctl package install MassonNN/mas_listdialog

Include in your code and begin using the library:

#include <mas_listdialog>

Usage

ShowListDialog(playerid, func[], caption[], info[], listitems[], button1[], button2[] = "")

playerid - id of player to show list dialog func - function that is executed when the dialog box responds caption - dialog caption info - dialog text listitems - an array of listitems button1 - first button (Yes) button2 - second button (No)

Example of usage:

public OnPlayerConnect(playerid) {
	new string[256];
	new addnum;
	new listitems[64];
	new name[MAX_PLAYER_NAME];
	for(new i; i < MAX_PLAYERS; i++) {
		if(IsPlayerConnected(i)) {
			listitems[addnum] = i;
			addnum++;
			GetPlayerName(i, name, MAX_PLAYER_NAME);
			strcat(string, name);
			strcat(string, "\n");
		}
	}
	ShowListDialog(playerid, LIST:TestDialog, "Players online", string, "Send hi", "Close", listitems);
	return 1;
}

LISTDIALOG:TestDialog(playerid, response, value) {
	if(!response) return 1;
	SendClientMessage(value, 0x00FF00FF, "Hi!");
	return 1;
}

Ta strona jest zbudowana z tego, co GitHub publikuje o repozytorium. samp.directory nie hostuje kodu. Zgłoś problem z tym wpisem

MassonNN/mas_listdialog: Biblioteka SA-MP | samp.directory