Jump to content

farm colshape.....


Deepu

Recommended Posts

Posted

guyz you know the big farm in mta? ----->-1195, -1063.5, 129.19999694824

can u make a colRectangle there? It should cover the whole farm

Please I need it

Posted

You have 58% progress of 'lua' in your signature, i am pretty sure you should know mcuh about maths in it by then, plus you should know the basics which include col shape making and for last, we are not here to make you free scripts/script parts.

Posted

yeah I did the maths theorem of lines difference and pythagorean theorem

still the height and width are correct

but the script dont work

Posted
local x1 = -1195 
local y1 = -1063.5 
local x2 = -1003.200012207 
local y2 = -1065.5999755859 
width, height = ( x2 - x1 ), ( y2 - y1 ) 
  
bigCol = createColRectangle(x1, y1, x2, y2, width, height) 
fappa = createBlipAttachedTo(bigCol, 55) 
  
function theThing (hitElement) 
   if hitElement == localPlayer then 
   outputChatBox("yeah! this is the col shape", thePlayer, 255, 2, 0, false) 
   end 
end 
addEventHandler("onClientColShapeHit", bigCol, theThing) 

Posted

lol,

there is no fx2 or smth like that.

Did you even read the wiki ?

fX: The X position of the collision rectangle's west side

fY: The Y position of the collision rectangle's south side

delete the x2 and y2, and the width height for e.g.: 100,10 ...

Posted
I guess you don't want to do what I said, so, you just set the height and width to what you want, until it fits what you need.

Could you please read the wiki ?

Posted

you think I absent mindedly come here? No son, I read wiki and got confused

PS: if you can help please help me by making the colshape or fixing error and if you want +1 post please dont post

Posted

LOL

What do you think am i doin' at this moment ?

You just don't want to understand me.

there is no parameter like x2 or y2.

you should delete them and just set

  
x1 = ... 
y1 = ... 
bigCol = createColRectangle(x1, y1,100, 100) 

Posted

100?

You mean 100s gonna cure the problem?

I just want the whole farm to be colshaped.......

k I will try my steps and if dont work then I do something MYSELF ! ****

Posted

Hahahahaha you might feel I am an idiot and cant make a simple col shape but look this....

I made it x1 and y1 and the col shape spawns like in 1 point

Maybe smaller than 1m (ingame)

Posted
Hahahahaha you might feel I am an idiot and cant make a simple col shape but look this....

I made it x1 and y1 and the col shape spawns like in 1 point

Maybe smaller than 1m (ingame)

guyz you know the big farm in mta? ----->-1195, -1063.5, 129.19999694824

can u make a colRectangle there? It should cover the whole farm

Please I need it

No, i know you can't do it.

And i just want to help you.

you could set yourself to developmode to see the colshape.

Posted

I can't do it? Do what?

Firstly, in wiki the height and width ain't clearly mentioned.

Secondly, I can make anything unless and until its explained clearly.

Thirdly, You ain't trying to help me

btw whats develop mode 0_o never heard of it

  • Moderators
Posted
local x1 = -1195 
local y1 = -1063.5 
local x2 = -1003.200012207 
local y2 = -1065.5999755859 
width, height = ( x2 - x1 ), ( y2 - y1 ) 
  
bigCol = createColRectangle(x1, y1, x2, y2, width, height) 
fappa = createBlipAttachedTo(bigCol, 55) 
  
function theThing (hitElement) 
   if hitElement == localPlayer then 
   outputChatBox("yeah! this is the col shape", thePlayer, 255, 2, 0, false) 
   end 
end 
addEventHandler("onClientColShapeHit", bigCol, theThing) 

I know you already solved the problem but you both didn't what was the problem and here it is:

local y1 = -1063.5 
local y2 = -1065.5999755859 

As you can see, the y2 is too close from the y1 (only 2 meters, which is really small in GTA SA).

Your code would work if you had the right position for y2 (or maybe y1 ?).

Posted

nah that worked citizen....

Problem was that the height was wrong cuz I took y2-y1 as height where the lines become collinear also proven that by the distance formula AB = root(y2-y1whole square + x2-x1whole square)

and y2-y1 aint the height as per mta sa axis

  • Moderators
Posted
nah that worked citizen....

Problem was that the height was wrong cuz I took y2-y1 as height where the lines become collinear also proven that by the distance formula AB = root(y2-y1whole square + x2-x1whole square)

and y2-y1 aint the height as per mta sa axis

I didn't get what you said, but what I tried to say is that your original code would work with these values:

local x1 = -1195 
local y1 = -1063.5 
local x2 = -1003.2 
local y2 = -1163.5 

Since it was a rectangle, there is nothing complicated, I dunno why you talked about a formula with roots in it.

Posted

You could just get the ColShape Editor if you're having trouble with the calculations to get a visual feedback on the size of the ColShape.

The ColShape Editor is however extremely awkward to use.

Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...