Team DM making - 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: Team DM making (
/showthread.php?tid=85730)
Team DM making -
Dominiks - 09.07.2009
I read the wiki tutorial, but I didn't understand anything, so I came up with my own idea, but I need help.
How can I make a random teleport like player types /dmzone and he's teleported to one of 1-10 coordinates?
Re: Team DM making -
Anarkien - 09.07.2009
Quote:
Originally Posted by Dominiks
I read the wiki tutorial, but I didn't understand anything, so I came up with my own idea, but I need help.
How can I make a random teleport like player types /dmzone and he's teleported to one of 1-10 coordinates?
|
If you didn't understand anything of the Team DM tutorial, how do you think you can understand something more advanced, like a random teleporter?
Dunno if it's actually more advanced than the simple team DM tutorial on the wiki, but I assume you should try to learn what every line means, not just copy-paste.
Re: Team DM making -
-Sneaky- - 09.07.2009
pawn Code:
// Somewhere on top:
new Float:RandomSpawns[][4] =
{
{1149.4291,-1429.8828,15.3614,52.2603},
{1026.6274,-1433.8682,13.1203,91.8695},
{962.1809,-1423.8031,13.1172,357.8417},
{849.1421,-1550.4485,13.0394,86.1815},
{785.0523,-1801.6473,12.5928,357.9707},
{847.9305,-2001.2405,12.4358,3.8983},
{1081.6740,-1810.1718,13.1895,358.8075},
{1055.8663,-1609.9991,13.1982,93.5496},
};
Change the coordinates to your own!
And then when they type /dmzone for example, you can do this:
pawn Code:
new RandSpawn;
RandSpawn = random(sizeof(RandomSpawns));
SetPlayerPos(playerid, RandomSpawns[RandSpawn][0], RandomSpawns[RandSpawn][1], RandomSpawns[RandSpawn][2]);
SetPlayerFacingAngle(playerid, RandomSpawns[RandSpawn][3]);
Re: Team DM making -
Lorenzo9Oz - 21.07.2012
Listen bro, try making the first basics as /kill and /changeteam and make the teams and make the classes apear on class selection then reply here when u do it and i'll help ya with the random spawns thing