09.05.2013, 17:51
Actually, what you could do is make it an INSERT query when someone executes the command. Obviously, you'll pass the playerid parameter to the thread function and then you can use mysql_affected_rows() to determine if it was able to add one or not. Example:
pawn Код:
CMD:somequery(playerid, params[])
{
mysql_function_query(1, "INSERT INTO `values` (`1`, `2`) VALUES(93, 92)", false, "SomeFunction", "d", playerid);
return 1;
}
public SomeFunction(playerid)
{
if(playerid != INVALID_PLAYER_ID)
{
if(mysql_affected_rows() > 0)
{
// it worked
}
else
{
// it failed
}
}
return 1;
}

