[Help]Random Spawn
#3

Made it more easy to look at
Код:
#include <a_samp>

new iRandomNumber = random(25);
new Float:RandomSpawn[][4] =
{
  {-2796.9854, 1224.8180, 20.5429, 192.0335},
  {-2454.2170, 503.8759, 30.0790, 267.2932},
  {-2669.7322, -6.0874, 6.1328, 89.8853}
}
 
main()
{
	print("\n----------------------------------");
	print(" Blank Gamemode by your name here");
	print("----------------------------------\n");
}

public OnGameModeInit()
{
	SetGameModeText("Blank Script");
	AddPlayerClass(0, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
	return 1;
}

public OnPlayerRequestClass(playerid, classid)
{
	SetPlayerPos(playerid, 1958.3783, 1343.1572, 15.3746);
	SetPlayerCameraPos(playerid, 1958.3783, 1343.1572, 15.3746);
	SetPlayerCameraLookAt(playerid, 1958.3783, 1343.1572, 15.3746);
	return 1;
}

public OnPlayerSpawn(playerid)
{
  new iRandom = random(sizeof(RandomSpawn));
  SetPlayerPos(playerid, RandomSpawn[iRandom][0], RandomSpawn[iRandom][1],RandomSpawn[iRandom][2]);
  SetPlayerFacingAngle(playerid, RandomSpawn[iRandom][3]);
  return 1;
}
Reply


Messages In This Thread
[Help]Random Spawn - by Marc_307 - 15.05.2009, 06:03
Re: [Help]Random Spawn - by [HiC]TheKiller - 15.05.2009, 07:58
Re: [Help]Random Spawn - by Cabby - 15.05.2009, 08:03
Re: [Help]Random Spawn - by Marc_307 - 15.05.2009, 11:47
Re: [Help]Random Spawn - by Nero_3D - 15.05.2009, 12:06
Re: [Help]Random Spawn - by Ignas1337 - 15.05.2009, 14:01
Re: [Help]Random Spawn - by Marc_307 - 15.05.2009, 14:04
Re: [Help]Random Spawn - by Ignas1337 - 15.05.2009, 14:08

Forum Jump:


Users browsing this thread: 1 Guest(s)