Enter 1st house but not 2n
#4

Quote:
Originally Posted by Yousha
Посмотреть сообщение
First, find where the prob is:
Код:
        else if(IsPlayerInRangeOfPoint(playerid, 2.0, HouseInfo[hid][XEnt],HouseInfo[hid][YEnt],HouseInfo[hid][ZEnt])) //enter house!
        {
print("1");
                if(pinfo[playerid][ID] != HouseInfo[hid][HOwnerID] && HouseInfo[hid][HOwned] == 1) return SendClientMessage(playerid,-1,""COL_RED"SERVER"COL_WHITE":You can't enter the house since it's not yours");
print("2");
                if(pinfo[playerid][ID] == HouseInfo[hid][HOwnerID] && HouseInfo[hid][HOwned] == 1)
                {
print("3");
                    EnterHouse(playerid,hid);
                }
        
        }
Or something like that... Then you can fix it easily.
So this was suppose to help me?
I don't think the problem is related to the variables but i think it needs somehow a loop
Quote:
Originally Posted by jlalt
Посмотреть сообщение
print your house info & player info to see if they're loaded right,
PHP код:
else if(IsPlayerInRangeOfPoint(playerid2.0HouseInfo[hid][XEnt],HouseInfo[hid][YEnt],HouseInfo[hid][ZEnt])) //enter house! 
        
{
                
printf(Player House ID: %dHouse OwnerID: %d",pinfo[playerid][ID],HouseInfo[hid][HOwnerID]);                 
                if(pinfo[playerid][ID] != HouseInfo[hid][HOwnerID] && HouseInfo[hid][HOwned] == 1) return SendClientMessage(playerid,-1,""COL_RED"
SERVER"COL_WHITE":You can't enter the house since it's not yours"); 
                if(pinfo[playerid][ID] == HouseInfo[hid][HOwnerID] && HouseInfo[hid][HOwned] == 1) 
                { 
                    EnterHouse(playerid,hid); 
                } 
         
        } 
if setting player pos wrongly print your house float:
PHP код:
function EnterHouse(playerid,houseid

            
SetPlayerPos(playerid,HouseInfo[houseid][XExit],HouseInfo[houseid][YExit],HouseInfo[houseid][ZExit]); 
            
printf("%f, %f, %f",HouseInfo[houseid][XExit],HouseInfo[houseid][YExit],HouseInfo[houseid][ZExit]); 
            
SetPlayerInterior(playerid,HouseInfo[houseid][HInterior]); 
            
SetPlayerVirtualWorld(playerid,HouseInfo[houseid][HVirtualWorld]); 
            
Loading(playerid); 
            return 
1

So i printed and realised that on the 2nd house it doesnt even print when i am in range of it and press f button
Reply


Messages In This Thread
Enter 1st house but not 2n - by vassilis - 07.12.2015, 15:16
Re: Enter 1st house but not 2n - by Yousha - 07.12.2015, 15:23
Re: Enter 1st house but not 2n - by jlalt - 07.12.2015, 15:29
Re: Enter 1st house but not 2nd - by vassilis - 07.12.2015, 15:31
Re: Enter 1st house but not 2nd - by jlalt - 07.12.2015, 15:43
Re: Enter 1st house but not 2n - by vassilis - 07.12.2015, 15:50
Re: Enter 1st house but not 2n - by jlalt - 07.12.2015, 15:58
Re: Enter 1st house but not 2n - by vassilis - 07.12.2015, 16:10
Re: Enter 1st house but not 2n - by jlalt - 07.12.2015, 16:13
Re: Enter 1st house but not 2n - by vassilis - 07.12.2015, 16:15

Forum Jump:


Users browsing this thread: 1 Guest(s)