Random spawns help - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Random spawns help (
/showthread.php?tid=56781)
Random spawns help -
s0me0ne - 01.12.2008
i need help for this...when the player type /teleport the player to teleport to random places...
Re : Random spawns help -
rbcrp - 15.02.2012
alright, This my friend is fairly simple. If you want to create a random spawning system. You will need a new.
Код:
new pteleports[0][4] = {
{x1, y1, z1},
{X2, y2, z2},
{X3, y3, z3}
}; (AND SO ON) depending on how many coordinates you want.
if you are using zcmd you can do the command below.
to download the zcmd include for pawno please visit this link:
http://solidfiles.com/d/d20f/
Код:
command(teleport, playerid, params[])
{
new teleports = random(sizeof(pteleports));
SetPlayerPos(playerid, teleports[rand][0], teleports[rand][1], teleports[rand][3]);
return 1;
}
for more information on how to make randoms, please visit this link:
https://sampwiki.blast.hk/wiki/Random
ALSO: please rep+ IF i helped you. If not dont mind it. Thank you.