05.11.2013, 18:03
Hi,
I have this code:
And this code:
If I type / viptest appears "Is VIP", though there is a base save '1'. How to formulate enquiry MySQL?
I want use command if `Vip`='1'
Who help me?
I have this code:
Код:
stock SprawdzVIP(playerid) { new bufferSprawdzVIP[127], nick[24], bool: istnieje = false; GetPlayerName(playerid, nick, MAX_PLAYER_NAME); mysql_real_escape_string(nick, nick); format(bufferSprawdzVIP, 127, "SELECT 1 FROM `Gracze` WHERE `Vip`='1'", nick); if (mysql_query(bufferSprawdzVIP)) mysql_ping(); mysql_store_result(); if (mysql_num_rows()) istnieje=true; mysql_free_result(); return istnieje; }
Код:
CMD:viptest(playerid, params[]) { if (SprawdzVIP(playerid)) { SendClientMessage(playerid, 0xFF0000FF, "Is{990099}VIP"); } else { SendClientMessage(playerid, 0xFF0000FF, "Isn`t {990099}VIP"); } return true; }
I want use command if `Vip`='1'
Who help me?