Skip to content
This repository has been archived by the owner on Feb 19, 2020. It is now read-only.

GetPlayerResolution

GtakillerIV edited this page Nov 16, 2014 · 3 revisions

GetPlayerResolution

Retrieves the player's game resolution


Parameters

playerid

The player's id.

X

A variable that'll hold the amount of horizontal pixels(width).

Y

A variable that'll hold the amount of vertical pixels(height).

Returns

    1 on all occasions

Usage

CMD:getresolution(playerid, params[])
{
	//If the player has the SA-MP+ plugin installed
	if(IsUsingSAMPP(playerid))
	{
		new string[128];

		new X, Y;

		GetPlayerResolution(playerid, X, Y);

		format(string, sizeof(string), "Your resolution is: %d x %d", X, Y);

		SendClientMessage(playerid, -1, string);
	}
	else
	{
		SendClientMessage(playerid, -1, "You need the SA-MP+ plugin");
	}

	return 1;
}

See also

Callbacks

OnPlayerResolutionChange

Clone this wiki locally