OnPlayerLogin (SQL) [SOLVED]
#1

I have changed the plugin of the gm of the server of im the scripter, but, i can login into the server, but the information of every player in the sql don't not set..

This is the code, any idea?
They are more rcnt, but all they are NULL. When the players login

Quote:

new Data[2048];
new Field[64];
//new rcnt = 1;
new pName2[MAX_PLAYER_NAME];
//print("Iniciando COnexion a la db");
GetPlayerName(playerid,pName2,sizeof(pName2));
samp_mysql_real_escape_string(pName2,pName2);
format(query,sizeof(query),"SELECT * FROM `jugadores` WHERE Name = '%s'",pName2);
samp_mysql_query(query);
samp_mysql_store_result();
//samp_mysql_free_result();
print("Iniciando COnexion a la db");
samp_mysql_strtok(Field, "|", Data);
//while (samp_mysql_strtok(Field, "|", "")==1)
for(new rcnt = 1; rcnt < 168; rcnt++)
{
if (rcnt == 3)
{
PlayerInfo[playerid][pLevel] = strval(Field);
printf("%s", Field);
}
if (rcnt == 4) PlayerInfo[playerid][pAdmin] = strval(Field);
if (rcnt == 5) PlayerInfo[playerid][pDonateRank] = strval(Field);

Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)