Jump to content

Recommended Posts

Posted

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.

Posted

Nu ar trebui in loc de 

new rows;
for(new x; x <= cache_num_rows(rows); x++)

sa fie 

for(new x; x < sizeof(HouseInfo); x++)

?

  • Thanks 3

Discord:
! Akan !#6675

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • 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.