Biblioteca★ 3atualizado out. de 2024Sem licençaPawn
Abrir no GitHubEste repositório não tem arquivo de licença. Ele é público para leitura, mas isso sozinho não dá permissão para reutilizar.
README.md
samp-hunger
This is hunger/thirsty system for a San Andreas Multiplayer
Usage
#include <hunger.inc>
Callbacks
public OnPlayerHungerLevelUpdate(playerid, oldhungerlevel, newhungerlevel);
public OnPlayerThirstyLevelUpdate(playerid, oldthirstylevel, newthirstylevel);
Examples
public OnPlayerHungerLevelUpdate(playerid, oldhungerlevel, newhungerlevel)
{
if(IsPlayerHungry(playerid))
{
// force the player to eat
new Float:health;
GetPlayerHealth(playerid, health);
SetPlayerHealth(playerid, health-3);
// message
SendClientMessage(playerid, -1, "You are hungry! Eat some food");
}
return 1;
}
public OnPlayerThirstyLevelUpdate(playerid, oldthirstylevel, newthirstylevel)
{
if(IsPlayerThirsty(playerid))
{
// force the player to drink
new Float:health;
GetPlayerHealth(playerid, health);
SetPlayerHealth(playerid, health-3);
// message
SendClientMessage(playerid, -1, "You are thirsty! Drink some soda");
}
return 1;
}
hungerpropertiessa-mpsampsamp-hungerthirsty
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