30.06.2013, 14:53
Okay so i want to get it reading the value from the database and get it added by APlayerData[playerid][Ecoins]
This is the code:
This is the code:
pawn Код:
switch(response)
{
case 1:
{
new string3[128];
format(string3, sizeof(string3), "SELECT * FROM Donates WHERE serial = '%s'", inputtext);
mysql_query(string3);
mysql_store_result();
new value;
value = mysql_num_rows();
new row[200]; // The length of 1 'row' total.
new field[14][200]; // [4] = Amount of fields, [24] = Max length of the bigest field.
mysql_fetch_row_format(row, "|");
explode(row, field, "|");
mysql_free_result();
if(value == 1)
{
new Coins;
Coins = strval(field[2]);
APlayerData[playerid][ECoins] += Coins;
SavePlayer(playerid);
}
}
}