Can someone explain me.
#1

I have made an house system, can someone explain me how do I add house spawn? Player can toggle or un-toggle. I'm not sure. A little explanation will get me started, thanks.
Reply
#2

Save the data in enums using MySQL
pawn Код:
OnPlayerSpawn(playerid)
{
 if(HouseSpawn[playerid] == 1) // load the variable data from the DB.
 {
   SetPlayerPos(dedededed); // set their pos
   ...... // other code
  }
  else
  {
   SetPlayerPos(dedededede);
   .......
   }
   return 1;
}
Reply
#3

You don't get my point, how do I make sure they spawn in their house? Even though 2 houses might be using same interior they aren't spawned in same house?
Reply
#4

Virtual World, use it. If player ID (MySQL ID) is 0, add += 1 and set their virtual world.

EDIT: After they login, show them a dialog to spawn in house 1 or 2.
Reply
#5

Should I save each interior I'm using for house, their interior coord? And spawn player accordingly?
Reply
#6

Quote:
Originally Posted by [ND]xXZeusXx.
Посмотреть сообщение
Should I save each interior I'm using for house, their interior coord? And spawn player accordingly?
Nope, Get player house from the DB, in your script you should have got the interior and pos of the house, and there must be house ids, use them.
Reply
#7

I do have interior of the house, but I don't have specific position inside the house, for example. I want to spawn them in bedroom if they've enabled house spawn. So I should collect the coords of the interior right?
Reply
#8

Ofcourse Zeus, but you will need to collect of few houses as players will be using the default interiors of the houses, won't they be?
Reply
#9

I use 20 different interiors, I need to collect 20 different coords, is that what you mean?
Reply
#10

Yes, and use a function that detect the player house ids and the interior ids, if id is equal to something, set their pos according to it.

EDIT: different virtual worlds are different universe, so it won't mix up the players furniture and two players who own different house but same interior won't spawn in the same vworld but will spawn in the same interior.

- while others avoid to post shits unless they got something else to say. -
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)