MySQL issues.
#6

This is how it works for me
pawn Код:
// somewhere at the top of your script
#define mysql_fetch_row(%1) mysql_fetch_row_format(%1,"|")

if(mysql_num_rows () != 0)
{
    new line[300];
    if(mysql_fetch_row(line)) //Fetches the line
    {
           new data[13];//The data strings
           new data2[21]; //The data variables
           sscanf(line, "p<|>ds[24]s[60]ddddddddddddddddddd",data2[1], data[1],data[2],data2[2],data2[3],data2[4],data2[5],data2[6],data2[7],data2[8],data2[9],data2[10],data2[11],data2[12],data2[13],data2[14],data2[15],data2[16],data2[17],data2[18],data2[19],data2[20]); //Splits the line with sscanf
           SetPlayerScore(playerid, data2[3]); //Sets players score
           GivePlayerMoney(playerid,data2[2]); // Gives player money
           PlayerInfo[playerid][AdminLevel] = data2[4]; //Sets players admin level
    }
               
}
Reply


Messages In This Thread
MySQL issues. - by yanir3 - 16.06.2011, 17:27
AW: MySQL issues. - by xerox8521 - 16.06.2011, 18:16
Re: MySQL issues. - by yanir3 - 16.06.2011, 18:29
AW: Re: MySQL issues. - by xerox8521 - 16.06.2011, 18:33
Re: MySQL issues. - by yanir3 - 16.06.2011, 18:50
AW: MySQL issues. - by xerox8521 - 16.06.2011, 18:58
Re: MySQL issues. - by yanir3 - 17.06.2011, 11:07
Re: MySQL issues. - by yanir3 - 19.06.2011, 04:46
Re: MySQL issues. - by Calgon - 19.06.2011, 04:49

Forum Jump:


Users browsing this thread: 1 Guest(s)