how to make player spawn in interior
#1

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
Reply
#2

SetPlayerPos(playerid, interiorX, interiorY, interiorZ);
Reply
#3

SetplayerVirtualWorld(playerid,Virtualworld);
SetPlayerInterior(playerid,interior);
SetPlayerPos(playerid, interiorX, interiorY, interiorZ)
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)