SA-MP Forums Archive
[Ajuda] Mudanзa de Nick - 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] Mudanзa de Nick (/showthread.php?tid=386179)



Mudanзa de Nick - Lord_Style - 19.10.2012

Desenvolvi um sistema de mudanзa de nick, mas ele nгo renomeia o arquivo .ini que esta salvando no banco de dados. O local que й salvo й : Contas/%s.ini
Sistema de Salvamento: SII.
Cуdigo:

pawn Код:
if(dialogid == 4)
{
        if(!response)
        {
        }
        else
        {
              SetPlayerName(playerid, inputtext);
              SendClientMessage(playerid,0xFFFF00FF,"Nick mudado com sucesso!");
        }
}



Re: Mudanзa de Nick - AmericanStyle'™ - 19.10.2012

Quote:
Originally Posted by Lord_Style
Посмотреть сообщение
Desenvolvi um sistema de mudanзa de nick, mas ele nгo renomeia o arquivo .ini que esta salvando no banco de dados. O local que й salvo й : Contas/%s.ini
Sistema de Salvamento: SII.
Cуdigo:

pawn Код:
if(dialogid == 4)
{
        if(!response)
        {
        }
        else
        {
              SetPlayerName(playerid, inputtext);
              SendClientMessage(playerid,0xFFFF00FF,"Nick mudado com sucesso!");
        }
}
Vocк sу ta setando o Nome й nгo ta gravando.
Basta colocar sua funзгo de salvar. "stock ou public (Callback)".
Abraзos.


Re: Mudanзa de Nick - Lord_Style - 19.10.2012

Nгo entendi!


Re: Mudanзa de Nick - AmericanStyle'™ - 19.10.2012

Quote:
Originally Posted by Lord_Style
Посмотреть сообщение
Nгo entendi!
Bom caso seu GM tiver salvamento claro que ele vai te que ter uma Callback ou stock de salvamento.
use-a para gravar seu arquivo editado.
Coloque-a depois do SendClientMessage ou antes do SendClientMessage
Abraзos.


Re: Mudanзa de Nick - rogerioexper - 19.10.2012

nao sei se й isso mais ve ai

PHP код:
    if(strcmp(cmd"/mudarnome"true) == 0)
    {
        
GetPlayerName(playeridsendernamesizeof(sendername));
        new 
tmpp[256];
        
tmpp strtok(cmdtextidx);
        if(!
strlen(tmpp))
        {
            
SendClientMessage(playeridCOLOR_DBLUE"USE: /mudarnome [playerid] [novo nick]");
            return 
1;
        }
        
giveplayerid strval(tmpp);
        
tmp strtok(cmdtextidx);
        
GetPlayerName(giveplayeridgiveplayersizeof(giveplayer));
        
GetPlayerName(playeridsendernamesizeof(sendername));
        if(
IsPlayerConnected(playerid))
        {
            new 
nome[24];
            
GetPlayerName(playeridnomesizeof nome);
            if(
PlayerInfo[playerid][pAdmin] >= 4000 || strfind(nomeADMPLAYERtrue) == || strfind(nomeADMPLAYER2true) == 0)
            {
                if(
IsPlayerConnected(giveplayerid))
                {
                    
SetPlayerName(giveplayeridtmp);
                    
format(stringsizeof(string), "[ADMIN]: %s(%i) mudou seu nome para %s"sendernameplayeridtmp);
                    
SendClientMessage(giveplayeridCOLOR_DBLUEstring);
                    
format(stringsizeof(string), "[ADMIN]: Vocк mudou o nome do ID %i para %s"giveplayeridtmp);
                    
SendClientMessage(playeridCOLOR_DBLUEstring);
                    
format(string256"AdmWarning: %s mudou o nome de %s's para %s."sendername,giveplayertmp);
                    
ABroadCast(COLOR_YELLOW,string,1);
                }
                else
                {
                    
format(stringsizeof(string), "%d nгo й um player ativo."giveplayerid);
                    
SendClientMessage(playeridCOLOR_REDstring);
                }
            }
            else
            {
                
SendClientMessage(playeridCOLOR_RED"Vocк nгo esta autorizado a usar este comando!");
            }
        }
        else
        {
            
SendClientMessage(playeridCOLOR_RED"Vocк precisa estar logado para usar este comando!");
        }
          return 
1;
    }