No....
Its not like this...
Like this :
Blips = function()
NAME = BlipAddXYZ(ID,X,Y,Z)
end
Updater = function()
PlayerGetPosXYZ()
end
Condition = function()
if PedInRectangle(gPlayer,X1,Y1,X2,Y2) then
CODE HERE
elseif PedInRectangle(gPlayer,X1,Y1,X2,Y2) and IsButtonBeingPressed(ID,ID) then
CODE HERE
end
end
main = function()
Blips()
repeat
Updater()
Condition()
Wait(0)
until not Alive
end
end
Note : X1,Y1,X2,Y2 in the PedInRectangle() are the coords you want the player to be in to active the code.
It creates a round shape, which means if the player is between X1,Y1,X2, and Y2 the code will be activated.
Example :
if PedInRectangle(gPlayer,5,2,1,3) then
If I will go ingame and be between the coords 5, 2, 1, and 3, the code will run.