27.12.2014, 14:55
(
Последний раз редактировалось igor97m; 27.12.2014 в 16:20.
)
Queria passar esse FS para gm que em FS ele buga e queria dar umas melhoradas nele... ajudem aii?
FS codigos:
FS codigos:
PHP код:
//============================================================================//
// FilterScript De Fome e Sede Criado Por Catchorro , Nao Retirar Os Creditos //
//============================================================================//
#include <progress>
#include <a_samp>
#include <zcmd>
//============================================================================//
#define FomeTempo 1 // Tempo Da Fome Ex : 1 Minuto
#define SedeTempo 1 // Tempo Da Sede Ex : 1 Minuto
//============================================================================//
#define Positivo 0xFFFF00FF
#define Negativo 0xAA3333AA
//============================================================================//
new Text:FomeT;
new Text:SedeT;
//============================================================================//
new Bar:FomeA;
new Bar:SedeB;
//============================================================================//
forward Fome(playerid);
forward Sede(playerid);
//============================================================================//
public OnFilterScriptInit()
{
//============================================================================//
FomeT = TextDrawCreate(564.000000, 99.000000, "- Fome");
TextDrawBackgroundColor(FomeT, 255);
TextDrawFont(FomeT, 2);
TextDrawLetterSize(FomeT, 0.310000, 1.100000);
TextDrawColor(FomeT, 16711935);
TextDrawSetOutline(FomeT, 1);
TextDrawSetProportional(FomeT, 1);
//============================================================================//
SedeT = TextDrawCreate(564.000000, 111.000000, "- Sede");
TextDrawBackgroundColor(SedeT, 255);
TextDrawFont(SedeT, 2);
TextDrawLetterSize(SedeT, 0.320000, 1.100000);
TextDrawColor(SedeT, 16711935);
TextDrawSetOutline(SedeT, 1);
TextDrawSetProportional(SedeT, 1);
//============================================================================//
FomeA = CreateProgressBar(501.00, 104.00, 55.50, 3.20, -8716033, 100.0);
SetProgressBarMaxValue(FomeA, 100);
SedeB = CreateProgressBar(501.00, 116.00, 55.50, 3.20, -8716033, 100.0);
SetProgressBarMaxValue(SedeB, 100);
//============================================================================//
return 1;
}
//============================================================================//
public OnFilterScriptExit()
{
//============================================================================//
HideProgressBarForAll(FomeA);
HideProgressBarForAll(SedeB);
//============================================================================//
TextDrawDestroy(FomeT);
TextDrawDestroy(SedeT);
//============================================================================//
return 1;
}
//============================================================================//
public OnPlayerConnect(playerid)
{
//============================================================================//
//Funзгo
//============================================================================//
return 1;
}
//============================================================================//
public OnPlayerSpawn(playerid)
{
//============================================================================//
SetPVarInt(playerid,"Fome",0);
ShowProgressBarForPlayer(playerid, FomeA);
SetPVarInt(playerid,"Sede",0);
ShowProgressBarForPlayer(playerid, SedeB);
//============================================================================//
TextDrawShowForPlayer(playerid, FomeT);
TextDrawShowForPlayer(playerid, SedeT);
//============================================================================//
SetTimerEx("Fome",FomeTempo*60000 , 1, "i", playerid);
SetTimerEx("Sede",SedeTempo*60000 , 1, "i", playerid);
//============================================================================//
return 1;
}
//============================================================================//
public OnPlayerDeath(playerid, killerid, reason)
{
//============================================================================//
SetProgressBarValue(FomeA,0);
UpdateProgressBar(FomeA,playerid);
SetPVarInt(playerid,"Fome",0);
SetProgressBarValue(SedeB,0);
UpdateProgressBar(SedeB,playerid);
SetPVarInt(playerid,"Sede",0);
//============================================================================//
return 1;
}
//============================================================================//
public Fome(playerid)
{
//============================================================================//
SetPVarInt(playerid,"Fome",GetPVarInt(playerid,"Fome")+5);
SetProgressBarValue(FomeA, GetPVarInt(playerid,"Fome"));
UpdateProgressBar(FomeA,playerid);
if(GetPVarInt(playerid,"Fome") >= 95)
{
new Float:Vida;
GetPlayerHealth(playerid,Vida),SetPlayerHealth(playerid,Vida-90.0);
SendClientMessage(playerid,-1,"{AA3333}Vai Comer Um Lanche Ou Morrera.");
}
//============================================================================//
return 1;
}
//============================================================================//
public Sede(playerid)
{
//============================================================================//
SetPVarInt(playerid,"Sede",GetPVarInt(playerid,"Sede")+5);
SetProgressBarValue(SedeB, GetPVarInt(playerid,"Sede"));
UpdateProgressBar(SedeB,playerid);
if(GetPVarInt(playerid,"Sede") >= 95)
{
new Float:Vida;
GetPlayerHealth(playerid,Vida),SetPlayerHealth(playerid,Vida-90.0);
SendClientMessage(playerid,-1,"{AA3333}Vai Beber Uma Agua Ou Morrera.");
}
//============================================================================//
return 1;
}
//============================================================================//
CMD:comer(playerid,params[])
{
SetPVarInt(playerid,"Fome",GetPVarInt(playerid,"Fome")-15);
SetProgressBarValue(FomeA, GetPVarInt(playerid,"Fome"));
UpdateProgressBar(FomeA,playerid);
ApplyAnimation(playerid, "FOOD", "EAT_Burger", 3.0, 0, 0, 0, 0, 0);
SendClientMessage(playerid,-1,"{FFFF00}Voce Comeu e Sua Fome Diminuiu.");
return 1;
}
//============================================================================//
CMD:beber(playerid,params[])
{
SetPVarInt(playerid,"Sede",GetPVarInt(playerid,"Sede")-15);
SetProgressBarValue(SedeB, GetPVarInt(playerid,"Sede"));
UpdateProgressBar(SedeB,playerid);
ApplyAnimation(playerid,"PED","WALK_DRUNK",4.1,1,1,1,1,1,1);
SendClientMessage(playerid,-1,"{FFFF00}Voce Bebeu e Sua Sede Diminuiu.");
return 1;
}
//============================================================================//
// FilterScript De Fome e Sede Criado Por Catchorro , Nao Retirar Os Creditos //
//============================================================================//