Jump to content

farm colshape.....


Deepu

Recommended Posts

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) 

Link to comment
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.

Link to comment
  • Moderators
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 ?).

Link to comment

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

Link to comment
  • Moderators
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.

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

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