Random coordinates around a positions
#9

Код:
new Float:X, Float:Y, Float:Z;
new objectid = CreateTimedObject(RandomEx(60000, 80000), 1264, DumpsterData[dumpsterid][dumpsterX], DumpsterData[dumpsterid][dumpsterY], (DumpsterData[dumpsterid][dumpsterZ] + 1.20), 0.0, 0.0, random(360));

switch(DumpsterData[dumpsterid][dumpsterSide])
{
	case true: // Left
	{
		GetPointInFront2D(DumpsterData[dumpsterid][dumpsterActionX], DumpsterData[dumpsterid][dumpsterActionY], ((DumpsterData[dumpsterid][dumpsterR] + (RandomFloat(40.0, 50.0))) + 180.0), RandomFloat(1.75, 2.90), X, Y);
	}
	case false: // Right
	{
		GetPointInFront2D(DumpsterData[dumpsterid][dumpsterActionX], DumpsterData[dumpsterid][dumpsterActionY], ((DumpsterData[dumpsterid][dumpsterR] + (RandomFloat(-40.0, -50.0))) + 180.0), RandomFloat(1.75, 2.90), X, Y);
	}
}

GetPlayerPos(playerid, Z, Z, Z);					
MoveDynamicObject(objectid, X, Y , (Z - 0.50), 9.0);
I want to make it to drop around the player OR drop before / next / behind the player but the object do not hit the player
Reply


Messages In This Thread
Random coordinates around a positions - by m4karow - 11.08.2018, 19:50
Re: Random coordinates around a positions - by ItsRobinson - 11.08.2018, 20:29
Re: Random coordinates around a positions - by Freaksken - 11.08.2018, 22:00
Re: Random coordinates around a positions - by ItsRobinson - 11.08.2018, 22:01
Re: Random coordinates around a positions - by Freaksken - 11.08.2018, 22:07
Re: Random coordinates around a positions - by m4karow - 12.08.2018, 08:36
Re: Random coordinates around a positions - by m4karow - 18.08.2018, 13:27
Re: Random coordinates around a positions - by Shinja - 18.08.2018, 15:17
Re: Random coordinates around a positions - by m4karow - 18.08.2018, 15:23
Re: Random coordinates around a positions - by Freaksken - 18.08.2018, 15:43

Forum Jump:


Users browsing this thread: 6 Guest(s)