[Ajuda] progress bar
#1

Olб, alguem pode me ajudar nesse erro? й um sistema chamado, progress bar, mais estб com erros, sinceramente nгo sei o que fazer, vocк pode me ajudar?


PHP код:
    pFomeBarra[1] = TextDrawCreate(578.000000157.000000"_"); //error (2718) : error 022: must be lvalue (non-constant)
    
TextDrawLetterSize(pFomeBarra[1], 0.4900000.499999);
    
TextDrawUseBox(pFomeBarra[1], 1);
    
TextDrawBoxColor(pFomeBarra[1], (0x99 | (~0xFF 0x045FB4FF)));
    
TextDrawTextSize(pFomeBarra[1], 534.00000024.000000);
    if (
strcmp(cmd"/comer"true) == 0)
    {
        if (
IsHotDog(playerid))
        {
            if (
IsPlayerInAnyVehicle(playerid)) return 1;
            if (
GetPlayerMoney(playerid) < 5) return SendClientMessage(playeridCOLOR_GRAD1"ERRO: Vocк nгo possui dinheiro suficiente em mгos.");
            if (
FomePlayer[playerid] == 100)
            {
                
GivePlayerMoney(playerid, -5);
                
FomePlayer[playerid] += 30//Estб certo amigo? : ( (( FomePlayer[playerid] ))
                
GivePlayerHealth(playerid1);
                
ApplyAnimation(playerid"FOOD""EAT_Burger"4.101111);
                
MensagemAcao(playerid0"pega um cachorro-quente.");
            }
            else 
SendClientMessage(playeridCOLOR_GRAD1"ERRO: Vocк esta satisfeito e nгo podera comer mais.");
            return 
1;
        }
        else 
SendClientMessage(playeridCOLOR_GRAD1"ERRO: Nгo hб nada para comer neste local.");
        return 
1;
    }
callback::TimerFome(playerid)
{
    
FomePlayer[playerid]--;
    
TextDrawTextSize(pFomeBarra[1], (39.0 + ((102.0 * ++FomePlayer) / 100)), 0.0);
    
TextDrawShowForPlayer(playeridpFomeBarra[1]);
    if (
FomePlayer[playerid] >= 1)
    {
        
TempoFome[playerid] = SetTimerEx("TimerFome"600000false"i"playerid);
        
SendClientMessage(playerid, -1"<!> Vocк estб ficando fraco e estб ficando com fome!");
        
RemovePlayerHealth(playerid2);
    }
    else if(
FomePlayer[playerid] == 0)
    {
        
SendClientMessage(playerid, -1"<!> Vocк estб com muita fome e estб passando mal!");
        
SetPlayerHealth(playerid0);
        
FomePlayer[playerid] = 0;
    }
    return 
1;

й um sistema de fome que estou terminando mais os erros nгo deixa eu terminar.

Код:
C:\Users\2\Desktop\gamemode\gamemodes\2.pwn(2718) : error 022: must be lvalue (non-constant)
Код:
C:\Users\2\Desktop\gamemode\gamemodes\2.pwn(2718) : warning 213: tag mismatch
C:\Users\2\Desktop\gamemode\gamemodes\2.pwn(2719) : warning 213: tag mismatch
C:\Users\2\Desktop\gamemode\gamemodes\2.pwn(9467) : warning 213: tag mismatch
C:\Users\2\Desktop\gamemode\gamemodes\2.pwn(9468) : warning 213: tag mismatch
C:\Users\2\Desktop\gamemode\gamemodes\2.pwn(9469) : warning 213: tag mismatch
C:\Users\2\Desktop\gamemode\gamemodes\2.pwn(9470) : warning 213: tag mismatch
C:\Users\2\Desktop\gamemode\gamemodes\2.pwn(9995) : warning 213: tag mismatch
C:\Users\2\Desktop\gamemode\gamemodes\2.pwn(9996) : warning 213: tag mismatch
C:\Users\2\Desktop\gamemode\gamemodes\2.pwn(9997) : warning 213: tag mismatch
C:\Users\2\Desktop\gamemode\gamemodes\2.pwn(9998) : warning 213: tag mismatch
C:\Users\2\Desktop\gamemode\gamemodes\2.pwn(9999) : warning 213: tag mismatch
C:\Users\2\Desktop\gamemode\gamemodes\2.pwn(10001) : warning 213: tag mismatch
C:\Users\2\Desktop\gamemode\gamemodes\2.pwn(10002) : warning 213: tag mismatch
C:\Users\2\Desktop\gamemode\gamemodes\2.pwn(10003) : warning 213: tag mismatch
C:\Users\2\Desktop\gamemode\gamemodes\2.pwn(10004) : warning 213: tag mismatch
C:\Users\2\Desktop\gamemode\gamemodes\2.pwn(10005) : warning 213: tag mismatch
C:\Users\2\Desktop\gamemode\gamemodes\2.pwn(10007) : warning 213: tag mismatch
C:\Users\2\Desktop\gamemode\gamemodes\2.pwn(10008) : warning 213: tag mismatch
C:\Users\2\Desktop\gamemode\gamemodes\2.pwn(10009) : warning 213: tag mismatch
C:\Users\2\Desktop\gamemode\gamemodes\2.pwn(10010) : warning 213: tag mismatch
C:\Users\2\Desktop\gamemode\gamemodes\2.pwn(11948) : warning 213: tag mismatch
C:\Users\2\Desktop\gamemode\gamemodes\2.pwn(11949) : warning 213: tag mismatch
C:\Users\2\Desktop\gamemode\gamemodes\2.pwn(11950) : warning 213: tag mismatch
C:\Users\2\Desktop\gamemode\gamemodes\2.pwn(11958) : warning 213: tag mismatch
C:\Users\2\Desktop\gamemode\gamemodes\2.pwn(11959) : warning 213: tag mismatch
C:\Users\2\Desktop\gamemode\gamemodes\2.pwn(11960) : warning 213: tag mismatch
C:\Users\2\Desktop\gamemode\gamemodes\2.pwn(11961) : warning 213: tag mismatch
C:\Users\2\Desktop\gamemode\gamemodes\2.pwn(54262) : warning 213: tag mismatch
C:\Users\2\Desktop\gamemode\gamemodes\2.pwn(54263) : warning 213: tag mismatch
C:\Users\2\Desktop\gamemode\gamemodes\2.pwn(54264) : warning 213: tag mismatch
C:\Users\2\Desktop\gamemode\gamemodes\2.pwn(54265) : warning 213: tag mismatch
C:\Users\2\Desktop\gamemode\gamemodes\2.pwn(54266) : warning 213: tag mismatch
C:\Users\2\Desktop\gamemode\gamemodes\2.pwn(54267) : warning 213: tag mismatch
C:\Users\2\Desktop\gamemode\gamemodes\2.pwn(54268) : warning 213: tag mismatch
C:\Users\2\Desktop\gamemode\gamemodes\2.pwn(54269) : warning 213: tag mismatch
C:\Users\2\Desktop\gamemode\gamemodes\2.pwn(54270) : warning 213: tag mismatch
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Error.
Quero aprender usar este sistema, aguem me diz o que ouve por favor?

@edit

Acho que achei o erro, o que fiz de errado? usei o tutorial do paulor do fуrum samp, mais eu queria colocar a funзгo FomePlayer, por ela que vai definir onde vai esta a progress bar, mais estб muito avanзado, nгo й impossivel, mais estou estudando, alguem pode me dizer como posso fazer? tipo, a pessoa deslogar do servidor e salva na conta do jogador a definiзгo FomePlayer, e quando ele relogar volta onde estava a fome do jogador, progress bar, por favor me ajude?


PHP код:
    // Aqui vai diminuir a fome do jogador, mais nгo sei onde coloco a funзгo FomePlayer, exemplo, FomePlayer estб definido em 50 por cento, ou seja, metade da progress bar, up?
        
static FloatProgress;
    
TextDrawTextSize(FomeBarra[1], (39.0 + ((102.0 * ++Progress) / 100)), 0.0);
    
TextDrawShowForPlayer(playeridFomeBarra[1]);
// Abaixo, tem um codigo, ele deve apenas mostrar para o jogador a progress bar, que deveria ser difinido com FomePlayer
            
TextDrawTextSize(FomeBarra[1], /*Nгo sei o que faзo aqui*/0.0);
            
TextDrawShowForPlayer(playeridFomeBarra[1]); 
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)