SA-MP Forums Archive
[Ajuda] String no DOF2 - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: Non-English (https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Português/Portuguese (https://sampforum.blast.hk/forumdisplay.php?fid=34)
+---- Thread: [Ajuda] String no DOF2 (/showthread.php?tid=587994)



String no DOF2 - .Skool_. - 04.09.2015

Olб, estou tendo dificuldades com este cуdigo que estou tentando criar ! Como sou iniciante com DOF2, sempre que "trago" uma informaзгo de um arquivo, ele simplesmente nгo reconhece, ou seja, nгo pega nada, como neste cуdigo abaixo, ele nгo pega a informaзгo do Arquivo. E quando ligo o servidor, aparece:

PHP код:
hostname "SA-MP 0.3 Server"  (string) 
Jб nгo sei mais qual o problema ! Cуdigo:

pawn Код:
public NomeRand()
{
    if(sNome == 1) //verifica se o comando estб ativado
    {
    if (DOF2_FileExists(Arquivo))
    {

               psNome = DOF2_GetInt(Arquivo, "Nome1");

               format(string,sizeof(string),"hostname %s",psNome);
               SendRconCommand(string);
        }
    }
    return 1;
}
Arquivo de dentro, onde ele deveria pegar:

PHP код:
Nome1 teste 



Re: String no DOF2 - PT - 04.09.2015

PHP код:
public NomeRand()
{
    if(
sNome == 1//verifica se o comando estб ativado
    
{
        if(
DOF2_FileExists(Arquivo))
        {
            
format(string,sizeof(string),"hostname %s"DOF2_GetString(Arquivo"Nome1"));
            
SendRconCommand(string);
        }
    }
    return 
1;




Re: String no DOF2 - matheusspohr - 04.09.2015

Formatou o local do Arquivo?
PHP код:
new Arquivo[128];
format(Arquivo128"Local/AkeleNegocio/Arquivo.ini"); 



Re: String no DOF2 - .Skool_. - 04.09.2015

Quote:
Originally Posted by PT
Посмотреть сообщение
PHP код:
public NomeRand()
{
    if(
sNome == 1//verifica se o comando estб ativado
    
{
        if(
DOF2_FileExists(Arquivo))
        {
            
format(string,sizeof(string),"hostname %s"DOF2_GetString(Arquivo"Nome1"));
            
SendRconCommand(string);
        }
    }
    return 
1;

Obrigado !