skripta koju koristim:nevazno
detaljan opis problema:skinuo sam jednu FS za glad i nisam mogo compile jer nisam imo include BarProgres tak nest i ja skino include ubacio u floder includes opet otvorio pawno da bi compile i nece opet pise da nemoze procitat from include ProgresBar
[pomoc]FS
1,814
pregleda
11
postova
10. Avg. 2013.
10. Avg. 2013.
nece opet evo fs
evo include Progresbar
// Mood System By RipLagger
// Full Credited To Include Maker
#define FILTERSCRIPT
#include
#include
#include
#include
#if defined FILTERSCRIPT
#define COLOR_BLUE 0x0000BBAA
#define COLOR_LIGHTBLUE 0x33CCFFAA
new Text:Hungry;
new Text:Bladder;
new Text:Energy;
new Bar:hungry = {INVALID_BAR_ID, ...};
new Bar:bladder = {INVALID_BAR_ID, ...};
new Bar:energy = {INVALID_BAR_ID, ...};
forward ProgressBarb();
forward ProgressBarh();
forward ProgressBare();
forward update();
forward Pissing();
forward Resting();
new pisst,
Rest
;
enum PlayerStats
{
Blad,
Hunger,
Ener,
piss,
rest
};
new PInfo;
new PlayerLoopingAnim;
LoopingAnim(playerid,animlib[],animname[], Float:Speed, looping, lockx, locky, lockz, lp)
{
PlayerLoopingAnim = 1;
ApplyAnimation(playerid, animlib, animname, Speed, looping, lockx, locky, lockz, lp);
}
public OnFilterScriptInit()
{
print("\n--------------------------------------");
print(" Loading Mood System By RipLagger");
print("--------------------------------------\n");
SetTimer("ProgressBarh", 1, 1); // 1000 = 1 second 60000 = 1 minute
SetTimer("ProgressBarb", 1, 1);
SetTimer("ProgressBare", 1, 1);
SetTimer("update", 500, 1);
Hungry = TextDrawCreate(43.000000, 147.000000, "Hunger");
TextDrawBackgroundColor(Hungry, -1);
TextDrawFont(Hungry, 1);
TextDrawLetterSize(Hungry, 0.919999, 2.399999);
TextDrawColor(Hungry, -16776961);
TextDrawSetOutline(Hungry, 1);
TextDrawSetProportional(Hungry, 1);
TextDrawTextSize(Hungry, 139.000000, 754.000000);
Bladder = TextDrawCreate(43.000000, 206.000000, "Bladder");
TextDrawBackgroundColor(Bladder, -1);
TextDrawFont(Bladder, 1);
TextDrawLetterSize(Bladder, 0.919999, 2.399999);
TextDrawColor(Bladder, -16776961);
TextDrawSetOutline(Bladder, 1);
TextDrawSetProportional(Bladder, 1);
TextDrawTextSize(Bladder, 139.000000, 754.000000);
Energy = TextDrawCreate(43.000000, 266.000000, "Energy");
TextDrawBackgroundColor(Energy, -1);
TextDrawFont(Energy, 1);
TextDrawLetterSize(Energy, 0.919999, 2.399999);
TextDrawColor(Energy, -16776961);
TextDrawSetOutline(Energy, 1);
TextDrawSetProportional(Energy, 1);
TextDrawTextSize(Energy, 139.000000, 754.000000);
print("\n--------------------------------------");
print(" Loaded Mood System By RipLagger|Warning dont remove any credits");
print("--------------------------------------\n");
return 1;
}
public ProgressBarh()
{
for(new playerid; playerid < MAX_PLAYERS; playerid++)
{
new Float:health;
GetPlayerHealth(playerid, health);
new HungryTime = SetPlayerHealth(playerid, health-1);
SetProgressBarValue(hungry, GetProgressBarValue(hungry)-2);
if(GetProgressBarValue(hungry) <= 0)
{
SetTimer("HungryTime", 30000, 1);
SetProgressBarValue(hungry, 0);
SendClientMessage(playerid, COLOR_BLUE, "You are hungry now, go to the restaurant to eat some food");
}
if(GetProgressBarValue(hungry) > 0)
{
KillTimer(HungryTime);
}
if(GetProgressBarValue(hungry) > 100)
{
SetProgressBarValue(hungry, 100);
}
}
return 1;
}
public ProgressBarb()
{
for(new playerid; playerid < MAX_PLAYERS; playerid++)
{
new Float:health;
GetPlayerHealth(playerid, health);
new BladderTime = SetPlayerHealth(playerid, health-10000);
SetProgressBarValue(bladder, GetProgressBarValue(bladder)-3000);
if(GetProgressBarValue(bladder) <= 0)
{
SetTimer("BladderTime", 30000, 1);
SetProgressBarValue(bladder, 0);
SendClientMessage(playerid, COLOR_BLUE, "You must goto toilet now or you will lose your health every 30 seconds");
}
if(GetProgressBarValue(bladder) > 0)
{
KillTimer(BladderTime);
}
if(GetProgressBarValue(bladder) > 100)
{
SetProgressBarValue(bladder, 100);
}
}
return 1;
}
public ProgressBare()
{
for(new playerid; playerid < MAX_PLAYERS; playerid++)
{
new Float:health;
GetPlayerHealth(playerid, health);
new RestTime = SetPlayerHealth(playerid, health-10000);
SetProgressBarValue(energy, GetProgressBarValue(energy)-400000);
if(GetProgressBarValue(energy) <= 0)
{
SetTimer("RestTime", 30000, 1);
SetProgressBarValue(energy, 0);
SendClientMessage(playerid, COLOR_BLUE, "You must take a rest now");
}
if(GetProgressBarValue(energy) > 0)
{
KillTimer(RestTime);
}
if(GetProgressBarValue(energy) > 100)
{
SetProgressBarValue(energy, 100);
}
}
return 1;
}
public update()
{
for(new playerid; playerid < MAX_PLAYERS; playerid++)
{
UpdateProgressBar(hungry, playerid);
UpdateProgressBar(bladder, playerid);
UpdateProgressBar(energy, playerid);
if(PInfo == 1 && GetProgressBarValue(bladder) == 100)
{
SetPlayerSpecialAction(playerid, 0);
PInfo = 0;
KillTimer(pisst);
}
if(PInfo == 1 && GetProgressBarValue(energy) == 100)
{
PlayerLoopingAnim = 0;
ClearAnimations(playerid);
PInfo = 0;
KillTimer(Rest);
}
if(PInfo == 1)
{
LoopingAnim(playerid,"CRACK", "crckdeth2", 1.800001, 1, 0, 0, 1, 600);
}
}
return 1;
}
public Pissing()
{
for(new playerid; playerid < MAX_PLAYERS; playerid++)
SetProgressBarValue(bladder, GetProgressBarValue(bladder)+5);
return 1;
}
public Resting()
{
for(new playerid; playerid < MAX_PLAYERS; playerid++)
SetProgressBarValue(energy, GetProgressBarValue(energy)+7);
return 1;
}
#endif
public OnPlayerConnect(playerid)
{
PInfo = 100;
PInfo = 100;
PInfo = 100;
PInfo = 0;
return 1;
}
public OnPlayerDisconnect(playerid, reason)
{
new file,n;
GetPlayerName(playerid,n,MAX_PLAYER_NAME);
format(file,sizeof(file),"Stats/%s.txt",n);
PInfo = 0;
PInfo = floatround(GetProgressBarValue(hungry));
PInfo = floatround(GetProgressBarValue(bladder));
PInfo = floatround(GetProgressBarValue(energy));
if(dini_Exists(file))
{
dini_IntSet(file,"Hunger",floatround(GetProgressBarValue(hungry)));
dini_IntSet(file,"Bladder",floatround(GetProgressBarValue(bladder)));
dini_IntSet(file,"Energy",floatround(GetProgressBarValue(energy)));
return 1;
}
return 1;
}
public OnPlayerSpawn(playerid)
{
new file,n;
GetPlayerName(playerid,n,MAX_PLAYER_NAME);
format(file,sizeof(file),"Stats/%s.txt",n);
if(!dini_Exists(file))
{
dini_Create(file);
dini_IntSet(file,"Hunger",100);
dini_IntSet(file,"Bladder",100);
dini_IntSet(file,"Energy",100);
}
hungry = CreateProgressBar(43.00, 176.00, 86.50, 18.20, 1097465770, 100.0);
bladder = CreateProgressBar(43.00, 236.00, 86.50, 18.20, 1097465770, 100.0);
energy = CreateProgressBar(43.00, 296.00, 86.50, 18.20, 1097465770, 100.0);
ShowProgressBarForPlayer(playerid, hungry);
ShowProgressBarForPlayer(playerid, bladder);
ShowProgressBarForPlayer(playerid, energy);
TextDrawShowForPlayer(playerid, Hungry);
TextDrawShowForPlayer(playerid, Bladder);
TextDrawShowForPlayer(playerid, Energy);
SetProgressBarValue(hungry, dini_Int(file,"Hunger"));
SetProgressBarValue(bladder, dini_Int(file,"Bladder"));
SetProgressBarValue(energy, dini_Int(file,"Energy"));
PInfo = 0;
return 1;
}
public OnPlayerDeath(playerid, killerid, reason)
{
SetProgressBarValue(hungry, 50);
SetProgressBarValue(bladder, 50);
SetProgressBarValue(energy, 50);
PInfo = 0;
return 1;
}
strtok(const string[], &index)
{
new length = strlen(string);
while ((index < length) && (string <= ' '))
{
index++;
}
new offset = index;
new result;
while ((index < length) && (string > ' ') && ((index - offset) < (sizeof(result) - 1)))
{
result[index - offset] = string;
index++;
}
result[index - offset] = EOS;
return result;
}
CMD:eat(playerid,params[])
{
if(isnull(params))
{
SendClientMessage(playerid, COLOR_LIGHTBLUE, "Usage: /eat [burger/pizza/chicken]");
}
if(strcmp(params,"burger",true) == 0)
{
if(IsPlayerInRangeOfPoint(playerid, 20, 366.0248, -73.3478, 1001.5078))
{
GivePlayerMoney(playerid, -25);
SetPlayerHealth(playerid, 100);
SetProgressBarValue(hungry, GetProgressBarValue(hungry)+10);
return SendClientMessage(playerid, COLOR_BLUE, "Thanks For Buying Burger");
}
else return SendClientMessage(playerid, COLOR_BLUE, "You Must In Burger Shot For Eat Burger");
}
if(strcmp(params,"pizza",true) == 0)
{
if(IsPlayerInRangeOfPoint(playerid, 50, 372.3520, -131.6510, 1001.4922))
{
GivePlayerMoney(playerid, -35);
SetPlayerHealth(playerid, 100);
SetProgressBarValue(hungry, GetProgressBarValue(hungry)+15);
return SendClientMessage(playerid, COLOR_BLUE, "Thanks For Buying Pizza");
}
else return SendClientMessage(playerid, COLOR_BLUE, "You Must In Well Stacked Pizza For Eat Pizza");
}
if(strcmp(params,"chicken",true) == 0)
{
if(IsPlayerInRangeOfPoint(playerid, 50, 365.7158, -9.8873, 1001.8516))
{
GivePlayerMoney(playerid, -10);
SetPlayerHealth(playerid, 100);
SetProgressBarValue(hungry, GetProgressBarValue(hungry)+5);
return SendClientMessage(playerid, COLOR_BLUE, "Thanks For Buying Chicken");
}
else return SendClientMessage(playerid, COLOR_BLUE, "You Must In Cluckin Bell For Eat Chicken");
}
return 1;
}
CMD:pee(playerid,params[])
{
#pragma unused params
PInfo = 1;
SetPlayerSpecialAction(playerid, 68);
pisst = SetTimer("Pissing",1000,1);
return 1;
}
CMD:rest(playerid,params[])
{
Rest = SetTimer("Resting",5000,1);
PInfo = 1;
LoopingAnim(playerid,"CRACK", "crckdeth2", 1.800001, 1, 0, 0, 1, 600);
return 1;
}
CMD:setmaxmood(playerid,params[])
{
new tmp ;
new tmp2;
new Index;
new player1;
new mood;
tmp = strtok(params,Index);
tmp2 = strtok(params,Index);
if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, -1, "SERVER: You must be an admin to use this command");
if(isnull(params)) return SendClientMessage(playerid, COLOR_LIGHTBLUE, "Usage: /setmood [Mood(1-4)]");
player1 = strval(tmp);
if(isnull(tmp2)) return SendClientMessage(playerid, COLOR_LIGHTBLUE, "Usage: /setmood [Mood(1-4)]");
mood = strval(tmp2);
if(player1 != INVALID_PLAYER_ID)
{
if(mood > 4) return SendClientMessage(playerid, -1, "SERVER: You can only select mood 1 (hunger), 2 (bladder), 3 (energy), and 4 (All mood)!");
if(mood == 1)
{
SetProgressBarValue(hungry, 100);
SendClientMessage(player1, -1, "SERVER: Your hungry setted to max by an admin");
}
if(mood == 2)
{
SetProgressBarValue(bladder, 100);
SendClientMessage(player1, -1, "SERVER: Your bladder setted to max by an admin");
}
if(mood == 3)
{
SetProgressBarValue(energy, 100);
SendClientMessage(player1, -1, "SERVER: Your energy setted to max by an admin");
}
if(mood == 4)
{
SetProgressBarValue(hungry, 100);
SetProgressBarValue(bladder, 100);
SetProgressBarValue(energy, 100);
SendClientMessage(player1, -1, "SERVER: Your mood setted to max by an admin");
}
}
else
{
SendClientMessage(playerid, -1, "SERVER: Nobody on that ID!");
}
return 1;
}evo include Progresbar
/**
* Progress Bar 1.3.1.0
* Copyright 2007-2010 Infernus' Group,
* Flávio Toribio (flavio_toibio@hotmail.com)
*
* Updated by Southclaw for use with the PlayerTextDraws of 0.3e
*
*/
#if defined _playerprogress_included
#endinput
#endif
#if !defined _samp_included
#tryinclude
#if !defined _samp_included
#error could not locate a_samp.inc file, please check your server includes
#endif
#endif
#define _playerprogress_included
#define _playerprogress_version 0x1310
#define MAX_PLAYER_BARS (MAX_PLAYER_TEXT_DRAWS / 3)
#define INVALID_PLAYER_BAR_VALUE (Float:0xFFFFFFFF)
#define INVALID_PLAYER_BAR_ID (PlayerBar:-1)
#define pb_percent(%1,%2,%3,%4) ((%1 - 6.0) + ((((%1 + 6.0 + %2 - 2.0) - %1) / %3) * %4))
//pb_percent(x, width, max, value)
/* Pawno/Infernus Pawn Editor function list
native PlayerBar:CreatePlayerProgressBar(playerid, Float:x, Float:y, Float:width=55.5, Float:height=3.2, color, Float:max=100.0);
native DestroyPlayerProgressBar(playerid, PlayerBar:barid);
native ShowPlayerProgressBar(playerid, PlayerBar:barid);
native HidePlayerProgressBar(playerid, PlayerBar:barid);
native SetPlayerProgressBarValue(playerid, PlayerBar:barid, Float:value);
native Float:GetPlayerProgressBarValue(playerid, PlayerBar:barid);
native SetPlayerProgressBarMaxValue(playerid, PlayerBar:barid, Float:max);
native SetPlayerProgressBarColor(playerid, PlayerBar:barid, color);
native UpdatePlayerProgressBar(playerid, PlayerBar:barid);
*/
forward PlayerBar:CreatePlayerProgressBar(playerid, Float:x, Float:y, Float:width=55.5, Float:height=3.2, color, Float:max=100.0);
forward Float:GetPlayerProgressBarValue(playerid, PlayerBar:barid);
enum E_BAR_DATA
{
Float:pbar_x,
Float:pbar_y,
Float:pbar_w,
Float:pbar_h,
Float:pbar_m,
Float:pbar_v,
pbar_colour,
bool:pbar_valid
}
enum E_BAR_TEXT_DRAW
{
PlayerText:pbar_textdraw1,
PlayerText:pbar_textdraw2,
PlayerText:pbar_textdraw3
}
static
gPlayerBarData,
gPlayerBarTD;
stock PlayerBar:CreatePlayerProgressBar(playerid, Float:x, Float:y, Float:width=55.5, Float:height=3.2, color, Float:max=100.0)
{
new
barid;
for(barid = 0; barid < MAX_PLAYER_BARS; ++barid) // Changed from `Bars` to `MAX_PLAYER_BARS` rather than getting the size of the second cell
if(!gPlayerBarData) break;
if(gPlayerBarData || barid == MAX_PLAYER_BARS)
return INVALID_PLAYER_BAR_ID;
new PlayerText:in_t = gPlayerBarTD = CreatePlayerTextDraw(playerid, x, y, "_");
PlayerTextDrawUseBox (playerid, in_t, 1);
PlayerTextDrawTextSize (playerid, in_t, x + width, 0.0);
PlayerTextDrawLetterSize (playerid, in_t, 1.0, height / 10);
PlayerTextDrawBoxColor (playerid, in_t, 0x00000000 | (color & 0x000000FF));
in_t = gPlayerBarTD = CreatePlayerTextDraw(playerid, x + 1.2, y + 2.15, "_");
PlayerTextDrawUseBox (playerid, in_t, 1);
PlayerTextDrawTextSize (playerid, in_t, x + width - 2.0, 0.0);
PlayerTextDrawLetterSize (playerid, in_t, 1.0, height / 10 - 0.35);
PlayerTextDrawBoxColor (playerid, in_t, (color & 0xFFFFFF00) | (0x66 & ((color & 0x000000FF) / 2)));
in_t = gPlayerBarTD = CreatePlayerTextDraw(playerid, x + 1.2, y + 2.15, "_");
PlayerTextDrawTextSize (playerid, in_t, pb_percent(x, width, max, 1.0), 0.0);
PlayerTextDrawLetterSize (playerid, in_t, 1.0, height / 10 - 0.35);
PlayerTextDrawBoxColor (playerid, in_t, color);
gPlayerBarData = x;
gPlayerBarData = y;
gPlayerBarData = width;
gPlayerBarData = height;
gPlayerBarData = max;
gPlayerBarData = color;
gPlayerBarData = true;
return PlayerBar:barid;
}
stock DestroyPlayerProgressBar(playerid, PlayerBar:barid)
{
if(barid != INVALID_PLAYER_BAR_ID && PlayerBar:-1 < barid < PlayerBar:MAX_PLAYER_BARS)
{
if(!gPlayerBarData[_:barid])
return 0;
PlayerTextDrawDestroy(playerid, gPlayerBarTD[_:barid]);
PlayerTextDrawDestroy(playerid, gPlayerBarTD[_:barid]);
PlayerTextDrawDestroy(playerid, gPlayerBarTD[_:barid]);
gPlayerBarData[_:barid] = 0.0;
gPlayerBarData[_:barid] = 0.0;
gPlayerBarData[_:barid] = 0.0;
gPlayerBarData[_:barid] = 0.0;
gPlayerBarData[_:barid] = 0.0;
gPlayerBarData[_:barid] = 0.0;
gPlayerBarData[_:barid] = 0;
gPlayerBarData[_:barid] = false;
return 1;
}
return 0;
}
stock ShowPlayerProgressBar(playerid, PlayerBar:barid)
{
if(IsPlayerConnected(playerid) && barid != INVALID_PLAYER_BAR_ID && PlayerBar:-1 < barid < PlayerBar:MAX_PLAYER_BARS)
{
if(!gPlayerBarData[_:barid])
return 0;
PlayerTextDrawShow(playerid, gPlayerBarTD[_:barid]);
PlayerTextDrawShow(playerid, gPlayerBarTD[_:barid]);
PlayerTextDrawShow(playerid, gPlayerBarTD[_:barid]);
return 1;
}
return 0;
}
stock HidePlayerProgressBar(playerid, PlayerBar:barid)
{
if(IsPlayerConnected(playerid) && barid != INVALID_PLAYER_BAR_ID && PlayerBar:-1 < barid < PlayerBar:MAX_PLAYER_BARS)
{
if(!gPlayerBarData[_:barid])
return 0;
PlayerTextDrawHide(playerid, gPlayerBarTD[_:barid]);
PlayerTextDrawHide(playerid, gPlayerBarTD[_:barid]);
PlayerTextDrawHide(playerid, gPlayerBarTD[_:barid]);
return 1;
}
return 0;
}
stock SetPlayerProgressBarValue(playerid, PlayerBar:barid, Float:value)
{
if(barid == INVALID_PLAYER_BAR_ID || PlayerBar:MAX_PLAYER_BARS < barid < PlayerBar:-1)
return 0;
if(gPlayerBarData[_:barid])
{
value =
(value < 0.0) ? (0.0) : (value > gPlayerBarData[_:barid]) ? (gPlayerBarData[_:barid]) : (value);
PlayerTextDrawUseBox(playerid, gPlayerBarTD[_:barid], value > 0.0);
gPlayerBarData[_:barid] = value;
PlayerTextDrawTextSize(playerid, gPlayerBarTD[_:barid],
pb_percent(gPlayerBarData[_:barid] + 4, gPlayerBarData[_:barid] - 12, gPlayerBarData[_:barid], value), 0.0);
return 1;
}
return 0;
}
stock Float:GetPlayerProgressBarValue(playerid, PlayerBar:barid)
{
if(barid == INVALID_PLAYER_BAR_ID || PlayerBar:MAX_PLAYER_BARS < barid < PlayerBar:-1)
return INVALID_PLAYER_BAR_VALUE;
if(gPlayerBarData[_:barid])
return gPlayerBarData[_:barid];
return INVALID_PLAYER_BAR_VALUE;
}
stock SetPlayerProgressBarMaxValue(playerid, PlayerBar:barid, Float:max)
{
if(barid == INVALID_PLAYER_BAR_ID || PlayerBar:MAX_PLAYER_BARS < barid < PlayerBar:-1)
return 0;
if(gPlayerBarData[_:barid])
{
gPlayerBarData[_:barid] = max;
SetPlayerProgressBarValue(playerid, barid, gPlayerBarData[_:barid]);
return 1;
}
return 0;
}
stock SetPlayerProgressBarColor(playerid, PlayerBar:barid, color)
{
if(barid == INVALID_PLAYER_BAR_ID || PlayerBar:MAX_PLAYER_BARS < barid < PlayerBar:-1)
return 0;
if(gPlayerBarData[_:barid])
{
gPlayerBarData[_:barid] = color;
PlayerTextDrawBoxColor(playerid, gPlayerBarTD[_:barid], 0x00000000 | (color & 0x000000FF));
PlayerTextDrawBoxColor(playerid, gPlayerBarTD[_:barid],
(color & 0xFFFFFF00) | (0x66 & ((color & 0x000000FF) / 2)));
PlayerTextDrawBoxColor(playerid, gPlayerBarTD[_:barid], color);
return 1;
}
return 0;
}
stock UpdatePlayerProgressBar(playerid, PlayerBar:barid)
{
return ShowPlayerProgressBar(playerid, barid);
}[/code
i evo eror
C:\Users\dominik\Desktop\Vortex Gaming\filterscripts\hunger.pwn(10) : fatal error 100: cannot read from file: "ProgressBar"
Compilation aborted.Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
1 Error.
10. Avg. 2013.
skripta se ucita al ja je moram editovat jer je na engleskom a dobijem taj eoror sto ne ucitava INC
C:\Users\dominik\Desktop\Vortex Gaming\filterscripts\hunger.pwn(10) : fatal error 100: cannot read from file: "ProgressBar"10. Avg. 2013.
Uradi sve kao Å¡to piÅ¡e u tutorialu,i nemoj se jeb-at sa fs-om 😉
http://balkan-samp.com/forum/index.php?topic=70008.0
http://balkan-samp.com/forum/index.php?topic=70008.0
Morate biti prijavljeni da biste odgovorili na ovu temu.
Prijava