23.07.2014, 21:20
(
Последний раз редактировалось Pxndx; 23.07.2014 в 22:02.
)
Estou comeзando a estudar MySQL para interagir com GM. Jб vi vбrios tutoriais muito parecidos mas nenhum supriu minha dъvida.
Jб fiz as primeiras etapas, as de definir:
Na segunda etapa, ao colocar as funзхes em OnGameModInit
Eu configuro tudo certinho: os host, user, pass, db e as linhas para conectar.
Compilo com sucesso:
Ao executar o samp-server.exe ele nгo carrega o GM:
Jб fiz as primeiras etapas, as de definir:
pawn Код:
#define mysql_host "127.0.0.1"
#define mysql_user "root"
#define mysql_password "******"
#define mysql_database "sa-mp"
pawn Код:
mysql_connect(mysql_host, mysql_user, mysql_database, mysql_password);
mysql_query("CREATE TABLE IF NOT EXISTS pinfo(user VARCHAR(24), password VARCHAR(40), score INT(20), dinheiro INT(20), IP VARCHAR(16) )");
Compilo com sucesso:
pawn Код:
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
pawn Код:
----------
Loaded log file: "server_log.txt".
----------
SA-MP Dedicated Server
----------------------
v0.3z, (C)2005-2014 SA-MP Team
[18:50:06] filterscripts = "" (string)
[18:50:06]
[18:50:06] Server Plugins
[18:50:06] --------------
[18:50:06] Loading plugin: mysql
[18:50:07]
> MySQL plugin R7 successfully loaded.
[18:50:07] Loaded.
[18:50:07] Loaded 1 plugins.
[18:50:07]
[18:50:07] Filterscripts
[18:50:07] ---------------
[18:50:07] Loaded 0 filterscripts.