01.09.2009, 15:18
Hey,
Here is my code for random teleports.
This is placed outside of a callback, ofcourse.
And this is the code placed OnPlayerSpawn.
Now whenever someone spawns, he sees Blueberry for quick time, like 0.3 seconds, then he spawns at the random place. How to fix it ? What's wrong in my code.
Here is my code for random teleports.
pawn Код:
new Float:RandomSpawns[8][] =
{
{2605.8538,1692.6309,10.9766,89.5908},
{2518.4373,2155.6116,10.8125,105.7287},
{2031.8082,1919.0184,12.3359,266.4507},
{2024.7225,1545.3295,10.8188,267.9994},
{1958.4229,1342.8798,15.3746,269.7039},
{2090.7458,1163.3665,11.6552,55.1922},
{2800.9646,1326.1124,10.8984,267.8501},
{2119.4382,2218.6707,10.8203,181.3983}
};
And this is the code placed OnPlayerSpawn.
pawn Код:
new randomspawn;
randomspawn = random(sizeof(RandomSpawns));
SetPlayerPos(playerid,RandomSpawns[randomspawn][0],RandomSpawns[randomspawn][1],RandomSpawns[randomspawn][2]);