how to make player spawn in interior - 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)
+--- Thread: how to make player spawn in interior (
/showthread.php?tid=516833)
how to make player spawn in interior -
Loveno - 02.06.2014
i have house system , and if player have house the player will spawn in the pickup of house .
so how to make player spawn in interior not in the pickup of house ?
sorry for my bad english
this my script
pawn Код:
enum HouseInfo
{
Name[24],
Renter[24],
Rentable,
Rentcost,
Cost,
Sell,
Interior,
Virtualworld,
Locked,
Float:InteriorX,
Float:InteriorY,
Float:InteriorZ,
Float:iconx,
Float:icony,
Float:iconz,
Rentfee
}
new hInfo[MAX_HOUSES][HouseInfo];
AddHouse(houseid, Float:iconX, Float:iconY, Float:iconZ, Float:interiorX, Float:interiorY, Float:interiorZ, Costa, Sella, Interiora, virtualworld)
stock SpawnPlayerAtHouse(playerid)
{
new str1[256],pname[24],str[256];
GetPlayerName(playerid, pname, sizeof(pname));
format(str1, sizeof(str1), "ladmin/users/%s.sav", udb_encode(pname));
if (dini_Exists(str1))
{
if(dini_Int(str1,"Houseid")!=-255)
{
new Float:x,Float:y,Float:z;
str = dini_Get(str1,"SpawnInt");
SetPlayerInterior(playerid, strval(str));
playerinterior[playerid] = strval(str);
x = dini_Float(str1,"SpawnX");
y = dini_Float(str1,"SpawnY");
z = dini_Float(str1,"SpawnZ");
SetPlayerPos(playerid, x, y, z);
}
}
return 1;
}
Thanks Before .
Rep++ for who helped
Re: how to make player spawn in interior -
Lynn - 02.06.2014
SetPlayerPos(playerid, interiorX, interiorY, interiorZ);
Re: how to make player spawn in interior -
BroZeus - 02.06.2014
SetplayerVirtualWorld(playerid,Virtualworld);
SetPlayerInterior(playerid,interior);
SetPlayerPos(playerid, interiorX, interiorY, interiorZ)