problem in loading data [MYSQL]
#1

Hi, i'm creating a vip system for my gm.
So i created the script, i set myself vip for testing.
when i try use /vcar after i restart the server it says you are not allowed to use this command.
the loading data code :
Код:
public OnPlayerConnect(playerid)
{
	new query[256],level[3],pname[MAX_PLAYER_NAME];
	GetPlayerName(playerid, pname, 24);
	format(query, sizeof(query), "SELECT viplevel FROM users WHERE username = '%s'", pname);
	mysql_query(query);
	mysql_store_result();
	new rows = mysql_num_rows();
	if(!rows)
	{
		SCM(playerid, BLUE, "Welcome, Your stats has been loaded");
	}
	if(rows == 1)
	{
		SCM(playerid, BLUE, "Welcome, Your VIP level and your stats has been loaded");
		mysql_fetch_field_row(level, "viplevel");
		VipInfo[playerid][VIP] = strval(level);
	}
	mysql_free_result();
	return 1;
}
I wanna load the vip level on the variable
Reply


Messages In This Thread
problem in loading data [MYSQL] - by HoussemGaming - 24.06.2017, 16:29
Re: problem in loading data [MYSQL] - by HoussemGaming - 24.06.2017, 17:59
Re: problem in loading data [MYSQL] - by AndreiWow - 24.06.2017, 23:12
Re: problem in loading data [MYSQL] - by GoldenLion - 25.06.2017, 00:09
Re: problem in loading data [MYSQL] - by HoussemGaming - 25.06.2017, 00:13
Re: problem in loading data [MYSQL] - by GoldenLion - 25.06.2017, 00:17
Re: problem in loading data [MYSQL] - by HoussemGaming - 25.06.2017, 00:21
Re: problem in loading data [MYSQL] - by GoldenLion - 25.06.2017, 00:43
Re: problem in loading data [MYSQL] - by HoussemGaming - 25.06.2017, 00:45

Forum Jump:


Users browsing this thread: 3 Guest(s)