[help] - random teleports.
#2

Quote:
Originally Posted by PANNA
alright,

can someone please tell me how i can make from these teleport coordinates random teleports, so when u type, /war, you teleport to 1 random one of these.

Код:
354.2154,2030.3007,23.8673
268.8435,2022.3782,17.6406
268.1262,1988.9603,17.6406
267.6958,1956.3184,17.6406
223.7248,1931.2437,17.6406
171.6965,1834.9309,17.6406
153.6859,1845.1970,17.6406
141.6754,1875.6266,17.8434
155.0106,1903.1884,18.7108
You need to make an array:

pawn Код:
new Float:TP[8][3] = {
{354.2154,2030.3007,23.8673},
{268.8435,2022.3782,17.6406},
{268.1262,1988.9603,17.6406},
{267.6958,1956.3184,17.6406},
{223.7248,1931.2437,17.6406},
{171.6965,1834.9309,17.6406},
{153.6859,1845.1970,17.6406},
{141.6754,1875.6266,17.8434},
{155.0106,1903.1884,18.7108},
};
Than decide what Tp you should get:

pawn Код:
new rand = random(sizeof(TP));

SetPlayerPos(playerid, TP[rand][0], TP[rand][1], TP[rand][2]);
This is just handwritten you might need to correct some of it but its practically what you need
Reply


Messages In This Thread
[help] - random teleports. - by PANNA - 19.10.2009, 12:40
Re: [help] - random teleports. - by Think - 19.10.2009, 13:02
Re: [help] - random teleports. - by Peter_Corneile - 19.10.2009, 13:02
Re: [help] - random teleports. - by PANNA - 19.10.2009, 13:18
Re: [help] - random teleports. - by Think - 19.10.2009, 13:27
Re: [help] - random teleports. - by PANNA - 19.10.2009, 13:50
Re: [help] - random teleports. - by Jefff - 19.10.2009, 13:56
Re: [help] - random teleports. - by PANNA - 19.10.2009, 15:45
Re: [help] - random teleports. - by Peter_Corneile - 19.10.2009, 15:51
Re: [help] - random teleports. - by Think - 19.10.2009, 16:08

Forum Jump:


Users browsing this thread: 1 Guest(s)