If Vip = 1
#1

Hi,
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;
}
And this code:

Код:
CMD:viptest(playerid, params[])
{
    if (SprawdzVIP(playerid))
	{
	SendClientMessage(playerid, 0xFF0000FF, "Is{990099}VIP");
	} else {
	SendClientMessage(playerid, 0xFF0000FF, "Isn`t {990099}VIP");
	}
	return true;
}
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?
Reply


Messages In This Thread
If Vip = 1 - by Kerth - 05.11.2013, 18:03
Re: If Vip = 1 - by Riddick94 - 05.11.2013, 18:49
Re: If Vip = 1 - by Kerth - 05.11.2013, 19:22
Re: If Vip = 1 - by Jefff - 05.11.2013, 19:28
Re: If Vip = 1 - by -Prodigy- - 05.11.2013, 19:40
Re: If Vip = 1 - by Kerth - 06.11.2013, 16:58

Forum Jump:


Users browsing this thread: 1 Guest(s)