samp.directory
← Skripte und Bibliotheken

MassonNN/mas_listdialog

Simple library for list dialogs

Bibliothek★ 1aktualisiert Okt. 2020Keine LizenzPawnsampctl
Auf GitHub öffnen

Dieses Repository hat keine Lizenzdatei. Es ist öffentlich lesbar, aber das allein gibt noch keine Erlaubnis, es weiterzuverwenden.

Mit sampctl installieren

sampctl package install MassonNN/mas_listdialog

Führe das in deinem Projektordner aus. sampctl lädt das Paket und alles herunter, wovon es abhängt.

Im Pawn-Compiler ausprobieren →

Fügt seine Include-Dateien samt der Bibliotheken, von denen es abhängt, dem Pawn-Compiler in deinem Browser hinzu, bereit zum Einbinden in ein Skript.

Hängt von 1 Paket ab

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;
}

Diese Seite wird aus dem erstellt, was GitHub über das Repository veröffentlicht. samp.directory hostet den Code nicht. Ein Problem mit diesem Eintrag melden

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