#3

nvm, I have fixed that problem..


there is another problem with house system..


So, when I enter house cp server does nothing.. (I mean no dialog for house buy, for house enter and . . . )

OnPlayerEnterDynamic:
pawn Код:
foreach(Namai, hID)
    {
        if( checkpointid == NamuDB[ hID ][ nNamuCP ][ 1 ] ) // interior
        {
            if( NamuDB[ hID ][ nUzrakintas ] == 1 ) return SendClientMessage( playerid, -1, ""#h_Balta"["#h_Melyna"PRANEРIMAS"#h_Balta"]: Namas yra "#h_Raudona"uюrakintas!" ); // if the house is locked
            SendClientMessage( playerid, -1, ""#h_Balta"["#h_Melyna"PRANEРIMAS"#h_Balta"]: Sлkmingai iрлjote iр namo." );
            SetPlayerPos( playerid, NamuDB[ hID ][ nIsejimas ][ 0 ], NamuDB[ hID ][ nIsejimas ][ 1 ], NamuDB[ hID ][ nIsejimas ][ 2 ] );
            SetPlayerInterior( playerid, 0 );
            SetPlayerVirtualWorld( playerid, 0 );
        }
        if( checkpointid == NamuDB[ hID ][ nNamuCP ][ 0 ] ) // out
        {
            new
                Stringas[ 146 ]
            ;
            if( NamuDB[ hID ][ nNupirktas ] == 0 && GetPVarInt( playerid, "Namas" ) == -1 ) // if the house isnt for sale and player dont have any house
            {
                format( Stringas, 144, ""#h_Balta"Ar tikrai norite pirkti рб namа?\n\n"#h_Balta"Namo numeris: "#h_Melyna"%d\n"#h_Balta"Namo kaina: "#h_Melyna"%d$", NamuDB[ hID ][ nNamoID ], NamuDB[ hID ][ nKaina ] );
                ShowPlayerDialog( playerid, 93, DIALOG_STYLE_MSGBOX, ""#h_Balta"Namo pirkimas", Stringas, "Pirkti", "Nepirkti" );
                SetPVarInt( playerid, "nNamas", hID );
            }
            if( NamuDB[ hID ][ nUzrakintas ] == 1 && NamuDB[ hID ][ nNupirktas ] == 1 ) // if the house isnt locked and its not for sale
            {
                format( Stringas, 146, ""#h_Balta"["#h_Melyna"PRANEРIMAS"#h_Balta"]: Рis namas yra "#h_Raudona"uюrakintas"#h_Balta"! Jo savininkas: "#h_Melyna"%s", NamuDB[ hID ][ nSavininkas ] );
                SendClientMessage( playerid, -1, Stringas );
            }
            if( NamuDB[ hID ][ nUzrakintas ] == 0 && NamuDB[ hID ][ nNupirktas ] == 1 ) SetPlayerPos( playerid, NamuDB[ hID ][ nIeimas ][ 0 ], NamuDB[ hID ][ nIeimas ][ 1 ], NamuDB[ hID ][ nIeimas ][ 2 ] ), SetPlayerInterior( playerid, NamuDB[ hID ][ nInterior ] ), SetPlayerVirtualWorld( playerid, NamuDB[ hID ][ nVirtual ] ); // teling player to the house
        }
    }
I tryied to print and check Itter 'Namai', and its value is MAX_HOUSES - 35.
Reply


Messages In This Thread
mode - by Gh0sT_ - 02.04.2011, 11:43
Re: mode - by Gh0sT_ - 02.04.2011, 12:19
Re: mode - by Gh0sT_ - 02.04.2011, 15:29

Forum Jump:


Users browsing this thread: 1 Guest(s)