Worries optimision...
#4

Quote:
Originally Posted by JacobWilkerson
Посмотреть сообщение
It does not work, it always takes a few seconds before entering the house...
Hope this fixes the problem

pawn Код:
public OnPlayerPickUpDynamicPickup(playerid,pickupid)
{
    new Float:cx, Float:cy, Float:cz;
    GetPlayerPos(playerid, cx, cy, cz);
    for(new i = 0; i < totalhouses; i++)
    {
        if( pickupid == HousePickup[ i ] )
        {
            if( PlayerToPointStripped( 1, playerid, HouseInfo[i][hEntrancex], HouseInfo[i][hEntrancey], HouseInfo[i][hEntrancez], cx, cy, cz ) )
            {
                if( house_isProprio( playerid, i ) || house_isLocataire( playerid, i ) )
                {
                    SetInterior( playerid, HouseInfo[i][hInt] );
                    SetPlayerPos( playerid, HouseInfo[i][hExitx], HouseInfo[i][hExity], HouseInfo[i][hExitz] );

                    PlayerInfo[playerid][pInHouse] = i;

                    switch( HouseInfo[ i ][ hEdited ] )
                    {
                        case 1: SetVirtualWorld(playerid, 0);
                        default: SetVirtualWorld(playerid, i); //Suspicious code that might be the problem.
                    }

                    if( house_isProprio( playerid, i ) || house_isLocataire( playerid, i ) ) {
                        HouseInfo[ i ][ hFrigo ] += biz_recupration[playerid], biz_recupration[playerid] = 0;
                    }
                    if(HouseInfo[ i ][ hLock ] == 1) {
                        GameTextForPlayer(playerid, "~r~Door closed..", 5000, 1);
                    }
                    if(HouseInfo[ i ][ hOwned ] == 0) {
                        SendClientMessage(playerid, COLOR_MAISON, "You see a house. You can buy.");
                    }
                }
            }  
            break;          
        }
    }
    return 1;
}
Reply


Messages In This Thread
Worries optimision... - by JacobWilkerson - 03.01.2014, 18:20
Re: Worries optimision... - by Patrick - 03.01.2014, 18:27
Re: Worries optimision... - by JacobWilkerson - 03.01.2014, 18:41
Re: Worries optimision... - by Patrick - 03.01.2014, 19:22
Re: Worries optimision... - by JacobWilkerson - 03.01.2014, 19:50
Re: Worries optimision... - by JacobWilkerson - 04.01.2014, 09:33
Re: Worries optimision... - by JacobWilkerson - 05.01.2014, 13:42

Forum Jump:


Users browsing this thread: 2 Guest(s)