SA-MP Forums Archive
Help? - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Help? (/showthread.php?tid=615857)



Help? - Micko123 - 28.08.2016

Hey guys. I have this problem on house system. When i create house it works fine and everything is created as it should. Then i buy house and it sends me to interior and that is fine too. But i can't get out of house. I can't exit it
PHP код:
if(IsPlayerInRangeOfPoint(playerid3.0KucaInfo[i][kIzlazX], KucaInfo[i][kIzlazY], KucaInfo[i][kIzlazZ]) && GetPlayerVirtualWorld(playerid) == KucaInfo[i][kVW]) 
            { 
                
SetPlayerPos(playeridKucaInfo[i][kUlazX], KucaInfo[i][kUlazY], KucaInfo[i][kUlazZ]); 
                
SetPlayerInterior(playerid0);  
                
SetPlayerVirtualWorld(playerid0);  
            } 
There it is. When i am on exit coords it should spawn me on enter coords. I have no idea what is wrong
__________________


Re: Help? - DeeadPool - 28.08.2016

Can you show the whole script ( from where you enter till you exit.) then I can help you.


Re: Help? - Micko123 - 28.08.2016

PHP код:
if(newkeys == KEY_SECONDARY_ATTACK )
    {
        for(new 
iMAX_KUCAi++)
        {
            if(
IsPlayerInRangeOfPoint(playerid3.0KucaInfo[i][kUlazX], KucaInfo[i][kUlazY], KucaInfo[i][kUlazZ]))
            {
                if(
PlayerInfo[playerid][PosedovanjeKuce] == || KucaInfo[i][kZatvoreno] == 0)
                   {
                    
SetPlayerVirtualWorld(playeridKucaInfo[i][kVW]);
                    
SetPlayerInterior(playeridKucaInfo[i][kInt]);
                     
SetPlayerPos(playeridKucaInfo[i][kIzlazX], KucaInfo[i][kIzlazY], KucaInfo[i][kIzlazZ]);
                }
                else return 
ERROR(playerid"Kuca je zakljucana!");
            }
            if(
IsPlayerInRangeOfPoint(playerid3.0KucaInfo[i][kIzlazX], KucaInfo[i][kIzlazY], KucaInfo[i][kIzlazZ]) && GetPlayerVirtualWorld(playerid) == KucaInfo[i][kVW])
            {
                
SetPlayerInterior(playerid0);
                
SetPlayerVirtualWorld(playerid0);
                
SetPlayerPos(playeridKucaInfo[i][kUlazX], KucaInfo[i][kUlazY], KucaInfo[i][kUlazZ]);
            }
        }
    } 
This??


Re: Help? - Micko123 - 28.08.2016

Bump?