06.11.2016, 22:55
Quisiera saber algun progressbar decente, que funcione al 100%, he usado unos y no sirven, he perdido tiempo con ello
#include <a_samp>
#include <orina>
//Tiempo que tarda en sumar 1 a GanasDeMear
#define Tiempo 20000 // ahora estб en 5 seg :v yo diria ponerle como 20 (20000)
//COLORES
#define VERDE 0x00D000FF
#define ROJO 0xE10000FF
#define NARANJA 0xFEAA00FF
//ANIMACION
#define MEAR_ANIMACION 68
//TImers
new ActualizarBarra[MAX_PLAYERS];
new TiempoMeando[MAX_PLAYERS];
//Barra
new Bar:MearBarra;
//Variables
new GanasDeMear[MAX_PLAYERS];
//Forwards de Timers
forward Menos(playerid);
forward DespuesDeMear(playerid);
//ProxDetector
#define T 0x00FF07FF
#define T2 0x00FF07FF
#define T3 0x00FF07FF
#define T4 0x00FF07FF
#define T5 0x00FF07FF
new Escuchar[MAX_PLAYERS];
forward ProxDetector(Float:radi, playerid, string[],col1,col2,col3,col4,col5);
public OnFilterScriptInit()
{
MearBarra = CreateProgressBar(548.000000, 35.000000, 57.500000, 5.199999, -51901185, 100);
return 1;
}
public OnPlayerSpawn(playerid)
{
GanasDeMear[playerid] = 0;
SetProgressBarValue(MearBarra, 0);
ActualizarBarra[playerid] = SetTimer("Menos",Tiempo,1);
ShowProgressBarForPlayer(playerid, MearBarra);
return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/orinar", cmdtext, true) == 0)
{
if(GanasDeMear[playerid] < 25)
{
SendClientMessage(playerid, ROJO, "Todavia no tienes tantas ganas de mear");
}
else
{
GanasDeMear[playerid] = 0;
SetProgressBarValue(MearBarra, 0);
TiempoMeando[playerid] = SetTimer("DespuesDeMear",3000,false);
SetPlayerSpecialAction(playerid, MEAR_ANIMACION);
SendClientMessage(playerid, VERDE, "[Pensamiento] ЎUuff!, ");
new string[256], nombre[256];
GetPlayerName(playerid, nombre, sizeof(nombre));
format(string, sizeof(string), "** PSSSSSSSSSSSSSSS(%s [ID:%d])",nombre, playerid);
ProxDetector(10.0, playerid, string,T,T2,T3,T4,T5);
}
return 1;
}
return 0;
}
public Menos(playerid)
{
GanasDeMear[playerid] += 1;
new Float:probando = GetProgressBarValue(MearBarra);
SetProgressBarValue(MearBarra, probando+1.0);
UpdateProgressBar(MearBarra, playerid);
if(GanasDeMear[playerid] == 50)
{
SendClientMessage(playerid, NARANJA, "Tienes ganas de mear, ves a un lavabo o mea detras de un arbol");
}
else if(GanasDeMear[playerid] == 75)
{
SendClientMessage(playerid, NARANJA, "ЎCorre, mea donde puedas! Si no meas te vas a mear encima!");
}
else if(GanasDeMear[playerid] == 100)
{
TogglePlayerControllable(playerid,0);
SetPlayerSpecialAction(playerid, MEAR_ANIMACION);
TiempoMeando[playerid] = SetTimer("DespuesDeMear",3000,false);
SendClientMessage(playerid, ROJO, "ЎTe has meado encima! Se van a reнr de ti");
}
return 1;
}
public DespuesDeMear(playerid)
{
GanasDeMear[playerid] = 0;
SetProgressBarValue(MearBarra, 0);
ActualizarBarra[playerid] = SetTimer("Menos",Tiempo,1);
SetPlayerSpecialAction(playerid, SPECIAL_ACTION_NONE);
TogglePlayerControllable(playerid,1);
return 1;
}
public ProxDetector(Float:radi, playerid, string[],col1,col2,col3,col4,col5)
{
if(IsPlayerConnected(playerid))
{
new Float:posx, Float:posy, Float:posz;
new Float:oldposx, Float:oldposy, Float:oldposz;
new Float:tempposx, Float:tempposy, Float:tempposz;
GetPlayerPos(playerid, oldposx, oldposy, oldposz);
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i) && (GetPlayerVirtualWorld(playerid) == GetPlayerVirtualWorld(i)))
{
if(!Escuchar[i])
{
GetPlayerPos(i, posx, posy, posz);
tempposx = (oldposx -posx);
tempposy = (oldposy -posy);
tempposz = (oldposz -posz);
if (((tempposx < radi/16) && (tempposx > -radi/16)) && ((tempposy < radi/16) && (tempposy > -radi/16)) && ((tempposz < radi/16) && (tempposz > -radi/16)))
{
SendClientMessage(i, col1, string);
}
else if (((tempposx < radi/8) && (tempposx > -radi/8)) && ((tempposy < radi/8) && (tempposy > -radi/8)) && ((tempposz < radi/8) && (tempposz > -radi/8)))
{
SendClientMessage(i, col2, string);
}
else if (((tempposx < radi/4) && (tempposx > -radi/4)) && ((tempposy < radi/4) && (tempposy > -radi/4)) && ((tempposz < radi/4) && (tempposz > -radi/4)))
{
SendClientMessage(i, col3, string);
}
else if (((tempposx < radi/2) && (tempposx > -radi/2)) && ((tempposy < radi/2) && (tempposy > -radi/2)) && ((tempposz < radi/2) && (tempposz > -radi/2)))
{
SendClientMessage(i, col4, string);
}
else if (((tempposx < radi) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) && (tempposz > -radi)))
{
SendClientMessage(i, col5, string);
}
}
else
{
SendClientMessage(i, col1, string);
}
}
}
}
return 1;
}
C:\Users\JONATAN\Desktop\diego\LatinGames RP 2.0\filterscripts\orina.pwn(2) : fatal error 100: cannot read from file: "orina" Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 1 Error.
|
Gles mira el error que me tira, porfavor pasame el include
Код:
C:\Users\JONATAN\Desktop\diego\LatinGames RP 2.0\filterscripts\orina.pwn(2) : fatal error 100: cannot read from file: "orina" Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 1 Error. |