SA-MP Forums Archive
[PEDIDO] Comando - 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: [PEDIDO] Comando (/showthread.php?tid=260638)



[PEDIDO] Comando - lincon c - 10.06.2011

Eai Galera do Forum...

Estou quebrando a cabeзa aqui nao consigo fazer um comando /liberarnick e /mudarnick
eu tentei fazer aqui mais failll libero o nick certinho o jogador muda tambem certinho
mais quando olho na pasta contas de vez muda o nick da conta tipo cria outra conta
sera que tem como colocar so para mudar o nome da conta e continuar com a msm conta com seus pertences
alquem faz ideia como posso fazer esse comando alguem tem um exemplo post ai pf

Vlw....


Re: [PEDIDO] Comando - [S]trong - 10.06.2011

mais informaзхes seria bom, como por exemplo sistema de salvamento and stuffs.


Re: [PEDIDO] Comando - lincon c - 10.06.2011

and stuffs = ?

Desculpe sou novato e nao fasso ideia doq seja isso >>> and stuffs <<<

Vlw pela atencao [S]trong =D


Re: [PEDIDO] Comando - lincon c - 10.06.2011

alguem mais galera so preciso de um exemplo do comando /mudarnick


Re: [PEDIDO] Comando - Ricop522 - 10.06.2011

PHP код:

if (strcmp("/permitirnome", cmdtext, true) == 0)
{
   
#define SCM SendClientMessage
   
if!IsPlayerAdmin(playerid)) return SCM(playerid, -1, "Vocк nгo й adm rcon");
   
tmp = strtok(cmdtext, idx);
   if(!
strlen(tmp)) return SCM(playerid, -1, "Use /permitirnome ID");
   new 
id = ReturnUser(tmp);
   if(!
IsPlayerConnected(id)) return SCM(playerid, -1, "ID offline.");
   
SetPVarInt(id, "Nome", 1);
   return 
1;
}
if (
strcmp("/nome", cmdtext, true) == 0)
{
    if(
GetPVarInt(playerid, "Nome") == 0) return SendClientMessage(playerid, -1, "Vocк nгo pode trocar o nome.");
    
ShowPlayerDialog(playerid,1,DIALOG_STYLE_INPUT,"nome","Digite o seu nome","Ok","Sair");
    return 
1;
}
if(
dialogid == 1)
{
    if(!
response) return 1;
    if(!
strlen(inputtext)) return SendClientMessage(playerid, -1, "Digite algo");
    new 
string[0x3C], nome[MAX_PLAYER_NAME], nome2[MAX_PLAYER_NAME], string2[0x3C];
    
GetPlayerName(playerid, nome, sizeof(nome));
    
format(string, sizeof(string), "Contas/%s", nome);
    if(
dini_Exists(string)) dini_Remove(string);
    
SetPlayerName(playerid,strlen(inputtext));
    
GetPlayerName(playerid, nome2, sizeof(nome2));
    
format(string2, sizeof(string2), "Contas/%s", nome2);
    
dini_Create(string2);
    return 
0x01;
} 
Testa ae.

Otro

PHP код:

zcmd
(changename, playerid, params[])
{
    new 
player,name[MAX_PLAYER_NAME],name2[MAX_PLAYER_NAME];
    if (!
sscanf(params, "us", player, name))
    {
        if(
player != INVALID_PLAYER_ID)
        {
            if(
IsPlayerAdmin(playerid))
            {
                new 
string[0x3C];
                
GetPlayerName(playerid, name2, sizeof(name2));
                
format(string, sizeof(string), "Contas/%s.ini", name2);
                
frename(name2,name);
                
SetPlayerName(player,name);
                
fremove(string);
                
format(string, sizeof(string), "Nome mudado para %s.", name);
                
SendClientMessage(player, yellow, string);
            }
            else return 
SendClientMessage(playerid, -1, "ERROR: Vocк nгo й adm rcon.");
        }
        else return 
SendClientMessage(playerid, -1, "ERROR: Jogador inexistente.");
    }
    else return 
SendClientMessage(playerid, -1, "/mudarnome ID NOVONOME]");
    return 
1;
} 



Re: [PEDIDO] Comando - lincon c - 10.06.2011

Obrigado vo testar aqui vlw...