samp.directory
← Skrypty i biblioteki

dinhkhoi2298/fSelection

preview models

Biblioteka★ 6zaktualizowano sty 2023Brak 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 dinhkhoi2298/fSelection

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.

README.md

fSelection

Installation

Simply install to your project:

sampctl package install roesanne26/fSelection

Include in your code and begin using the library:

#include <fSelection>

fSelection-pp.inc

  • Unlimited item

(require https://github.com/IllidanS4/PawnPlus)

Usage

Functions

fselection_add_item(playerid, modelid, Float:rotx, Float:roty, Float:rotz, Float:zoom);
fselection_show(playerid, fselectid, const header[], page);
fselection_showing(playerid);
fselection_hide(playerid);

// fSelection-pp.inc
async_fselection_show(playerid, const header[]);
Example #1
// 
#include <fSelection>

const FSELECTION_CLOTHES = 0;

CMD:clothes(playerid) {
	if(fselection_showing(playerid)) 
		return SendClientMessage(playerid, -1, "SU DUNG ESC DE TAT.");

	for(new skinID = 1; skinID < 312; skinID ++) {
		if(skinID == 74) continue;
		fselection_add_item(playerid, skinID);
	}

	fselection_show(playerid, FSELECTION_CLOTHES, "Clothes");
	return 1;
}

public OnFSelectionResponse(playerid, fselectid, modelid, response) {	
	if(fselectid == FSELECTION_CLOTHES && response) {
		SetPlayerSkin(playerid, modelid);	
	}
	return 1;
}
Example #2

Using async_fselection_show

/* fSelection-pp test */
#include <fSelection-pp>

CMD:clothes(playerid) {
    if(fselection_showing(playerid)) 
        return SendClientMessage(playerid, -1, "SU DUNG ESC DE TAT.");

    new 
        str[64], fSelectionInfo[E_FSELECTION_INFO];

    task_yield(1);
    for(new i = 0; i < 311; i ++) {
        if(i == 74) 
            continue; // bad id

        fselection_add_item(playerid, i);
    }
    task_await_arr(async_fselection_show(playerid, "Clothes"), fSelectionInfo);
    if(fSelectionInfo[fs_response] == fS_RESPONSE_CLICKED) {
        SetPlayerSkin(playerid, fSelectionInfo[fs_modelid]);
        format(str, 64, "Bro da thay trang phuc %d", fSelectionInfo[fs_modelid]);
    }
    else strcat(str, "Bro da tat fSelection", 64);

    SendClientMessage(playerid, -1, str);
    return 1;
}

Testing

To test, simply run the package:

sampctl package run

Credits

jav - rfogkid26

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

dinhkhoi2298/fSelection: Biblioteka SA-MP | samp.directory