Jump to content

[!!HELP!!]


Recommended Posts

  
function createMarker 
createMarker == "1007.3994140625" posY="2302.7998046875" posZ="12.10000038147" type="cylinder" .../> 
end 
  
local MarkerHit ( hitPlayer, matchingDimension ) 
    outputChatBox ( getPlayerName(hitPlayer) .. " entered a marker" ) 
end 
addEventHandler ( "onClientMarkerHit", getRootElement(), MarkerHit ) 
  
function myfirstwindow() 
local siwdth,sheight=guiGetScreenSize 
local width, height = 400,400 
local x = (swidth /2 ) - ( width/2) 
local y = (sheight/2) - (height /2) 
  
window1 = guiCreateWindow(x,y,width,height,"Go to the moon",false) 
guiWindowSetMoveable(window1,false) 
guiWindowSetSizeable(window1,false) 
window1button= guiCreatebutton(137,380,158,37,"Buy ticket",false,window1) 
if --i want you help me here " when player buy ticket then takePlayerMoney and open the gate 
window1label= guiCreateLabel(10,25,380,359,[[Welcome to the moon trip. the moon trip is wonderful trip full of mystery stuff and nice gravitation. if you like to trip pay 50,000$ nice trip.]], false , window1) 
guiLabelSetHorizontalAlign (window1label , "center",true) 
addEventHandler("onClientGUIClick",window1button,window1buttonresponse,false) 
end 
function window1buttonresponse(button,state) 
  
addEventHandler("onClientGUIClick",window1button, 
function (button,state) 
if button  =="left" and state =="up" then 
guiSetVisible(window1,false) 
showCursor(false) 
outputChatBox("Good bye") 
end) 
  
end 
  

i want when the player hit the marker then gui window show up and when he " buy ticket " then takePlayerMoney and open the gate

Marker position

x= 1007.3994140625

y=-2302.7998046875

z=12.10000038147

Gate position

x=1002.599609375

y=-2310.19921875

z=14.89999961853

gate rotation

x=0

y=0

z=295.99914550781

I hope script has no mistakes

Link to comment
Guest Guest4401
  
function createmarker 
createMarker == "1007.3994140625" posY="2302.7998046875" posZ="12.10000038147" type="cylinder" .../> 
end 

is that LUA?

Link to comment

You made this script? It does not exist:

function createMarker 
createMarker == "1007.3994140625" posY="2302.7998046875" posZ="12.10000038147" type="cylinder" .../> 
end 

createMarker() is a function, you must use it like the rest. The correct is:

function createMarker() --This function can not be called "createMarker". Use another name. 
createMarker(arg1, arg2, arg3 ...) 
end 

If you made that script, you'll understand what I'm saying. Otherwise, you must learn Lua first.

Link to comment

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

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