question
#6

Quote:
Originally Posted by Christian_Bojic
Посмотреть сообщение
but I again dont understand, I know where to set it, but I dont know how to set spawn place

pawn Код:
new Float:RandomSpawn[][4] =
{
    // add your own co-ords and facing angles here
    {-2796.9854, 1224.8180, 20.5429, 192.0335},
    {-2454.2170, 503.8759, 30.0790, 267.2932},
    {-2669.7322, -6.0874, 6.1328, 89.8853}
};
what is, first cordinates, what second, what third?

pawn Код:
new rand = random(sizeof(RandomSpawn));
    SetPlayerPos(playerid, RandomSpawn[rand][0], RandomSpawn[rand][1],RandomSpawn[rand][2]);
    SetPlayerFacingAngle(playerid, RandomSpawn[rand][3]);
    return 1;
what is RandomSpawn[rand][0] ? what 1 what 2 what 3?
Example:

pawn Код:
{-2796.9854, 1224.8180, 20.5429, 192.0335},
-2796.9854 = X
1224.8190 = Y
20.5429 = Z
192.0335 = Facing angle http://www.upload.ee/image/281985/as...asdasdcord.PNG



pawn Код:
RandomSpawn[rand][0]
is for this one:
pawn Код:
{-2796.9854, 1224.8180, 20.5429, 192.0335},
---------------------------------------------------------------------

pawn Код:
RandomSpawn[rand][1]
for this one:
pawn Код:
{-2454.2170, 503.8759, 30.0790, 267.2932},

----------------------------------------------------------------------

pawn Код:
RandomSpawn[rand][2]
is for this one:
pawn Код:
{-2669.7322, -6.0874, 6.1328, 89.8853}

--------------------------------------------------------------

if you add more spawns to this list:
pawn Код:
{-2796.9854, 1224.8180, 20.5429, 192.0335},
    {-2454.2170, 503.8759, 30.0790, 267.2932},
    {-2669.7322, -6.0874, 6.1328, 89.8853}
(example:
pawn Код:
{-2796.9854, 1224.8180, 20.5429, 192.0335},
    {-2454.2170, 503.8759, 30.0790, 267.2932},
{-3784.2170, 503.8759, 30.0790, 267.2932},
    {-2669.7322, -6.0874, 6.1328, 89.8853}
)

then also keep adding:
pawn Код:
RandomSpawn[rand][3]
pawn Код:
RandomSpawn[rand][4]
etc.

goodluck,

-J
Reply


Messages In This Thread
question - by Christian_Bojic - 24.06.2011, 18:29
Re: question - by Jantjuh - 24.06.2011, 18:31
Re: question - by Christian_Bojic - 24.06.2011, 18:32
Re: question - by Jantjuh - 24.06.2011, 18:34
Re: question - by Christian_Bojic - 24.06.2011, 18:38
Re: question - by Jantjuh - 24.06.2011, 18:44
Re: question - by Christian_Bojic - 24.06.2011, 18:46
Re: question - by Jantjuh - 24.06.2011, 18:50
Re: question - by Christian_Bojic - 24.06.2011, 18:52
Re: question - by Jantjuh - 24.06.2011, 19:53

Forum Jump:


Users browsing this thread: 1 Guest(s)