help /spec
#1

I have done what is the admin /spec if the player in the car, it will show the speed of the subject vehicle, but she did achieve its speed continuous updates that it just shows the speed at which he /spec alone . Need help everyone sorry for my bad english

Reply
#2

That'd be better if you show the speed in a textdraw instead of gametext.
And you need to add some codes inside OnPlayerUpdate callback or a timer to check if is player being spectated by admin, then update the speed textdraw/gametext.
Example:
Код:
public timerfunctionhere(playerid)
{
	new vid;
	if((vid = GetPlayerVehicleID(playerid)))
	{
		foreach(new i : Player)
		{
			if(Spectating[i] && Spectate[i] == playerid)
			{
				// Update speed textdraw/gametext here...
			}
		}
	}
}
Remember, that's just an example, you can use OnPlayerUpdate callback for that, but i would suggest you to use a timer instead of OnPlayerUpdate.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)