SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help

Reply
 
Thread Tools Display Modes
Old 29/03/2020, 02:29 PM   #1
KamilPolska
Huge Clucker
 
Join Date: May 2016
Location: Poland
Posts: 476
Reputation: 5
Default Problem interior

I have a problem with interiors. In the database, each house has the interior set with ID 1 and when I enter, for example, house ID 0, I can enter the interior, but when I enter another house ID 1, there is no interior and I start to fall off the map. Why?

https://pastebin.com/LbqFN3HQ
KamilPolska is offline   Reply With Quote
Old 29/03/2020, 02:36 PM   #2
MichiCZ
Big Clucker
 
Join Date: Dec 2011
Location: Czech Republic - Prachatice/Písek
Posts: 109
Reputation: 5
Default Re: Problem interior

You have not defined interiors positions... Every interior have their on "Spawn point". Example:
Interior: Jefferson motel
ID:15
X,Y,Z: 2215.454833,-1147.475585,1025.796875
MichiCZ is offline   Reply With Quote
Old 29/03/2020, 02:47 PM   #3
KamilPolska
Huge Clucker
 
Join Date: May 2016
Location: Poland
Posts: 476
Reputation: 5
Default Re: Problem interior

Yes, but there are two interiors added to the database .
KamilPolska is offline   Reply With Quote
Old 29/03/2020, 02:51 PM   #4
MichiCZ
Big Clucker
 
Join Date: Dec 2011
Location: Czech Republic - Prachatice/Písek
Posts: 109
Reputation: 5
Default Re: Problem interior

Are you sure you loaded coordinates correctly?
Code:
IntInfo[houseinterior][IntPosX] 
IntInfo[houseinterior][IntPosY] 
IntInfo[houseinterior][IntPosZ]
MichiCZ is offline   Reply With Quote
Old 29/03/2020, 03:52 PM   #5
KamilPolska
Huge Clucker
 
Join Date: May 2016
Location: Poland
Posts: 476
Reputation: 5
Default Re: Problem interior

I think so. In the database I have 2 interiors added and when I enter the house with ID 0 and 1 I enter the interior is good but when I go to the house with ID 2 I fall from the map I do not know why this is happening.

Houses:


Interiors:
KamilPolska is offline   Reply With Quote
Old 29/03/2020, 04:16 PM   #6
MichiCZ
Big Clucker
 
Join Date: Dec 2011
Location: Czech Republic - Prachatice/Písek
Posts: 109
Reputation: 5
Default Re: Problem interior

You must store and load coordinates as float, if u putted it manually, use . no ,

and make sure if your columns are set for storing float
MichiCZ is offline   Reply With Quote
Old 29/03/2020, 04:55 PM   #7
SiaReyes
Gangsta
 
SiaReyes's Avatar
 
Join Date: Mar 2019
Location: Coordinates X,Y,Z
Posts: 622
Reputation: 57
Default Re: Problem interior

Check the interior co-ordinates of int_4 are right.
SiaReyes is offline   Reply With Quote
Old 29/03/2020, 05:54 PM   #8
KamilPolska
Huge Clucker
 
Join Date: May 2016
Location: Poland
Posts: 476
Reputation: 5
Default Re: Problem interior

I saved the positions and still the same. I entered the house with ID 0 and it was interior 6 and the database is set to interior 4 ...





Edit: Still different happens when I remove "new houseinterior = DomInfo [HouseID] [dInterior];" and HouseID adds, when I enter the house with ID 0 it is interior 1 and the house ID 1 is interior 4 and house ID 2 has interior 6 so I don't know what is going on and how to fix it .. And house ID 3 has no interior because I'm falling off the map.
KamilPolska is offline   Reply With Quote
Old 29/03/2020, 06:21 PM   #9
Symon
Gangsta
 
Symon's Avatar
 
Join Date: Apr 2019
Location: Italy
Posts: 863
Reputation: 68
Default Re: Problem interior

Excuse me, an off topic question. Which MySQL database viewer are you using? Isn't phpMyAdmin?
__________________

Join The Server (play.symonscnr.com) | Discord | Website/Forum
Choose up from 5 different skills, Con Artist, Drug Dealer, Firefighter, Hitman and Terrorist.
Play as a Civilian or a LEO, bomb buildings/vehicles, rob shops or bank and many many more. Join us!
Symon is offline   Reply With Quote
Old 29/03/2020, 06:35 PM   #10
JasonRiggs
Gangsta
 
Join Date: Jul 2016
Location: My bedroom.
Posts: 824
Reputation: 52
Default Re: Problem interior

I don't know whether I understand your problem or not, but I believe if it's that the last house in the database doesn't have an interior it's about the loop you're making to load the data from sql you did like that..
PHP Code:
for(new 0rowsi++) 
Which means that the last row shall not be loaded as far as I believe try to make it like..
PHP Code:
for(new 0rows+1i++) 
__________________
JasonRiggs is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Interior problem Micko123 Scripting Help 8 18/11/2016 05:49 PM
0.3x Interior Problem Evoturk Scripting Help 7 06/02/2013 07:49 PM
Interior Problem Compton Help Archive 1 06/08/2011 03:03 PM
[HELP]Interior problem Lilcuete Help Archive 2 21/12/2010 06:34 PM
[HELP] Interior Problem r0v3r Help Archive 2 07/04/2009 02:11 PM


All times are GMT. The time now is 06:13 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.