samp.directory
← Skripte und Bibliotheken

Revelts/samp-wellness

SA-MP Character Body Wellness

Bibliothek★ 1aktualisiert Juni 2021Keine 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 Revelts/samp-wellness

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

samp-wellness

Installation

Simply install to your project:

sampctl package install Revelt/samp-wellness

Include in your code and begin using the library:

#include <samp-wellness>

Usage

  • Update your server hunger reduce amount for every player
SetHungerReduceAmount(Float:amount)
  • Update your server hunger reduce amount for every player
SetEnergyReduceAmount(Float:amount)

Functions

  • This is to set player's hunger Float:amount = The amount you want in float data! count : true / false True = it will count from the total amount False = it will set totally the wellness
SetPlayerHunger(playerid, Float:amount, count);
  • This is to set player's energy Float:amount = The amount you want in float data! count : true / false True = it will count from the total amount False = it will set totally the wellness
SetPlayerEnergy(playerid, Float:amount, count);
  • This is for get player's hunger in float amount!
GetPlayerHunger(playerid) To get the amount of player hunger in Float
  • This is for get player's energy in float amount!
GetPlayerEnergy(playerid) To get the amount of player energy in Float
  • This is for set player's hunger when they will become hungry!
SetPlayerHungryTrigger(playerid, Float:amount)
  • This is for set player's hunger when they will become hungry!
SetPlayerThirstyTrigger(playerid, Float:amount)
  • This is to get global hunger reduce amount!
GetHungerReduceAmount() to get the amount of hunger reduce / second
  • This is to get global energy reduce amount!
GetEnergyReduceAmount() to get the amount of energy reduce / second
  • This is to check if player's hunger or not!
IsPlayerHungry(playerid)
  • This is to check if player's thirsty or not!
IsPlayerThirsty(playerid)

Callback

  • when player update their wellness, reminder this callback always called every 1 second!
OnPlayerUpdateWellness(playerid) to check when the player update their wellness! you can do everything you want here

Testing

To test, simply run the package:

sampctl package run

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

Revelts/samp-wellness: SA-MP Bibliothek | samp.directory