• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Pawn] Sending message to all owner of key (from SQL)
#2
Code:
mysql_format(sqldata, pQuery, sizeof pQuery, "SELECT holdername, doorkey FROM `bizkeys` WHERE bizid = %d;", bizid);
new Cache:result = mysql_query(sqldata, pQuery);
new rows = cache_num_rows();
if (rows) {
? ? new name[24];
? ? for (new i; i < rows; i) {
? ? ? ? cache_get_value_name(i, "holdername", name);
? ? ? ? foreach(new p : Player) if (!strcmp(GetName(p), name, true)) {
? ? ? ? ? ? SendClientMessage(p, ...);
? ? ? ? ? ? break;
? ? ? ? }
? ? }
    cache_delete(result);
}
You have to save the player name in the holdername field.
  Reply


Messages In This Thread
RE: Sending message to all owner of key (from SQL) - by Radical - 2021-04-17, 09:46 AM

Forum Jump: