House's interior doesn't show up
#1

Like in the title when i use my cmd to enter house i am in the air and i am falling down from the sky interior is good
"wejdz" is enter cmd and "wyjdz" is to get out cmd i don't have any errors when compiling i don't know what is not good with that
pastebin cmd's:https://pastebin.com/STT1uZFz
Reply
#2

Why are you doing this?
PHP код:
SendClientMessage(playerid, -1""COLOR_RED"Nie wszedles do domu"); 
and not this
PHP код:
SendClientMessage(playerid, -1COLOR_RED"Nie wszedles do domu"); 
And try this:

PHP код:
        CMD:wejdz(playerid,params[])
        {
            new 
hID GetHouseOutID(playerid);
            if(
hID == -255)
            {
                
SendClientMessage(playerid, -1""COLOR_RED"Nie jestes w poblizu domu");
            }
            else {
                if(
House[hID][hOwned] == 0)
                {
                    
SendClientMessage(playerid, -1""COLOR_RED"Nie mozesz wejsc do domu bez wlasciciela komenda wejdz");
                }
                else {
                    new 
name[24];
                    
GetPlayerName(playerid,name,24);
                    if(!
strcmp(House[hID][hOwner],name,false))
                    {
                        goto 
somewhere;
                    }
                    else if(
House[hID][hLocked] == 1)
                    {
                        
SendClientMessage(playerid, -1""COLOR_RED"Nie mozesz wejsc do domu jest zamkniety");
                    }
                    
somewhere:
                    
SetPlayerInterior(playeridHouse[hID][hInInt]);
                    
SetPlayerVirtualWorld(playeridHouse[hID][hInVW]);
                    
SetPlayerPos(playeridHouse[hID][hInX], House[hID][hInY], House[hID][hInZ]);
                }
            }
            return 
1;
        }
        
CMD:wyjdz(playerid,params[])
        {
            new 
hID GetHouseInID(playerid);
            if(
hID == -255)
            {
                
SendClientMessage(playerid, -1""COLOR_RED"Nie wszedles do domu");
                return 
1;
            }
            
SetPlayerInterior(playerid0);
            
SetPlayerVirtualWorld(playerid0);
            
SetPlayerPos(playerid,House[hID][hOutX],House[hID][hOutY],House[hID][hOutZ]);
            return 
1;
        } 
Reply
#3

i know what i am doing i know i can do this without returns :V i know that i can do it better but maybe you don't know pawn and SendClientMessage doesn't have so much argument to do it how to do it right? SendClientMessage(playerid,color,const message[]);
Edit:Okey i solved this
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)