SQLite
#4

ohh thanks, i will test it, before test help me for solved this

Код:
COMMAND:clabel(playerid, params[])
{
	if(IsPlayerAdmin(playerid))
	{
		new
			query[400],
			Float:x,
			Float:y,
			Float:z,
			text
		;

		GetPlayerPos(playerid, x, y, z);

		if(sscanf(params, "s[30]", text))
		{
			SendClientMessage(playerid, 0xFFFFFFFF, "{B7B7B7}[SERVER] {FFFFFF}Usage: \"clabel <Text>\"");
		}
		else
		{
			format(query, sizeof(query), "INSERT INTO `Label` (Label_Text, Label_X, Label_Y, Label_Z) VALUES ('%s', '%f', '%f', '%f')", text, x, y, z);
			db_query(DB: LabelDB, query);
			
			reloadLabels();
		}
	}
	else
	{
		SendClientMessage(playerid, 0xFFFFFFFF, "{B7B7B7}[SERVER] {FFFFFF}You do not have permission to use that command.");
	}

	return 1;
}
why all of coordinates (x,y,z) always set to 0.0000
Reply


Messages In This Thread
SQLite - by SilverStand - 24.01.2016, 10:08
Re: SQLite - by valych - 24.01.2016, 10:39
Re: SQLite - by Nero_3D - 24.01.2016, 10:50
Re: SQLite - by SilverStand - 24.01.2016, 10:55
Re: SQLite - by SilverStand - 24.01.2016, 11:18
Re: SQLite - by Nero_3D - 24.01.2016, 11:45
Re: SQLite - by SilverStand - 24.01.2016, 12:28

Forum Jump:


Users browsing this thread: 1 Guest(s)