02.06.2014, 02:18
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
Thanks Before .
Rep++ for who helped
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;
}
Rep++ for who helped