[Pedido] Sistema de login em DINI
#1

Queria que alguйm fizesse em dini.. Nгo sei como fazer de jeito nenhum, queria salvasse a conta com a senha, dinheiro, level, skin sу isso mesmo..
Se alguem puder mandar um tutorial eu msm estudo e faзo.
Nunca aprendi fazer sistema de login mt dificil
Reply
#2

Apesar de usar dini em 2017 nгo recomendado por existir o DOF2 como concorrente melhor.

Aqui vai o tuto: https://sampforum.blast.hk/showthread.php?tid=180237
Reply
#3

Quote:
Originally Posted by Eddye
Посмотреть сообщение
Apesar de usar dini em 2017 nгo recomendado por existe o DOF2 como concorrente melhor.

Aqui vai o tuto: https://sampforum.blast.hk/showthread.php?tid=180237
me passa ali o do DOF2 mais um tuto bem explicado. rs
Reply
#4

Desvendando Dof2
Reply
#5

Li todo o tutorial do Desvendando o DOF2 Delk.
Agora como que faiz pra salvar tipo grana e pб?? Eu sei que й com o DOF2_GetInt(file[],key[],tag[]="")
Minha GM:

// Includes
#include <a_samp>
#include "../include/gl_common.inc"
#include <DOF2>

main()
{
printf("Servidor de teste Ligado");
}
/* Variaveis */

public OnPlayerConnect(playerid)
{
new str[128], name[32];
GetPlayerName(playerid, name, sizeof(name));
format(str, sizeof(str),"%s.ini", name);
DOF2_CreateFile(str);

// Verificaзгo se o arquivo jб existe
new string[128], Nome[32];
GetPlayerName(playerid, Nome, sizeof(Nome));
format(string, sizeof(string), "%s.ini", Nome);
if(!DOF2_FileExists(string)) DOF2_CreateFile(string);
return 1;
}
public OnPlayerDisconnect(playerid)
{
new Salvar[128], NomeSalvar[128];
GetPlayerName(playerid, NomeSalvar, sizeof(NomeSalvar));
format(Salvar, sizeof(Salvar), "%s.ini", NomeSalvar);
DOF2_CreateFile(Salvar);
DOF2_SaveFile();
SalvarPlayer(playerid);
return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
new cmd[128], idx;
if(strcmp(cmd, "/comeзo", true) ==0)
{
new Passado[128], Futuro[128];
format(Passado, sizeof(Passado), "%s.ini");
format(Futuro, sizeof(Futuro), "%s.ini");
DOF2_CreateFile(Passado);
DOF2_RenameFile(Passado, Futuro);
return 1;
}
if(strcmp(cmd, "/removerfile", true) ==0)
{
new Remover[128];
format(Remover, sizeof(Remover), "Contas/%s.ini");
DOF2_RemoveFile(Remover);
return 1;
}
return 0;
}
public OnGameModeInit()
{
return 1;
}
public OnGameModeExit()
{
DOF2_Exit();
return 1;
}

public OnPlayerText(playerid, text[])
{
new String[256], Nome[MAX_PLAYER_NAME];
GetPlayerName(playerid, Nome, sizeof(Nome));
format(String, sizeof(String), "» %s[%d] digitou: %s", Nome, playerid, text);
SendClientMessageToAll(-1, String);
return 1;
}

stock GerarNome(playerid)
{
new CriarNome[MAX_PLAYER_NAME];
GetPlayerName(playerid, CriarNome, sizeof(CriarNome));
return 0;
}
stock SalvarPlayer(playerid)
{
return 1;
}
Reply
#6

Para salvar grana use: DOF2_SetInt
Reply
#7

Olha meu amigo, em 2017 nгo й mais recomendado usar Dini, existe outras includes melhores e mais rбpidas, por exemplo DOF2, INI, Mysql e etc, mais caso deseja Dini assim mesmo, aqui estб um tutorial de como usa-la https://sampforum.blast.hk/showthread.php?tid=180237
Reply
#8

http://forum.sa-mp.com/showpost.php?...84&postcount=2
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)