Interiors -
patfay - 09.04.2011
Hello,
I just made a new map for my server, and most of the objects were non-collidable, so i had to objects to it so you cant go through them..
I was wondering if i was able to make the object only appear in a certain interior so that the objects are invisible..
Re: Interiors -
tanush - 09.04.2011
try using this callback
pawn Код:
public OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid)
{
return 1;
}
so imagine interior 1
pawn Код:
public OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid)
{
if(newinteriorid == 1)
{
CreateObject...
}
return 1;
}
dont know if it works
Re: Interiors -
patfay - 09.04.2011
so if I were to use that and insert all the objects I dont want to appear, then they will only appear on that set interior?
Let me go see
Re: Interiors -
patfay - 09.04.2011
Nope didnt work
Re: Interiors -
linuxthefish - 09.04.2011
pawn Код:
public OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid)
{
if(newinteriorid == 1)
{
CreatePlayerObject()
}
return 1;
}
Try using CreatePlayerObject, so everyone who isn't in that interior doesn't see them. Also use /interior to check your current interior ID. (Remember the object limit!)
Re: Interiors -
patfay - 09.04.2011
Uhh.. how would I do that? I'm a begginer at scripting
Re: Interiors -
linuxthefish - 09.04.2011
What is the ID, position and interior of the object you want to have appear?
Re: Interiors -
patfay - 09.04.2011
Well, its what i don't want to appear, and there are about 20 objects
pawn Код:
CreateDynamicObject(10841,-1866.22058105,71.79782867,1061.04443359,0.00000000,0.00000000,90.00000000); //object(drydock1_sfse01) (1)
CreateDynamicObject(10841,-1870.10888672,71.79782867,1061.04443359,0.00000000,0.00000000,90.00000000); //object(drydock1_sfse01) (2)
CreateDynamicObject(10841,-1876.70776367,71.79782867,1061.04443359,0.00000000,0.00000000,90.00000000); //object(drydock1_sfse01) (3)
CreateDynamicObject(10841,-1880.76611328,71.79782867,1061.04443359,0.00000000,0.00000000,90.00000000); //object(drydock1_sfse01) (4)
CreateDynamicObject(10841,-1857.17871094,71.79782867,1061.04443359,0.00000000,0.00000000,90.00000000); //object(drydock1_sfse01) (5)
CreateDynamicObject(10841,-1853.21191406,71.79782867,1061.04443359,0.00000000,0.00000000,90.00000000); //object(drydock1_sfse01) (6)
CreateDynamicObject(10841,-1846.49768066,71.79782867,1061.04443359,0.00000000,0.00000000,90.00000000); //object(drydock1_sfse01) (7)
CreateDynamicObject(10841,-1842.58068848,71.79782867,1061.04443359,0.00000000,0.00000000,90.00000000); //object(drydock1_sfse01) (8)
CreateDynamicObject(970,-1868.48193359,60.47232056,1054.73437500,0.00000000,0.00000000,0.00000000); //object(fencesmallb) (1)
CreateDynamicObject(970,-1868.48144531,60.47167969,1055.71508789,0.00000000,0.00000000,0.00000000); //object(fencesmallb) (2)
CreateDynamicObject(970,-1868.48144531,60.47167969,1056.53234863,0.00000000,0.00000000,0.00000000); //object(fencesmallb) (3)
CreateDynamicObject(970,-1878.48144531,60.47167969,1054.73437500,0.00000000,0.00000000,0.00000000); //object(fencesmallb) (4)
CreateDynamicObject(970,-1878.48144531,60.47167969,1055.55163574,0.00000000,0.00000000,0.00000000); //object(fencesmallb) (5)
CreateDynamicObject(970,-1878.48144531,60.47167969,1056.36889648,0.00000000,0.00000000,0.00000000); //object(fencesmallb) (6)
CreateDynamicObject(970,-1854.98144531,60.47167969,1054.73437500,0.00000000,0.00000000,0.00000000); //object(fencesmallb) (7)
CreateDynamicObject(970,-1854.98144531,60.47167969,1055.55163574,0.00000000,0.00000000,0.00000000); //object(fencesmallb) (8)
CreateDynamicObject(970,-1854.98144531,60.47167969,1056.36889648,0.00000000,0.00000000,0.00000000); //object(fencesmallb) (9)
CreateDynamicObject(970,-1844.98144531,60.47167969,1054.73437500,0.00000000,0.00000000,0.00000000); //object(fencesmallb) (10)
CreateDynamicObject(970,-1844.98144531,60.47167969,1055.55163574,0.00000000,0.00000000,0.00000000); //object(fencesmallb) (11)
CreateDynamicObject(970,-1844.98144531,60.47167969,1056.36889648,0.00000000,0.00000000,0.00000000); //object(fencesmallb) (12)
CreateDynamicObject(8656,-1843.59667969,71.87176514,1055.38830566,0.00000000,0.00000000,270.00000000); //object(shbbyhswall09_lvs) (1)
CreateDynamicObject(8656,-1880.04455566,71.82939911,1055.38830566,0.00000000,0.00000000,270.00000000); //object(shbbyhswall09_lvs) (2)
CreateDynamicObject(970,-1873.45471191,70.14930725,1054.89782715,0.00000000,0.00000000,0.00000000); //object(fencesmallb) (13)
CreateDynamicObject(970,-1873.82519531,70.15722656,1055.87854004,0.00000000,0.00000000,0.00000000); //object(fencesmallb) (14)
CreateDynamicObject(970,-1873.60498047,70.14377594,1056.85925293,0.00000000,0.00000000,0.00000000); //object(fencesmallb) (15)
CreateDynamicObject(970,-1849.91796875,70.22843933,1054.89782715,0.00000000,0.00000000,0.00000000); //object(fencesmallb) (16)
CreateDynamicObject(970,-1850.57177734,70.22531128,1056.04199219,0.00000000,0.00000000,0.00000000); //object(fencesmallb) (17)
CreateDynamicObject(970,-1849.42712402,70.22850800,1057.02270508,0.00000000,0.00000000,0.00000000); //object(fencesmallb) (18)
EDIT:
Also there are objects with the same Interior and stuff that I want to appear
Re: Interiors -
linuxthefish - 09.04.2011
pawn Код:
public OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid)
{
if(newinteriorid == 6)
{
CreatePlayerObject(playerid,10841,-1866.22058105,71.79782867,1061.04443359,0.00000000,0.00000000,90.00000000);
}
return 1;
}
Would create the "drydock1_sfse01" object if the player went into interior 6, if that's what you want to happen?
Re: Interiors -
tanush - 09.04.2011
Umm i know, i think you put the world to 0 so it should be
pawn Код:
CreateDynamicObject(10841,-1866.22058105,71.79782867,1061.04443359,0.00000000,1.00000000,90.00000000); //object(drydock1_sfse01) (1)
CreateDynamicObject(10841,-1870.10888672,71.79782867,1061.04443359,0.00000000,1,90.00000000); //object(drydock1_sfse01) (2)
CreateDynamicObject(10841,-1876.70776367,71.79782867,1061.04443359,0.00000000,1,90.00000000); //object(drydock1_sfse01) (3)
CreateDynamicObject(10841,-1880.76611328,71.79782867,1061.04443359,0.00000000,1,90.00000000); //object(drydock1_sfse01) (4)
CreateDynamicObject(10841,-1857.17871094,71.79782867,1061.04443359,0.00000000,1,90.00000000); //object(drydock1_sfse01) (5)
CreateDynamicObject(10841,-1853.21191406,71.79782867,1061.04443359,0.00000000,1,90.00000000); //object(drydock1_sfse01) (6)
CreateDynamicObject(10841,-1846.49768066,71.79782867,1061.04443359,0.00000000,1,90.00000000); //object(drydock1_sfse01) (7)
CreateDynamicObject(10841,-1842.58068848,71.79782867,1061.04443359,0.00000000,1,90.00000000); //object(drydock1_sfse01) (8)
CreateDynamicObject(970,-1868.48193359,60.47232056,1054.73437500,0.00000000,1,0.00000000); //object(fencesmallb) (1)
CreateDynamicObject(970,-1868.48144531,60.47167969,1055.71508789,0.00000000,1,0.00000000); //object(fencesmallb) (2)
CreateDynamicObject(970,-1868.48144531,60.47167969,1056.53234863,0.00000000,1,0.00000000); //object(fencesmallb) (3)
CreateDynamicObject(970,-1878.48144531,60.47167969,1054.73437500,0.00000000,1,0.00000000); //object(fencesmallb) (4)
CreateDynamicObject(970,-1878.48144531,60.47167969,1055.55163574,0.00000000,1,0.00000000); //object(fencesmallb) (5)
CreateDynamicObject(970,-1878.48144531,60.47167969,1056.36889648,0.00000000,1,0.00000000); //object(fencesmallb) (6)
CreateDynamicObject(970,-1854.98144531,60.47167969,1054.73437500,0.00000000,1,0.00000000); //object(fencesmallb) (7)
CreateDynamicObject(970,-1854.98144531,60.47167969,1055.55163574,0.00000000,1,0.00000000); //object(fencesmallb) (8)
CreateDynamicObject(970,-1854.98144531,60.47167969,1056.36889648,0.00000000,1,0.00000000); //object(fencesmallb) (9)
CreateDynamicObject(970,-1844.98144531,60.47167969,1054.73437500,0.00000000,1,0.00000000); //object(fencesmallb) (10)
CreateDynamicObject(970,-1844.98144531,60.47167969,1055.55163574,0.00000000,1,0.00000000); //object(fencesmallb) (11)
CreateDynamicObject(970,-1844.98144531,60.47167969,1056.36889648,0.00000000,1,0.00000000); //object(fencesmallb) (12)
CreateDynamicObject(8656,-1843.59667969,71.87176514,1055.38830566,0.00000000,1,270.00000000); //object(shbbyhswall09_lvs) (1)
CreateDynamicObject(8656,-1880.04455566,71.82939911,1055.38830566,0.00000000,1,270.00000000); //object(shbbyhswall09_lvs) (2)
CreateDynamicObject(970,-1873.45471191,70.14930725,1054.89782715,0.00000000,1,0.00000000); //object(fencesmallb) (13)
CreateDynamicObject(970,-1873.82519531,70.15722656,1055.87854004,0.00000000,1,0.00000000); //object(fencesmallb) (14)
CreateDynamicObject(970,-1873.60498047,70.14377594,1056.85925293,0.00000000,1,0.00000000); //object(fencesmallb) (15)
CreateDynamicObject(970,-1849.91796875,70.22843933,1054.89782715,0.00000000,1,0.00000000); //object(fencesmallb) (16)
CreateDynamicObject(970,-1850.57177734,70.22531128,1056.04199219,0.00000000,1,0.00000000); //object(fencesmallb) (17)
CreateDynamicObject(970,-1849.42712402,70.22850800,1057.02270508,0.00000000,1,0.00000000); //object(fencesmallb) (18)
i change to interior to 1 (look at second last)
Re: Interiors -
Mean - 09.04.2011
CreatePlayerObject mixed with CreateDynamicObject will not work as much as I know. I'm not really sure.
Re: Interiors -
patfay - 09.04.2011
@Tanush that didnt work
@linux Yes, except for with all the objects listed
Re: Interiors -
linuxthefish - 09.04.2011
I don't understand what your saying, and I'm not to sure how to accomplish this. I'm exiting the discussion!
Re: Interiors -
patfay - 09.04.2011
Well, What I am saying is yes, I want the object not to appear unless your the specified ID, with all the objects that I posted on the first page
Re: Interiors -
tanush - 09.04.2011
playerID or interiorID
Re: Interiors -
patfay - 09.04.2011
interiorid.. make it so that NOBODY can see the object, but you can still run into it..