[SOLVED] SetPlayerInterior - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: [SOLVED] SetPlayerInterior (
/showthread.php?tid=126628)
[SOLVED] SetPlayerInterior -
FreddeN - 09.02.2010
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
Re: [HELP] SetPlayerInterior -
NewYorkRP - 09.02.2010
SetPlayerInterior(playerid, interiorid);
Put that wherever you want, (When you spawn as grove,ballas, w/e.)
Re: [HELP] SetPlayerInterior -
ray187 - 09.02.2010
In OnPlayerSpawn you simply distinguish between teams by if-statements.
If(blala team_ballas) {
...
SetPlayerInterior(...);
...
} else if(blabla team_somethingelse{
SetPlayerInterior(...);
}
Re: [HELP] SetPlayerInterior -
FreddeN - 09.02.2010
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...
Re: [HELP] SetPlayerInterior -
ray187 - 09.02.2010
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?
Re: [HELP] SetPlayerInterior -
FreddeN - 09.02.2010
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