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

SetPlayerGameSpeed

GtakillerIV edited this page Dec 17, 2014 · 2 revisions

SetPlayerGameSpeed

Sets a player's game speed

tipDefault value is 1.00


Parameters

playerid

The player's id.

float:speed

The speed of the game.

Returns

    0 if the player is not connected

Usage

CMD:setgamespeed(playerid, params[])
{
	//If the player has the SA-MP+ plugin installed
	if(IsUsingSAMPP(playerid))
	{
		new Float:speed;
		
		if(sscanf(params, "f", speed)) return SendClientMessage(playerid, -1, "Correct usage: /setgamespeed speed");

		SetPlayerGameSpeed(playerid, speed);
	}
	//If not
	else
	{
		SendClientMessage(playerid, -1, "You need the SA-MP+ plugin");
	}

	return 1;
}

See Also

SetPlayerBlurIntensity

SetPlayerPedAnims

SetRadioStationForPlayer

Clone this wiki locally