Jump to content

FlorjanMTARP

Members
  • Posts

    56
  • Joined

  • Last visited

About FlorjanMTARP

  • Birthday 22/07/1998

Details

  • Gang
    www.mta-roleplay.com
  • Location
    Slovenia
  • Occupation
    School

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

FlorjanMTARP's Achievements

Snitch

Snitch (10/54)

0

Reputation

  1. What was the problem If I may ask? I am also working on a similar browser but the video never starts from youtube.-.
  2. FlorjanMTARP

    MTA 1.4

    Happens to me either! This will probably get fixed in the upcoming version of MTA.
  3. Lately I was messing with gui editor and I have figured out an awesome idea. The only problem is I don't know how to deal with it. What I want to do: I've made a gui with Tab Panels "Types of Horns" , won't say them all. Well, I want to allow players to buy a horn and once they buy it it will setElementData that the system knows that he bought it. Means, If he reconnects he will still have that one. I JUST NEED AN EXAMPLE, NOR A COMPLETE SCRIPT! Don't worry about sounds, Just if you are willing to edit my code below please write everything. I know how to edit stuff and also deal with stuff GUIEditor = { tab = {}, staticimage = {}, tabpanel = {}, label = {}, button = {}, window = {} } addEventHandler("onClientResourceStart", resourceRoot, function() GUIEditor.window[1] = guiCreateWindow(286, 183, 798, 473, "StoryRoam - Horn Shop", false) guiWindowSetSizable(GUIEditor.window[1], false) guiSetProperty(GUIEditor.window[1], "CaptionColour", "FFFF9100") GUIEditor.staticimage[1] = guiCreateStaticImage(10, 19, 259, 98, ":SRcameras/STORYROAMLOGO.png", false, GUIEditor.window[1]) GUIEditor.label[1] = guiCreateLabel(8, 118, 271, 209, "Information:\n\nThe StoryRoam's horn shop is another cool\n feature which allows you to spend money\n on cool and funny horns.\n You can have fun with your friends or just beep\n all over the map \"{SMILIES_PATH}/icon_smile.gif\" alt=\"\" title=\"Smile\" />\n\nThe list next to this text is a list of available horns\n. Each horn has It's lenght and\n the lenght depends on the\n price.\n\nHave fun!", false, GUIEditor.window[1]) guiSetFont(GUIEditor.label[1], "default-bold-small") guiLabelSetColor(GUIEditor.label[1], 255, 145, 0) GUIEditor.tabpanel[1] = guiCreateTabPanel(283, 23, 505, 440, false, GUIEditor.window[1]) GUIEditor.tab[1] = guiCreateTab("Loud Horns", GUIEditor.tabpanel[1]) GUIEditor.button[1] = guiCreateButton(12, 398, 103, 18, "", false, GUIEditor.tab[1]) GUIEditor.button[2] = guiCreateButton(26, 27, 120, 55, "AFRO CIRCUS", false, GUIEditor.tab[1]) guiSetFont(GUIEditor.button[2], "default-bold-small") GUIEditor.button[3] = guiCreateButton(132, 55, 68, 15, "", false, GUIEditor.button[2]) GUIEditor.button[4] = guiCreateButton(190, 27, 121, 55, "AAAAAAAA", false, GUIEditor.tab[1]) guiSetFont(GUIEditor.button[4], "default-bold-small") GUIEditor.button[5] = guiCreateButton(363, 29, 119, 53, "GTASA Song", false, GUIEditor.tab[1]) guiSetFont(GUIEditor.button[5], "default-bold-small") GUIEditor.tab[2] = guiCreateTab("Funny Horns", GUIEditor.tabpanel[1]) GUIEditor.button[6] = guiCreateButton(27, 21, 121, 50, "HAH GAY!", false, GUIEditor.tab[2]) guiSetFont(GUIEditor.button[6], "default-bold-small") GUIEditor.button[7] = guiCreateButton(186, 21, 124, 50, "BARBIE GIRL", false, GUIEditor.tab[2]) guiSetFont(GUIEditor.button[7], "default-bold-small") GUIEditor.button[8] = guiCreateButton(361, 21, 113, 50, "SEXY MAN", false, GUIEditor.tab[2]) guiSetFont(GUIEditor.button[8], "default-bold-small") GUIEditor.tab[3] = guiCreateTab("Animal Horns", GUIEditor.tabpanel[1]) GUIEditor.button[9] = guiCreateButton(32, 26, 131, 53, "COW", false, GUIEditor.tab[3]) guiSetFont(GUIEditor.button[9], "default-bold-small") GUIEditor.button[10] = guiCreateButton(205, 25, 135, 54, "DOG", false, GUIEditor.tab[3]) guiSetFont(GUIEditor.button[10], "default-bold-small") GUIEditor.button[11] = guiCreateButton(376, 24, 111, 55, "CHICKEN", false, GUIEditor.tab[3]) guiSetFont(GUIEditor.button[11], "default-bold-small") GUIEditor.tab[4] = guiCreateTab("Music Horns", GUIEditor.tabpanel[1]) GUIEditor.button[12] = guiCreateButton(35, 28, 132, 57, "CALL ME MAYBE", false, GUIEditor.tab[4]) guiSetFont(GUIEditor.button[12], "default-bold-small") end ) Peace up!
  4. I've been dealing with this guiSetVisible for 30min .
  5. I removed it because when It was wrote, The GUI was just showing all the time. So there weren't any solutions and I've also tried renaming the marker, probably. I want it to popup onClientMarkerHit. <- Not to be rude
  6. Please before you comment stuff, you should know that I am 13 years old and I'm a web programmer (decent) HTML,CSS and PHP. I want to get to known Lua since I'm also helping my friend make a server. I've used GUI Editor to make a GUI for an upcoming Garage System and when I enter the marker nothing shows up. No errors, No outputs, nothing. --[[------------------------------------------------- Notes: > This code is using a relative image filepath. This will only work as long as the location it is from always exists, and the resource it is part of is running. To ensure it does not break, it is highly encouraged to move images into your local resource and reference them there. --]]------------------------------------------------- marker = createMarker(-2547.4677734375, 648.90625, 26.8125, "cylinder", 2, 255, 145, 0, 255) GUIEditor.window[1] = guiCreateWindow(393, 175, 584, 428, "StoryRoam - Garage System", false) guiWindowSetSizable(GUIEditor.window[1], false) guiSetProperty(GUIEditor.window[1], "CaptionColour", "FFFF9100") GUIEditor.staticimage[1] = guiCreateStaticImage(13, 23, 142, 146, ":SRhousing/images/script/house_.png", false, GUIEditor.window[1]) GUIEditor.label[1] = guiCreateLabel(163, 37, 402, 16, "Here you may buy a garage and store your vehicles inside it.", false, GUIEditor.window[1]) guiSetFont(GUIEditor.label[1], "default-bold-small") guiLabelSetColor(GUIEditor.label[1], 255, 145, 0) GUIEditor.label[2] = guiCreateLabel(162, 54, 403, 18, "There is no annoying confirm buttons so It's simple to buy a garage!", false, GUIEditor.window[1]) guiSetFont(GUIEditor.label[2], "default-bold-small") guiLabelSetColor(GUIEditor.label[2], 255, 145, 0) GUIEditor.label[3] = guiCreateLabel(160, 72, 405, 15, "If you are interested in buying a garage then just click buttons below. \"{SMILIES_PATH}/icon_smile.gif\" alt=\"\" title=\"Smile\" />", false, GUIEditor.window[1]) guiSetFont(GUIEditor.label[3], "default-bold-small") guiLabelSetColor(GUIEditor.label[3], 255, 145, 0) GUIEditor.label[4] = guiCreateLabel(156, 86, 409, 15, "___________________________________________________________________________________", false, GUIEditor.window[1]) guiSetFont(GUIEditor.label[4], "default-bold-small") guiLabelSetColor(GUIEditor.label[4], 255, 145, 0) GUIEditor.label[5] = guiCreateLabel(52, 169, 143, 15, "Information", false, GUIEditor.window[1]) guiSetFont(GUIEditor.label[5], "default-bold-small") guiLabelSetColor(GUIEditor.label[5], 255, 145, 0) GUIEditor.label[6] = guiCreateLabel(20, 186, 140, 219, "\nType: Regular Garage\n\nPrice: 45,000$\n\nCapacity: 2 Vehicles\n____________________________________\n", false, GUIEditor.window[1]) guiSetFont(GUIEditor.label[6], "default-bold-small") guiLabelSetColor(GUIEditor.label[6], 255, 145, 0) GUIEditor.button[1] = guiCreateButton(13, 361, 157, 29, "Buy Garage", false, GUIEditor.window[1]) guiSetFont(GUIEditor.button[1], "default-bold-small") guiSetProperty(GUIEditor.button[1], "NormalTextColour", "FFFF9100") GUIEditor.button[2] = guiCreateButton(195, 359, 180, 31, "Exit", false, GUIEditor.window[1]) guiSetFont(GUIEditor.button[2], "default-bold-small") guiSetProperty(GUIEditor.button[2], "NormalTextColour", "FFFF9100") GUIEditor.button[3] = guiCreateButton(388, 359, 167, 31, "Enter the garage", false, GUIEditor.window[1]) guiSetFont(GUIEditor.button[3], "default-bold-small") guiSetProperty(GUIEditor.button[3], "NormalTextColour", "FFFF9100") GUIEditor.staticimage[2] = guiCreateStaticImage(421, 288, 93, 61, ":SRhousing/images/script/icon_enter.png", false, GUIEditor.window[1]) GUIEditor.staticimage[3] = guiCreateStaticImage(47, 295, 85, 56, ":SRhousing/images/script/icon_buy.png", false, GUIEditor.window[1]) GUIEditor.staticimage[4] = guiCreateStaticImage(235, 296, 90, 47, ":SRhousing/images/script/icon_destroy.png", false, GUIEditor.window[1]) GUIEditor.label[7] = guiCreateLabel(154, 99, 16, 174, "|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n", false, GUIEditor.window[1]) guiSetFont(GUIEditor.label[7], "default-bold-small") guiLabelSetColor(GUIEditor.label[7], 255, 145, 0) GUIEditor.label[8] = guiCreateLabel(159, 99, 406, 164, "\n\nQuestions & Answers\n\n-Why would I buy a garage?\nTo store your vehicles and have them safe \"{SMILIES_PATH}/icon_smile.gif\" alt=\"\" title=\"Smile\" />\n-Do I get refunds If I buy it by accident?\nOfcourse you do!\n-Will I receive any rewards for reporting bugs?\nYes, You will be money rewarded or anything.", false, GUIEditor.window[1]) guiSetFont(GUIEditor.label[8], "default-bold-small") guiLabelSetColor(GUIEditor.label[8], 255, 145, 0) function close() if (source == GUIEditor.button[2]) then guiSetVisible(GUIEditor.window[1],false) showCursor(false) end end addEventHandler("onClientGUIClick", GUIEditor.button[2], close) function showgui (hitElement) if getElementType(hitElement) == "player" and (hitElement == localPlayer) then if not guiGetVisible(GUIEditor.window[1]) then guiSetVisible(GUIEditor.window[1], true) showCursor(true) end end end addEventHandler("onClientMarkerHit", marker, showgui) function showguil (leaveElement) if getElementType(leaveElement) == "player" and (leaveElement == localPlayer) then if guiGetVisible(GUIEditor.window[1]) then guiSetVisible(GUIEditor.window[1], false) showCursor(false) end end end addEventHandler("onClientMarkerLeave", marker, showguil) peace... It's client sided.
  7. I know tosfera and thanks Solidsnake. Tosfera I made some cool scripts already and I want to work better from now. Thanks giuseppe.
  8. Thank you Solidsnake, I appreciate yourhelp. AND ALSO Thanks Saml1er. EDIT) It does nothing ingame when I use LMB or RMB on another player. I've set it clientsided.
  9. Saml1er thank you but do I have to create the ped firstly?
  10. I was wondering for the past few days, how to make a GUI show up when you right click a ped? Are there any resources samples? Sincerely, Florjan.
  11. Well title says it. The first GUI that shows in marker; --------------------------||Open Source||-------------------------- ------------------------------------------------------------------- function createHauptGUI() local X = 0.3 local Y = 0.7 local Width = 0.4 local Height = 0.17 HauptGUI = guiCreateWindow(X, Y, Width, Height,"Garage Menu", true) X = 0.5 Y = 0.5 Width = 0.45 Height = 0.4 btnmyGarages = guiCreateButton(X, Y, Width, Height, "Own Garage", true, HauptGUI) X = 0.03 Y = 0.5 Width = 0.45 Height = 0.4 btnfreeGarages = guiCreateButton(X, Y, Width, Height, "Not Owned Garages", true, HauptGUI) X = 0.9 Y = 0.3 Width = 0.05 Height = 0.15 btnclose = guiCreateButton(X, Y, Width, Height, "X", true, HauptGUI) addEventHandler("onClientGUIClick", btnmyGarages, cmyGUI, false) addEventHandler("onClientGUIClick", btnfreeGarages, cfreeGUI, false) addEventHandler("onClientGUIClick", btnclose, clientHauptclose, false) end function cmyGUI() guiSetVisible(HauptGUI, false) triggerServerEvent ( "onmyGUI", localPlayer) end function cfreeGUI() guiSetVisible(HauptGUI, false) triggerServerEvent ( "onfreeGUI", localPlayer) end function clientHauptclose() guiSetVisible(HauptGUI, false) setCameraTarget ( localPlayer ) setElementFrozen ( localPlayer, false ) setPlayerHudComponentVisible ( "radar", true ) end function clientbuy(thePlayer) Index, b =guiGridListGetSelectedItem ( Garagenliste ) triggerServerEvent ( "buy",localPlayer, Index ) end function cHauptGUI() createHauptGUI(thePlayer) setCameraMatrix(1631.8000488281, -1070.9000244141, 41, 1593, -1026, 30) setElementFrozen ( localPlayer, true ) setPlayerHudComponentVisible ( "radar", false ) end addEvent( "onMarkerHit", true ) addEventHandler( "onMarkerHit" ,getRootElement(), cHauptGUI, thePlayer) If you want other GUIs just tell me in the topic.
  12. It still doesn't go up, neither down. I get in the marker and nothing happens. No errors and stuff. server: local gate = createObject(17951, 1556.36, -2348.79, 13.54, 0, 0, 180) local marker = createMarker(1554, -2348.79, 12.54, "cylinder", 2, 255, 255, 255, 255) local garage = createObject(17950, 1560.36, -2348.79, 13.54, 0, 0, 90) addEventHandler ( 'onPlayerMarkerHit', marker, function ( ) if ( getAccountName(getPlayerAccount(source)) == 'Florjan22') then moveObject(gate, 5000, 1556.36, -2348.79, 16.54) end end ) addEventHandler ( 'onPlayerMarkerLeave', marker, function ( ) if ( getAccountName(getPlayerAccount(source)) == 'Florjan22') then moveObject(gate, 5000, 1556.36, -2348.79, 13.54) end end )
  13. It does nothing doesn't work, I go in marker and I'm logged in and won't work. local gate = createObject(17951, 1556.36, -2348.79, 13.54, 0, 0, 180) local marker = createMarker(1554, -2348.79, 12.54, "cylinder", 2, 255, 255, 255, 255) local garage = createObject(17950, 1560.36, -2348.79, 13.54, 0, 0, 90) function moveGate() if getAccountName(getPlayerAccount(source)) == "Florjan22" then moveObject(gate, 5000, 1556.36, -2348.79, 16.54) end end addEventHandler("onPlayerMarkerHit", marker, moveGate) function moveBack() if getAccountName(getPlayerAccount(source)) == "Florjan22" then moveObject(gate, 5000, 1556.36, -2348.79, 13.54) end end addEventHandler("onPlayerMarkerHit", marker, moveBack)
  14. Client; local gate = createObject(17951, 1556.36, -2348.79, 13.54, 0, 0, 180) local marker = createMarker(1554, -2348.79, 12.54, "cylinder", 2, 255, 255, 255, 255) local garage = createObject(17950, 1560.36, -2348.79, 13.54, 0, 0, 90) function moveGate() if getAccountName(getPlayerAccount(player)) == "Florjan22" then moveObject(gate, 5000, 1556.36, -2348.79, 16.54) end end addEventHandler("onMarkerHit", marker, moveGate) function moveBack() moveObject(gate, 5000, 1556.36, -2348.79, 13.54) end addEventHandler("onMarkerLeave", marker, moveBack) It doesn't move when I enter the marker
×
×
  • Create New...