random cp's?
#4

Quote:
Originally Posted by Gh0sT_
Посмотреть сообщение
im tryied to create random checkpoints, but im getting error. :/


when player enter the car.
I dont know if this is the main error but instead of new Float:RandomCP[][] = it should be

pawn Код:
new Float:RandomCP[4][3] =
{
{1075.9678,2385.3535,11.1081,357.8982},
{1094.9563,2357.5154,10.8203,358.8381},
{1067.7051,2365.5979,17.3643,268.5973},
{1110.4586,2356.1936,10.8203,58.9753}
};
4 -> Rows
3 -> "column"(in this script they are 3 coordinates: X,Y,Z)

And then this code:
pawn Код:
new Random1 = random(sizeof(RandomCP));
SetPlayerCheckpoint(playerid, RandomCP[Random1][0], RandomCP[Random1][1],RandomCP[Random1][2],10);
Tell me if it works :P
Reply


Messages In This Thread
random cp's? - by Gh0sT_ - 26.10.2010, 11:04
Re: random cp's? - by 0ne - 26.10.2010, 11:34
Re: random cp's? - by Gh0sT_ - 26.10.2010, 12:26
Re: random cp's? - by BMGP - 26.10.2010, 12:34
Re: random cp's? - by MadeMan - 26.10.2010, 12:39
Re: random cp's? - by Gh0sT_ - 26.10.2010, 15:15
Re: random cp's? - by legodude - 26.10.2010, 15:23
Re: random cp's? - by Gh0sT_ - 26.10.2010, 15:30
Re: random cp's? - by Gh0sT_ - 26.10.2010, 17:22
Re: random cp's? - by MadeMan - 26.10.2010, 17:59

Forum Jump:


Users browsing this thread: 3 Guest(s)