← Scripts e bibliotecas
BitSain/SkinGender
An optimized system for identifying skin gender (male/female) in SA-MP with O(1) time complexity. Easily customizable and works in both gamemodes and filterscripts.
Filterscript★ 2atualizado jan. de 2025OtherPawn
Abrir no GitHubREADME.md
SkinGender - SA-MP Skin Gender Identification
Optimized system to identify skin gender (male/female) in SA-MP with O(1) time complexity.
Features
- O(1) performance.
- Easily customizable gender texts.
- Works in both gamemodes and filterscripts.
- Validates skin IDs to prevent errors.
Installation
- Place
SkinGender.incin theincludesfolder. - Include it in your script:
#include <SkinGender>
- Customize gender texts (optional) before including:
#define MALE_GENDER_TEXT "Male"
#define FEMALE_GENDER_TEXT "Female"
#define INVALID_GENDER_TEXT "Unknown"
#include <SkinGender>
- If you don't want to use y_hooks, use this before the inclusion:
#define SKG_NO_Y_HOOKS
#include <SkinGender>
Functions
- IsMaleSkinID(skinid): Returns
trueif the skin is male. - IsFemaleSkinID(skinid): Returns
trueif the skin is female. - GetSkinGenderText(skinid): Returns gender text (
"male","female", or"invalid"). - IsValidSkinID(skinid): Returns
trueif the skin is valid.
Example
if(IsMaleSkinID(22)) {
printf("Skin 22 is male.");
} else if(IsFemaleSkinID(9)) {
printf("Skin 9 is female.");
} else if(!IsValidSkinID(555)) {
printf("Skin 555 is invalid.");
}
printf("Skin 10 gender: %s", GetSkinGenderText(10));
Credit
- Author: BitSain (Leonardo)
- Contact: [email protected]
- Project: Link
License
This project is licensed under the Creative Commons Attribution-ShareAlike 4.0 International License (CC BY-SA 4.0).
For more details, visit CC BY-SA 4.0 / LICENSE.
Esta página é montada com o que o GitHub publica sobre o repositório. O samp.directory não hospeda o código. Avisar de um problema com esta página