[Ajuda] EMPRESA - EMPRESA - EMPRESA
#1

Estou com um probleminha, para o text label das empresas mostrar o player deve estar encima da PICKUP, preciso da sua ajuda para tirar-lo... Eu estou achando que й o codigo if(PlayerToPoint(2.0, i, BizzInfo[h][bEntranceX], BizzInfo[h][bEntranceY], BizzInfo[h][bEntranceZ])) - Mais eu nгo sei como tirar-lo pois nгo sei o que colocar no lugar dele, se puder me ajudar agradeзo deis de jб..


Quote:

if(PlayerToPoint(2.0, i, BizzInfo[h][bEntranceX], BizzInfo[h][bEntranceY], BizzInfo[h][bEntranceZ]))
{
if(BizzInfo[h][bOwned] == 1)
{
format(string, sizeof(string), "%s\nProprietбrio: %s\nSуcio: %s\nTaxa:R$%d\nLevel: %d\nEntrada /entrar",BizzInfo[h][bMessage],BizzInfo[h][bOwner],BizzInfo[h][bExtortion],BizzInfo[h][bEntranceCost],BizzInfo[h][bLevelNeeded]);
}
else
{
format(string, sizeof(string), "%s\nPreзo: R$%d\nLevel: %d \nComprar /comprarempresa",BizzInfo[h][bMessage],BizzInfo[h][bBuyPrice],BizzInfo[h][bLevelNeeded]);
}
Create3DTextLabel(string, COLOR_WHITE, BizzInfo[h][bEntranceX], BizzInfo[h][bEntranceY], BizzInfo[h][bEntranceZ], 15,0);
return 1;
}
}

Reply
#2

Sim, basta remover o if citado por vocк .



Para fazer isso, remova a linha com o if e depois, suas duas chaves, que sгo: uma que abre { e outraque fecha } .



O cуdigo que vocк postou por exemplo, apуs feita essa modificaзгo, ficaria assim :



Код:
if(BizzInfo[h][bOwned] == 1)
{
format(string, sizeof(string), "%s\nProprietбrio: %s\nSуcio: %s\nTaxa:R$%d\nLevel: %d\nEntrada /entrar",BizzInfo[h][bMessage],BizzInfo[h][bOwner],BizzInfo[h][bExtortion],BizzInfo[h][bEntranceCost],BizzInfo[h][bLevelNeeded]);
}
else
{
format(string, sizeof(string), "%s\nPreзo: R$%d\nLevel: %d \nComprar /comprarempresa",BizzInfo[h][bMessage],BizzInfo[h][bBuyPrice],BizzInfo[h][bLevelNeeded]);
}
Create3DTextLabel(string, COLOR_WHITE, BizzInfo[h][bEntranceX], BizzInfo[h][bEntranceY], BizzInfo[h][bEntranceZ], 15,0);
return 1;
}

Da prуxima vez que for postar um cуdigo, recomendo que use [pawn] e [/pawn] Ao invйs de [code] e [/code], pois isso facilita a leitura do cуdigo, para todos .




Espero ter ajudado .
Reply
#3

pawn Код:
C:\Documents and Settings\Leonardo\Desktop\Arquivos Stetsom\Servidor\gamemodes\BSL.pwn(55405) : warning 217: loose indentation
C:\Documents and Settings\Leonardo\Desktop\Arquivos Stetsom\Servidor\gamemodes\BSL.pwn(55418) : warning 217: loose indentation
C:\Documents and Settings\Leonardo\Desktop\Arquivos Stetsom\Servidor\gamemodes\BSL.pwn(56296) : warning 209: function "CustomPickups" should return a value
C:\Documents and Settings\Leonardo\Desktop\Arquivos Stetsom\Servidor\gamemodes\BSL.pwn(56297) : error 010: invalid function or declaration
C:\Documents and Settings\Leonardo\Desktop\Arquivos Stetsom\Servidor\gamemodes\BSL.pwn(62525) : warning 203: symbol is never used: "GetPointDistanceToPointExMorph"
Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


1 Error.
O CODIGO

pawn Код:
for(new h = 0; h < sizeof(BizzInfo); h++)
                {
                    if(IsATruck(tmpcar) && PlayerToPoint(10.0, i, BizzInfo[h][bEntranceX], BizzInfo[h][bEntranceY], BizzInfo[h][bEntranceZ]))
                    {
                        format(string, sizeof(string), "~w~%s~n~~r~Produtos Requeridos~w~: %d~n~~y~Preœo por Produto: ~w~: R$ %d ~n~~g~Fundos: ~w~: R$ %d",BizzInfo[h][bMessage],(BizzInfo[h][bMaxProducts]-BizzInfo[h][bProducts]),BizzInfo[h][bPriceProd],BizzInfo[h][bTill]);
                        GameTextForPlayer(i, string, 5000, 3);
                        return 1;
                    }
if(BizzInfo[h][bOwned] == 1)
{
format(string, sizeof(string), "%s\nProprietбrio: %s\nSуcio: %s\nTaxa:R$%d\nLevel: %d\nEntrada /entrar",BizzInfo[h][bMessage],BizzInfo[h][bOwner],BizzInfo[h][bExtortion],BizzInfo[h][bEntranceCost],BizzInfo[h][bLevelNeeded]);
}
else
{
format(string, sizeof(string), "%s\nPreзo: R$%d\nLevel: %d \nComprar /comprarempresa",BizzInfo[h][bMessage],BizzInfo[h][bBuyPrice],BizzInfo[h][bLevelNeeded]);
}
Create3DTextLabel(string, COLOR_WHITE, BizzInfo[h][bEntranceX], BizzInfo[h][bEntranceY], BizzInfo[h][bEntranceZ], 15,0);
return 1;
}
                }
Reply
#4

Coloca no topo do GM
pawn Код:
#pragma tabsize 0
Vai tirar as Warnings de Loose indentation, Aperte Ctrl +F e procure por:
pawn Код:
new GetPointDistanceToPointExMorph
e apague, Vai tirar a Warning symbol is never used: "GetPointDistanceToPointExMorph", Poste a linha do erro .
Reply
#5

Tipo estou com outro problema que quando vocк compra a empresa aparece 2 label nela.. D:

Aqui estб o codigo inteiro, se vocкs puderem colocar a Label e tirar o point AGRADEЗO, sobre o outro problema de quando vocк compra a empresa vou postar os prints jб jб pra vocкs verificarem.. Atualmente com esse codigo estб mostrando o seguinte ERRO!




Quote:

55414 (ERRO EM: return 1: warning 217: loose indentation

pawn Код:
public CustomPickups()
{
    new Float:oldposx, Float:oldposy, Float:oldposz;
    new string[128];
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
        if(IsPlayerConnected(i))
        {
            GetPlayerPos(i, oldposx, oldposy, oldposz);
            new tmpcar = GetPlayerVehicleID(i);
            if(oldposx!=0.0 && oldposy!=0.0 && oldposz!=0.0)
            {
                for(new h = 0; h < sizeof(SBizzInfo); h++)
                {
                    if(IsATruck(tmpcar) && PlayerToPoint(10.0, i, SBizzInfo[h][sbEntranceX], SBizzInfo[h][sbEntranceY], SBizzInfo[h][sbEntranceZ]))
                    {
                        format(string, sizeof(string), "~w~%s~n~~r~Produtos Requeridos:~w~ %d~n~~w~Preзo por Produto: ~g~R$%d ~n~~w~Fundos: ~g~R$%d",SBizzInfo[h][sbMessage],(SBizzInfo[h][sbMaxProducts]-SBizzInfo[h][sbProducts]),SBizzInfo[h][sbPriceProd],SBizzInfo[h][sbTill]);
                        GameTextForPlayer(i, string, 5000, 3);
                        return 1;
                    }
                    if(PlayerToPoint(2.0, i, SBizzInfo[h][sbEntranceX], SBizzInfo[h][sbEntranceY], SBizzInfo[h][sbEntranceZ]))
                    {
                        if(SBizzInfo[h][sbOwned] == 1)
                        {
                            format(string, sizeof(string), "%s\nProprietбrio: %s\nSуcio: %s\nTaxa:R$%d\nLevel: %d\nEntrada /entrar",SBizzInfo[h][sbMessage],SBizzInfo[h][sbOwner],SBizzInfo[h][sbExtortion],SBizzInfo[h][sbEntranceCost],SBizzInfo[h][sbLevelNeeded]);
                        }
                        else
                        {
                        format(string, sizeof(string), "%s\nPreзo: R$%d\nLevel: %d \nComprar /comprarempresa",SBizzInfo[h][sbMessage],SBizzInfo[h][sbBuyPrice],SBizzInfo[h][sbLevelNeeded]);
                        }
                        Create3DTextLabel(string, COLOR_WHITE, SBizzInfo[h][sbEntranceX], SBizzInfo[h][sbEntranceY], SBizzInfo[h][sbEntranceZ], 15,0);
                        return 1;
                    }
                }
                for(new h = 0; h < sizeof(HouseInfo); h++)
                {
                    if(PlayerToPoint(2.0, i, HouseInfo[h][hEntrancex], HouseInfo[h][hEntrancey], HouseInfo[h][hEntrancez]))
                    {
                        if(HouseInfo[h][hOwned] == 1)
                        {
                            if(HouseInfo[h][hRentabil] == 0)
                            {
                                format(string, sizeof(string), "Proprietбrio da Casa: %s\nLevel : %d",HouseInfo[h][hOwner],HouseInfo[h][hLevel]);
                            }
                            else
                            {
                                format(string, sizeof(string), "Proprietбrio da Casa: %s\nAluguel: R$%d\nLevel: %d\nDigite /alugarquarto para alugar um quarto",HouseInfo[h][hOwner],HouseInfo[h][hRent],HouseInfo[h][hLevel]);
                            }
                            Create3DTextLabel(string, COLOR_WHITE,  HouseInfo[h][hEntrancex], HouseInfo[h][hEntrancey], HouseInfo[h][hEntrancez], 15,0);
                            return 1;
                        }
                        else
                        {
                            format(string, sizeof(string), "Descriзгo: %s\nPreзo: R$%d \nLevel : %d\nDigite /comprarcasa para comprar-la",HouseInfo[h][hDiscription],HouseInfo[h][hValue],HouseInfo[h][hLevel]);
                        }
                        Create3DTextLabel(string, COLOR_WHITE,  HouseInfo[h][hEntrancex], HouseInfo[h][hEntrancey], HouseInfo[h][hEntrancez], 15,0);
                        return 1;
                    }
                }
                for(new h = 0; h < sizeof(BizzInfo); h++)
                {
                    if(IsATruck(tmpcar) && PlayerToPoint(10.0, i, BizzInfo[h][bEntranceX], BizzInfo[h][bEntranceY], BizzInfo[h][bEntranceZ]))
                    {
                        format(string, sizeof(string), "~w~%s~n~~r~Produtos Requeridos~w~: %d~n~~y~Preњo por Produto: ~w~: R$ %d ~n~~g~Fundos: ~w~: R$ %d",BizzInfo[h][bMessage],(BizzInfo[h][bMaxProducts]-BizzInfo[h][bProducts]),BizzInfo[h][bPriceProd],BizzInfo[h][bTill]);
                        GameTextForPlayer(i, string, 5000, 3);
                        return 1;
                    }
                    if(BizzInfo[h][bOwned] == 1)
                    {
                    format(string, sizeof(string), "%s\nProprietбrio: %s\nSуcio: %s\nTaxa:R$%d\nLevel: %d\nEntrada /entrar",BizzInfo[h][bMessage],BizzInfo[h][bOwner],BizzInfo[h][bExtortion],BizzInfo[h][bEntranceCost],BizzInfo[h][bLevelNeeded]);
                    }
                    else
                    {
                    format(string, sizeof(string), "%s\nPreзo: R$%d\nLevel: %d \nComprar /comprarempresa",BizzInfo[h][bMessage],BizzInfo[h][bBuyPrice],BizzInfo[h][bLevelNeeded]);
                    }
                    Create3DTextLabel(string, COLOR_WHITE, BizzInfo[h][bEntranceX], BizzInfo[h][bEntranceY], BizzInfo[h][bEntranceZ], 15,0);
                        return 1;
                    }
                }
Bull sobre o seu codigo nгo arrumou.. A linha do ERRO nгo existe.. D:

Quote:

error 021: symbol already defined: "GetPointDistanceToPointExMorph"
warning 203: symbol is never used: "GetPointDistanceToPointExMorph"
1 Error.

Reply
#6

Ninguem??
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)