-
Posts
3,267 -
Joined
-
Last visited
-
Days Won
7
Everything posted by Tete omar
-
Nice.. i 'll test my self in one and i 'll never ask here .. i 'll do it with my self and thanks : )
-
Thanks !!!!!!!!!!! it works !!!
-
Bro i put your code like that local Marker = createMarker ( 1007.4000244141, -2302.6999511719, 12.10000038147, "cylinder", 1.29999995, 255, 0, 0, 255 ) addEventHandler('onClientMarkerHit', Marker, function (hitPlayer) if (hitPlayer == localPlayer) then guiSetVisible(GUIEditor_Window[1], true) showCursor(true) end end) function CreateGUIWindow() GUIEditor_Window = {} GUIEditor_Button = {} GUIEditor_Memo = {} GUIEditor_Image = {} GUIEditor_Window[1] = guiCreateWindow(502,268,480,290,"Buy Ticket",false) GUIEditor_Image[1] = guiCreateStaticImage(240,20,229,261,"images/space.png",false,GUIEditor_Window[1]) GUIEditor_Button[1] = guiCreateButton(9,251,91,30,"Buy Ticket",false,GUIEditor_Window[1]) GUIEditor_Button[2] = guiCreateButton(155,251,69,30,"Exit",false,GUIEditor_Window[1]) GUIEditor_Memo[1] = guiCreateMemo(15,20,219,221,"=====|PlanetsTrip|=====\nWelcome to the\" Planets trip\", the moon trip is wonderful trip full of mystery stuff and nice gravitation,You'll find the absolute fun but try to find fun enough \nbecause time is only 10 minutes you will find above signs should find it in different areas, each one under 5k have a nice time\n====|Tickets|====\nMoon 50,000$\nMars 64,000$\nVenus 54,000$\nSaturn 75,000$\nMercury 35,000$=====|PlanetsTrip|====",false,GUIEditor_Window[1]) addEventHandler("onClientGUIClick", GUIEditor_Button[2], DestroyWindow, false) end addEventHandler("onClientResourceStart", getRootElement(), CreateGUIWindow) guiSetVisible(GUIEditor_Window[1], false) function DestroyWindow() destroyElement(GUIEditor_Window[1]) end the exit window works but when the window disappear i can't move .. is that guiSetVisible ?
-
Here's the script local Marker = createMarker ( 1007.4000244141, -2302.6999511719, 12.10000038147, "cylinder", 1.29999995, 255, 0, 0, 255 ) addEventHandler('onClientMarkerHit', Marker, function (hitPlayer) if (hitPlayer == localPlayer) then guiSetVisible(GUIEditor_Window[1], true) showCursor(true) end end) GUIEditor_Window = {} GUIEditor_Button = {} GUIEditor_Memo = {} GUIEditor_Image = {} GUIEditor_Window[1] = guiCreateWindow(502,268,480,290,"Buy Ticket",false) GUIEditor_Image[1] = guiCreateStaticImage(240,20,229,261,"images/space.png",false,GUIEditor_Window[1]) GUIEditor_Button[1] = guiCreateButton(9,251,91,30,"Buy Ticket",false,GUIEditor_Window[1]) GUIEditor_Button[2] = guiCreateButton(155,251,69,30,"Exit",false,GUIEditor_Window[1]) GUIEditor_Memo[1] = guiCreateMemo(15,20,219,221,"=====|PlanetsTrip|=====\nWelcome to the\" Planets trip\", the moon trip is wonderful trip full of mystery stuff and nice gravitation,You'll find the absolute fun but try to find fun enough \nbecause time is only 10 minutes you will find above signs should find it in different areas, each one under 5k have a nice time\n====|Tickets|====\nMoon 50,000$\nMars 64,000$\nVenus 54,000$\nSaturn 75,000$\nMercury 35,000$=====|PlanetsTrip|====",false,GUIEditor_Window[1])
-
Bad argument @ 'destroyElement'
-
How do i put destroyElement in GUIEditor_Button[2] = guiCreateButton(155,251,69,30,"Exit",false,GUIEditor_Window[1]) is that an argument or something ?.
-
Take it and don't worry call ( getResourceFromName ( "scoreboard" ), "scoreboardAddColumn", "Online" ) addEventHandler ( "onResourceStart" , resourceRoot , function ( ) for index , player in ipairs ( getElementsByType ( "player" ) ) do local pAccount = getPlayerAccount ( player ) if not isGuestAccount ( pAccount ) then local minutes = getAccountData ( pAccount , "Online.minutes" ) if minutes then local hours = getAccountData ( pAccount , "Online.hours" ) if # tostring ( minutes ) == 1 then minutes = "0" .. minutes end if # tostring ( hours ) == 1 then hours = "0" .. hours end setElementData ( player , "Online" , hours .. ":" .. minutes .. "" ) local timer = setTimer ( updatePlayerOnline , 60000 , 1 , player ) setElementData ( player , "Online.timer" , timer ) else setAccountData ( pAccount , "Online.minutes" , 0 ) setAccountData ( pAccount , "Online.hours" , 0 ) setElementData ( player , "Online" , " 00:00 " ) local timer = setTimer ( updatePlayerOnline , 60000 , 1 , player ) setElementData ( player , "Online.timer" , timer ) end else setElementData ( player , "Online" , "N/A" ) end end end ) addEventHandler ( "onResourceStop" , resourceRoot , function ( ) for index , player in ipairs ( getElementsByType ( "player" ) ) do local pAccount = getPlayerAccount ( player ) if not isGuestAccount ( pAccount ) then local timer = getElementData ( player , "Online.timer" ) if isTimer ( timer ) then killTimer ( timer ) end end end end ) addEventHandler ( "onPlayerLogin" , root , function ( _ , pAccount ) local minutes = getAccountData ( pAccount , "Online.minutes" ) if minutes then local hours = getAccountData ( pAccount , "Online.hours" ) if # tostring ( minutes ) == 1 then minutes = "0" .. minutes end if # tostring ( hours ) == 1 then hours = "0" .. hours end setElementData ( source , "Online" , hours .. ":" .. minutes .. "" ) local timer = setTimer ( updatePlayerOnline , 60000 , 1 , source ) setElementData ( source , "Online.timer" , timer ) else setAccountData ( pAccount , "Online.minutes" , 0 ) setAccountData ( pAccount , "Online.hours" , 0 ) setElementData ( source , "Online" , " 00:00 " ) local timer = setTimer ( updatePlayerOnline , 60000 , 1 , source ) setElementData ( source , "Online.timer" , timer ) end end ) addEventHandler ( "onPlayerLogout" , root , function ( pAccount ) local timer = getElementData ( source , "Online.timer" ) if isTimer ( timer ) then killTimer ( timer ) end end ) addEventHandler ( "onPlayerJoin" , root , function ( ) setElementData ( source , "Online" , "N/A" ) end ) addEventHandler ( "onPlayerQuit" , root , function ( ) local pAccount = getPlayerAccount ( source ) if not isGuestAccount ( pAccount ) then local timer = getElementData ( source , "Online.timer" ) if isTimer ( timer ) then killTimer ( timer ) end end end ) function updatePlayerOnline ( player ) local pAccount = getPlayerAccount ( player ) local minutes = getAccountData ( pAccount , "Online.minutes" ) local hours = getAccountData ( pAccount , "Online.hours" ) minutes = tostring ( tonumber ( minutes ) + 1 ) if minutes == "60" then hours = tostring ( tonumber ( hours ) + 1 ) minutes = "00" end setAccountData ( pAccount , "Online.minutes" , tonumber ( minutes ) ) setAccountData ( pAccount , "Online.hours" , tonumber ( hours ) ) if # tostring ( minutes ) == 1 then minutes = "0" .. minutes end if # tostring ( hours ) == 1 then hours = "0" .. hours end setElementData ( player , "Online" , hours .. ":" .. minutes .. "" ) local timer = setTimer ( updatePlayerOnline , 60000 , 1 , player ) setElementData ( player , "Online.timer" , timer ) end
-
Problem has fixed thanks all
-
But i have a little problem with space.png picture GUIEditor_Image[1] = guiCreateStaticImage(240,20,229,261,"images/space.png",false,GUIEditor_Window[1]) Meta.xml "#minplayers" value="[ 0 ]"/> "#maxplayers" value="[ 128 ]"/> "#gravity" value="[ 0.008000 ]"/> "#weather" value="[ 0 ]"/> "#time" value="12:0"/> "#locked_time" value="[ false ]"/> "#waveheight" value="[ 0 ]"/> "#gamespeed" value="[ 1 ]"/> "map/saro5.map" dimension="0" /> It says could'nt find file images/space.png for resource guieditor ... i've put space.png into images and it stored with the gamemode
-
The same error
-
local Marker = createMarker ( 1007.4000244141, -2302.6999511719, 12.10000038147, "cylinder", 1.29999995, 255, 0, 0, 0 ) addEventHandler('onClientMarkerHit', Marker, function ( hitPlayer ) if ( hitPlayer == localPlayer ) then guiSetVisible( Window, true ) showCursor( true ) end end ) GUIEditor_Window = {} GUIEditor_Button = {} GUIEditor_Memo = {} GUIEditor_Image = {} GUIEditor_Window[1] = guiCreateWindow(502,268,480,290,"Buy Ticket",false) GUIEditor_Image[1] = guiCreateStaticImage(240,20,229,261,"images/space.png",false,GUIEditor_Window[1]) GUIEditor_Button[1] = guiCreateButton(9,251,91,30,"Buy Ticket",false,GUIEditor_Window[1]) GUIEditor_Button[2] = guiCreateButton(155,251,69,30,"Exit",false,GUIEditor_Window[1]) GUIEditor_Memo[1] = guiCreateMemo(15,20,219,221,"=====|PlanetsTrip|=====\nWelcome to the\" Planets trip\", the moon trip is wonderful trip full of mystery stuff and nice gravitation,You'll find the absolute fun but try to find fun enough \nbecause time is only 10 minutes you will find above signs should find it in different areas, each one under 5k have a nice time\n====|Tickets|====\nMoon 50,000$\nMars 64,000$\nVenus 54,000$\nSaturn 75,000$\nMercury 35,000$=====|PlanetsTrip|====",false,GUIEditor_Window[1]) guiSetVisible(GUIEditor_Window[1], false) failed .. when i test it, it says Marker.lua : 5 : ' ( ' expected near 'GUIEditor_Window' But i want to know the difference between expected and unexpected Warnings thank you.
-
Shadow i was made it by guieditor take a look GUIEditor_Window = {} GUIEditor_Button = {} GUIEditor_Memo = {} GUIEditor_Image = {} GUIEditor_Window[1] = guiCreateWindow(502,268,480,290,"Buy Ticket",false) GUIEditor_Image[1] = guiCreateStaticImage(240,20,229,261,"images/space.png",false,GUIEditor_Window[1]) GUIEditor_Button[1] = guiCreateButton(9,251,91,30,"Buy Ticket",false,GUIEditor_Window[1]) GUIEditor_Button[2] = guiCreateButton(155,251,69,30,"Exit",false,GUIEditor_Window[1]) GUIEditor_Memo[1] = guiCreateMemo(15,20,219,221,"=====|PlanetsTrip|=====\nWelcome to the\" Planets trip\", the moon trip is wonderful trip full of mystery stuff and nice gravitation,You'll find the absolute fun but try to find fun enough \nbecause time is only 10 minutes you will find above signs should find it in different areas, each one under 5k have a nice time\n====|Tickets|====\nMoon 50,000$\nMars 64,000$\nVenus 54,000$\nSaturn 75,000$\nMercury 35,000$=====|PlanetsTrip|====",false,GUIEditor_Window[1]) addEventHandler('guiSetVisible') And i think it's not alright :\
-
Where is these scripts ?
-
I read it about 41 times each day and i still don't understand
-
GUIEditor by R3mp : viewtopic.php?f=108&t=22831 https://community.multitheftauto.com/index.php?p= ... ils&id=141 I've done creating of the window i want to put it into a marker hit how ?
-
Thanks for all !!!!!!!!!!!!!!!!!!!!1
-
Any gui window creator which make of creating gui windows easily?
-
I must some one learn me lua because Wiki and LUA.org hard explanation if someone want learn me please add me email removed Remember " Wiki and LUA | hard explanation |
-
If you use /debugscript 3 it's said to you about syntax error. I did it, Thanks ! it show all my line errors thanks
-
function checkmoney(thePlayer, command) local money = getPlayerMoney(thePlayer) if (money > 199999) then outputChatBox("#FFFF00Your money stat: #00ff00You are rich ! $" .. tonumber(money), thePlayer,255,255,255,true) else if (money > 999999) then outputChatBox("#FFFF00Your money stat: #00ff00You are so rich ! $$" .. tonumber(money), thePlayer,255,255,255,true) else outputChatBox("#FFFF00Your money stat: #FF0000You are poor (Be serious in work) ", thePlayer,255,255,255,true) end end addCommandHandler("checkmoney", checkmoney) Doesn't run I want it rich,so rich,poor
-
I can't understand or i need you learn me correctly email removed I joined the links i don't understand any thing sorry
-
function createMarker "1007.3994140625" posY="2302.7998046875" posZ="12.10000038147" type="cylinder" .../> end How about it ?
-
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