BriGhtx3 Posted April 6, 2012 Posted April 6, 2012 Hey, I try to create an area on the map so I use createRadarArea. Now I have the positions X,Y,X2,Y2 in my MySQL table and want to create it: grX = math.abs(x-x2) grY = math.abs(y-y2) areaID[i] = createRadarArea ( x,y, grX, grY, 0, 0, 0, 0 ) This is how I calculate the sizeX and sizeY, but the area is created to the wrong side (x,y is right)... Currently working on gamemodes : Reallife Script 70% Breakout Script 10%
drk Posted April 6, 2012 Posted April 6, 2012 Try not using math.abs. areaID[i] = createRadarArea ( x, y, x - x2, y - y2, 0, 0, 0, 0 ) EPT Team Server Development: 0% Learning C++ | C++ is amazing
BriGhtx3 Posted April 6, 2012 Author Posted April 6, 2012 still wrong Currently working on gamemodes : Reallife Script 70% Breakout Script 10%
Kenix Posted April 6, 2012 Posted April 6, 2012 Did you create request to mysql? Also use /debugscript 3 http://vk.com/the_kenix Вопросы задавайте на форуме, не пишите мне в личку. Please don't pm me.
BriGhtx3 Posted April 6, 2012 Author Posted April 6, 2012 There were no errors, but I got it. x2-x y2-y and not x-x2 y-y2 Currently working on gamemodes : Reallife Script 70% Breakout Script 10%
Kenix Posted April 6, 2012 Posted April 6, 2012 Check values, return function value, .. http://vk.com/the_kenix Вопросы задавайте на форуме, не пишите мне в личку. Please don't pm me.
BriGhtx3 Posted April 6, 2012 Author Posted April 6, 2012 I already got the right solution^^ Check my last post. Currently working on gamemodes : Reallife Script 70% Breakout Script 10%
Jaysds1 Posted April 6, 2012 Posted April 6, 2012 If the positions are in MySQL then your going to need to get them using: dbConnect() dbPoll --and dbQuery after getting the results, use dbFree to disconnect from the MySQL. My in-game name: Jaysds1 Retired CMG Scripter World Of Tanks GameMode (Open-Source): https://github.com/Jaysds1/mtasa-wot-gamemode Online GUI-Editor (WIP): https://forum.mtasa.com/topic/47678-online-gui-editor/
drk Posted April 6, 2012 Posted April 6, 2012 Second guy who post when he solved the problem LOL EPT Team Server Development: 0% Learning C++ | C++ is amazing
Jaysds1 Posted April 6, 2012 Posted April 6, 2012 Second guy who post when he solved the problem LOL oh, srry My in-game name: Jaysds1 Retired CMG Scripter World Of Tanks GameMode (Open-Source): https://github.com/Jaysds1/mtasa-wot-gamemode Online GUI-Editor (WIP): https://forum.mtasa.com/topic/47678-online-gui-editor/
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now