Jump to content

Rotti

Members
  • Posts

    61
  • Joined

  • Last visited

Everything posted by Rotti

  1. Hello! I want t script a car dealer. When you buy a car you should be warped into the Vehicle. But that doesn't works... Serverside script function Faggio_buy (ThePlayer) local Faggio = createVehicle(462, -2600, 2268, setTimer(warpPedIntoVehicle, 50, 1, ThePlayer, Faggio) end function Perennial_buy (thePlayer) local Perennial = createVehicle(404, -2600, 2268, setTimer(warpPedIntoVehicle, 50, 1, ThePlayer, Perennial) end function Walton_buy (thePlayer) local Walton = createVehicle(478, -2600, 2268, setTimer(warpPedIntoVehicle, 50, 1, ThePlayer, Walton) end function Tampa_buy (thePlayer) local Tampa = createVehicle(549, -2600, 2268, setTimer(warpPedIntoVehicle, 50, 1, ThePlayer, Faggio) end addEvent("Faggio", true) addEvent("Perennial", true) addEvent("Walton", true) addEvent("Tampa", true) addEventHandler("Faggio",getRootElement (), Faggio_buy) addEventHandler("Perennial", getRootElement (), Perennial_buy) addEventHandler("Walton", getRootElement (), Walton_buy) addEventHandler("Tampa", getRootElement (), Tampa_buy) Clientside script Window = guiCreateWindow(583, 409, 197, 327, "Fake Cars", false) guiWindowSetSizable(Window, false) guiSetVisible(Window, false) Faggio = guiCreateButton(9, 96, 117, 33, "Faggio", false, Window) Perennial = guiCreateButton(9, 131, 117, 35, "Perennial", false, Window) Walton = guiCreateButton(9, 169, 118, 34, "Walton", false, Window) Tampa = guiCreateButton(9, 206, 118, 34, "Tampa", false, Window) AutoWahlenLabel = guiCreateLabel(30, 57, 139, 15, "Bitte wähle ein Auto aus", false, Window) Abbrechen = guiCreateButton(10, 288, 177, 29, "Abbrechen", false, Window) OderMochtestDu = guiCreateLabel(39, 269, 117, 15, "Oder möchtest du...", false, Window) lable1 = guiCreateLabel(131, 104, 52, 15, "500$", false, Window) guiLabelSetColor(lable1, 23, 132, 5) PerennialPreis = guiCreateLabel(131, 141, 53, 15, "2000$", false, Window) guiLabelSetColor(PerennialPreis, 23, 132, 5) WaltonPreis = guiCreateLabel(132, 181, 55, 15, "1500$", false, Window) guiLabelSetColor(WaltonPreis, 23, 132, 5) TampaPreis = guiCreateLabel(131, 218, 56, 15, "750$", false, Window) guiLabelSetColor(TampaPreis, 23, 132, 5) function Fake_Cars_show() local IsWindowVisible = guiGetVisible(Window) if (IsWindowVisible == true) then guiSetVisible(Window, false) guiSetInputEnabled(false) elseif (IsWindowVisible == false) then guiSetVisible(Window, true) guiSetInputEnabled(true) end end local myMarker = createMarker(-2615, 2262, 7.3, "cylinder", 1.0, 255, 0, 0, 150) addEventHandler("onClientMarkerHit", myMarker, function(player) if getElementType(player) == "player" and player == localPlayer then Fake_Cars_show() end end) function Buttons(state) if state == "left" then if source == Abbrechen then Fake_Cars_show() end if source == Faggio then money = getPlayerMoney() if (money > 499) then triggerServerEvent("Faggio", getRootElement() ) takePlayerMoney(500) else outputChatBox("Du hast nicht genügend Geld.") end end if source == Perennial then money = getPlayerMoney() if (money > 1999) then triggerServerEvent("Perennial", getRootElement() ) takePlayerMoney(2000) else outputChatBox("Du hast nicht genügend Geld.") end end if source == Walton then money = getPlayerMoney() if (money > 1499) then triggerServerEvent("Walton", getRootElement() ) takePlayerMoney(1500) else outputChatBox("Du hast nicht genügend Geld.") end end if source == Tampa then money = getPlayerMoney() if (money > 749) then triggerServerEvent("Tampa", getRootElement() ) takePlayerMoney(750) else outputChatBox("Du hast nicht genügend Geld.") end end end end addEventHandler("onClientGUIClick", root, Buttons) Don't worry about the :0. It's just because it should sell the Motorcycle F a g g i o. And this Website doesn't allows this word.
  2. Rotti

    Wanted-system

    thank you it worked
  3. Rotti

    Wanted-system

    Hello, I want a wanted-sysem on my server. If you type /wanted <1-6> the player should get wanteds. But i don't know how to do that. Please help
  4. Rotti

    Gui problem

    THANK YOU!!! That worked
  5. Rotti

    Gui problem

    It doesn't work what the Hell! did you test the code?
  6. Rotti

    Gui problem

    So i changed it but the Gui doesn't open
  7. Rotti

    Gui problem

    what did you change?
  8. Rotti

    Gui problem

    I didn't scripted the button... It isn't in my script. But its on the website Edit: Normally the Button is a "F a g g i o" Button... Edit2: This website doesn't allows the word F a g g i o
  9. Rotti

    Gui problem

    it doesn't works
  10. Rotti

    Gui problem

    Hello, I want to open my gui after the player went into the marker. My Serverside script: My Clientside script: But if i go into my marker the GUI doesn't open please help sorry for bad englisch.
×
×
  • Create New...