Jump to content

Intrare case problema


Recommended Posts

Salut, am si eu o problema cu sistemul de case facut de mine.

Problema este in felul urmator la in consola imi zice ca mi s-au incarcat casele care sunt in baza de date . 4 in cazul de fata

Intru pe joc icoanele si texturile sunt . Ma duc la prima casa cu id 1 si intru si ies totul ok interiorul bun totul bun.

Apoi ma duc la 2 3 4 si dau f si nu se intampla nimic. Intrebarea este unde am gresit in acest script sau daca este din alta parte exemplu load house

[hide]

function EnterHouse(playerid)
{
    if(IsPlayerLogged[playerid] == 0) return SCM(playerid, COLOR_ERROR, NuSuntConectat);
    new rows;
    for(new x; x <= cache_num_rows(rows); x++)
    {
        if(!PlayerToPoint(3.0, playerid, H_Date[x][hPosX], H_Date[x][hPosY], H_Date[x][hPosZ])) return true;
    
        if(GetPlayerVirtualWorld(playerid) > 0) return SCM(playerid, COLOR_ERROR, "ERROR: {FFFFFF}Nu poti intra in casa in alt vw!");
        if(H_Date[x][hOcupied] == 0)
        {
            SetPlayerPosEx(true, playerid, H_Date[x][hPosEX], H_Date[x][hPosEY], H_Date[x][hPosEZ]);
            SetPlayerInterior(playerid, H_Date[x][hInt]);
            SetPlayerVirtualWorld(playerid, HouseVW[x]);
            InHouse[playerid] = H_Date[x][hSQLID];
            VirtualWorld[playerid] = HouseVW[x];
        }
        if(H_Date[x][hOcupied] == 1)
        {
            if(H_Date[x][hLock] == 1 && P_Date[playerid][pHouse] != H_Date[x][hSQLID]) return SCM(playerid, COLOR_ERROR, "ERROR: {FFFFFF}Aceasta casa este incuiata, nu esti chirias al casei!");

            if(P_Date[playerid][pHouse] == H_Date[x][hSQLID])
            {
                SetPlayerPosEx(true, playerid, H_Date[x][hPosEX], H_Date[x][hPosEY], H_Date[x][hPosEZ]);
                SetPlayerInterior(playerid, H_Date[x][hInt]);
                SetPlayerVirtualWorld(playerid, HouseVW[x]);
                InHouse[playerid] = H_Date[x][hSQLID];
                VirtualWorld[playerid] = HouseVW[x];

                new str[144];
                format(str, sizeof(str), "Bun venit acasa! Casa este a lui: %s", H_Date[x][hOwner]);
                SCM(playerid, COLOR_PRIMIRECEVA, str);
            }
            else
            {
                SetPlayerPosEx(true, playerid, H_Date[x][hPosEX], H_Date[x][hPosEY], H_Date[x][hPosEZ]);
                SetPlayerInterior(playerid, H_Date[x][hInt]);
                SetPlayerVirtualWorld(playerid, HouseVW[x]);
                InHouse[playerid] = H_Date[x][hSQLID];
                VirtualWorld[playerid] = HouseVW[x];

                new str[144];
                format(str, sizeof(str), "Bun venit! Casa este a lui: %s", H_Date[x][hOwner]);
                SCM(playerid, COLOR_PRIMIRECEVA, str);
            }
        }
    }

    return true;
}
[/hide]

 

Multumesc anticipat.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.