Bibliothèque★ 1mis à jour août 2024Pas de licencePawn
Ouvrir sur GitHubCe dépôt n’a pas de fichier de licence. Il est public en lecture, mais cela ne donne pas à lui seul le droit de le réutiliser.
L’essayer dans le compilateur Pawn →
Ajoute ses fichiers include, avec les bibliothèques dont il dépend, au compilateur Pawn de ton navigateur, prêts à être inclus dans un script.
README.md
mSelection
This version is made by Giapp, a modified version of this nearly original version
- Same to mSelection but new UI and custom text
- Support open.mp
- Support samp-textdraw-streamer
IMAGES
INSTALLATION
Include in your code and begin using the library:
#include <mSelection>
FUNCTIONS
LoadModelSelectionMenu(f_name[]);
HideModelSelectionMenu(playerid);
ShowModelSelectionMenu(playerid, ListID, header_text[], dialogBGcolor, previewBGcolor, tdSelectionColor);
ShowModelSelectionMenuEx(playerid, items_array[], item_amount, header_text[], extraid, Xrot, Yrot, Zrot, mZoom, dialogBGcolor, previewBGcolor, tdSelectionColor);
CALLBACKS
OnPlayerModelSelection(playerid, response, listid, modelid);
OnPlayerModelSelectionEx(playerid, response, extraid, modelid, extralist_id);
USAGE AND EXAMPLE
- [ModelID] = "ID: 1"...
- [VehicleName] = "NRG-500"...
SkinsList.txt
modelid text[] Float:RotationX Float:RotationY Float:RotationZ Float:Zoom
1 [ModelID]
2 [ModelID]
5 CustomText
VehList.txt
modelid text[] Float:RotationX Float:RotationY Float:RotationZ Float:Zoom
400 [VehicleName] 1.000000 1.000000 1.000000 1.0
401 _ 2.000000 2.000000 2.000000 1.0
gamemode.pwn
#include <a_samp>
#include <textdraw-streamer>
#include <mSelection>
#include <Pawn.CMD>
new SkinsList, VehList;
public OnGameModeInit() {
SkinsList = LoadModelSelectionMenu("SkinsList.txt"); // (scriptfiles/SkinsList.txt)
VehList = LoadModelSelectionMenu("VehList.txt");
return 1;
}
cmd:skinlist(playerid, params[]) {
ShowModelSelectionMenu(playerid, SkinsList, "Skins list title");
return 1;
}
cmd:vehlist(playerid, params[]) {
ShowModelSelectionMenu(playerid, VehList, "Vehicles list title");
return 1;
}
public OnPlayerModelSelection(playerid, response, listid, modelid) {
if(listid == SkinsList) {
if(response) {
// set player skin or something
// or your work
}
}
if(listid == VehList) {
if(response) {
// create a vehicle or something
// or your work
}
}
}
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