[SOLVED] SetPlayerInterior
#1

Hello again, I'm trying to make some classed to spawn in a interior, I got the interior ids and coordinates.
Lets say for example, I got TEAM_BALLAS and some of the classes spawns inside Jefferson Motel and some spawns at Glen Park with interior id of 0.

How can I set up the interior id's for my Team, because when someone spawns it just falls through the floor inside the Motel because the other classes spawns outide a interior.

Thanks
Reply
#2


SetPlayerInterior(playerid, interiorid);

Put that wherever you want, (When you spawn as grove,ballas, w/e.)
Reply
#3

In OnPlayerSpawn you simply distinguish between teams by if-statements.

If(blala team_ballas) {
...
SetPlayerInterior(...);
...
} else if(blabla team_somethingelse{

SetPlayerInterior(...);

}
Reply
#4

Quote:
Originally Posted by ray187
In OnPlayerSpawn you simply distinguish between teams by if-statements.

If(blala team_ballas) {
...
SetPlayerInterior(...);
...
} else if(blabla team_somethingelse{

SetPlayerInterior(...);

}
I've done that, this is how it looked like:

Code:
  if(gTeam[playerid] == TEAM_GROVE)
  {
    SetPlayerColor(playerid, COLOR_GREEN);
    SetPlayerInterior(playerid, 1);
    SetPlayerInterior(playerid, 2);
    SetPlayerInterior(playerid, 3);
	}
	
 	if(gTeam[playerid] == TEAM_SBF)
  {
    SetPlayerColor(playerid, COLOR_GREEN);
    SetPlayerInterior(playerid, 0);
  }
	
	if(gTeam[playerid] == TEAM_TDF)
  {
    SetPlayerColor(playerid, COLOR_GREEN);
    SetPlayerInterior(playerid, 0);
  }
	
	if(gTeam[playerid] == TEAM_BALLAS)
  {
    SetPlayerColor(playerid, COLOR_PURPLE);
    SetPlayerInterior(playerid, 5);
    SetPlayerInterior(playerid, 15);
    SetPlayerInterior(playerid, 0);
	}

etc...
I got some classes in the Ballas team that gonna spawn outside a interior, I guess that bugs the other ballas interior id's...
Reply
#5

I don`t really get your problem, nor why you use SetPlayerInterior mostly three times in a row. Can you explain once more shortly and exactly what result you want to have?
Reply
#6

Quote:
Originally Posted by ray187
I don`t really get your problem, nor why you use SetPlayerInterior mostly three times in a row. Can you explain once more shortly and exactly what result you want to have?
I think I fixed it, I added some more teams like "idlewood Ballas" and "Jefferson Ballas" etc instead of just keeping every balla skin in same team.

Thanks for the support anyway
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)