help | spawn
#1

so when i start the game the player is spawn only 1
place i want to make many places
so what i need to do ?
Reply
#2

public OnGameModeInit()
{

//player classes

AddPlayerClass(skinid, x, y, z,180.8934,0,0,0,0,0,0); // outhouse1
AddPlayerClass(skinid, x, y, z,108.3009,0,0,0,0,0,0); // caravan1
AddPlayerClass(skinid, x, y, z,186.2041,0,0,0,0,0,0); // barn1
return 0;
}

add what ever you want
Reply
#3

no
i mean any class
will telleport to any where
not 1 place :\
Reply
#4

Are you setting their position to any other place at OnPlayerSpawn?
Reply
#5

yes
Reply
#6

Well, there's your problem then.
Reply
#7

Reply
#8

To do this you can create randomally spawns.
Something like this:
pawn Код:
new Float:randomSpawns[][3] =
{
  {0.0,0.0,0.0}, // spawn #1
  {0.0,0.0,0.0}, // spawn #2
  {0.0,0.0,0.0}, // spawn #3
  {0.0,0.0,0.0} // spawn #4
};
public OnPlayerSpawn(playerid)
{
  new r = random(sizeof(randomSpawns));
  SetPlayerPos(playerid,randomSpawns[r][0],randomSpawns[r][1],randomSpawns[r][2]);
  return 1;
}
Reply
#9

סוף סוף מישהו ישראלי פה
איפו אני שם את ('where i put it ?)

new Float:randomSpawns[][3] =
{
{-1989.1232, 591.4193, 35.1841}, // spawn #1
{ 1123.1140, -1131.8231, 23.8281}, // spawn #2
{ 2023.8903, 1343.1018, 10.8203}, // spawn #3
{ 2343.3652, 1390.1266, 42.8203}, // spawn #4
{ 2056.9578, 860.9142, 6.7177}, // spawn #5
};
ואני לא צריך לימחוק את ה // spawn # האלה ?
i dont need to delete those // spawn #
and that dont even say error
that close it
Reply
#10

Put it in the top of your script.
About the "// spawn #" - you can remove it. It's comment, and doing nothing.

And don't write Hebrew letters only English is allowed.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)