SA-MP Forums Archive
Interiors - 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: Interiors (/showthread.php?tid=136856)



Interiors - Jonny_lockhart - 26.03.2010

Can someone help me with interiors.

For example, I made a Hospital interior and I have the coords of it

Now I want it were when people walk for the "i" sign infront of All Saints Hospital they go to those coords.

I've tried it buy messed it up.

Any help?


Re: Interiors - ColdXX - 26.03.2010

pawn Код:
new hospital;//add this at the top of your script
hospital=CreatePickup([pickupid], 23,[coords])
public OnPlayerPickUpPickup(playerid, pickupid)
{
if(pickupid=hospital) SetPlayerPos(playerid,[coords]
SetPlayerInterior(playerid,[interiorid])
}
Something like this!


Re: Interiors - bajskorv123 - 26.03.2010

Do something like this:

pawn Код:
//Above main
new hospitalenter;

//At GameModeInit
hospitalenter = CreatePickup(1239, 23, X, Y, Z, -1);//Change X Y Z to the coords of where the pickup should be

//OnPlayerPickUpPickup
if(pickupid == hospitalenter)
{
  SetPlayerInterior(playerid, Interior);//Change "Interior" to the id of the interior your using
  SetPlayerPos(playerid, X, Y, Z);//Change X Y Z to the coords of where you should get teleported upon enterning pickup
}



Re: Interiors - ColdXX - 26.03.2010

Quote:
Originally Posted by [NWA
Hannes ]
Do something like this:

pawn Код:
//Above main
new hospitalenter;

//At GameModeInit
hospitalenter = CreatePickup(1239, 23, X, Y, Z, -1);//Change X Y Z to the coords of where the pickup should be

//OnPlayerPickUpPickup
if(pickupid == hospitalenter)
{
  SetPlayerInterior(playerid, Interior);//Change "Interior" to the id of the interior your using
  SetPlayerPos(playerid, X, Y, Z);//Change X Y Z to the coords of where you should get teleported upon enterning pickup
}
U explained better :P