Jump to content

selam

Members
  • Posts

    38
  • Joined

  • Last visited

Everything posted by selam

  1. I have fish.Lua file and meta.xml meta.xml; <meta> <script src="fish.Lua" type="client"/> <script src="fish.Lua" type="server"/> </meta>
  2. @IIYAMA I still didn't fix it, do you know the solution?
  3. So now I changed the "triggerserverevent" command to "triggerevent" as it is client side. Now I am not getting the error I said above. But I still cannot drive vehicles. (createvehicle is on server side still) Full code; local markerParent = createElement("marker-parent") --[[ markerParent = parent marker = child marker = child marker = child addEventHandler listening to: markerParent marker marker marker ]] function buyFish(satinAlim) local money = getPlayerMoney(localPlayer) if (money >= 300) then triggerEvent("buyFish", resourceRoot) outputChatBox("You have bought a fish food.") takePlayerMoney( 300 ) local marker2 = createMarker (1631.6253662109, 576.00537109375, 0.7578125, "cylinder", 1.2, 600, 600, 900, 1000 ) setElementParent(marker2, markerParent) else outputChatBox("You do not have enough amount of money.") end end function botGetir(botdeniz) botarac = createVehicle(473, 1633.3326416016, 563.24768066406, -0.55000001192093) -- server end addEventHandler("onClientMarkerHit", markerParent, botGetir) -- 473, 1633.3326416016, 563.24768066406, -0.55000001192093
  4. @IIYAMA I added "createvehicle" in serverside but still same, I cannot drive boat. Also I am having this error since long time, maybe it has something to do with it? "Error client selam triggered serverside event buyFish but event is not added serverside"
  5. @IIYAMA Hello, when I spawn a boat or a random vehicle, they are spawning as two. And I cannot get in the vehicles, why?
  6. Hello, the boat doesn't get spawned when I get in the marker, nothing happens. Someone please help me. Code;
  7. selam

    MTA Serial Number

    Hello, can anyone send us virus or something dangerous if they know our MTASA serial about our PC. @Dutchman101
  8. @HassoN I did not do what did you say, but I did something else and now its working. I added triggerserverevent to the line 61
  9. @HassoN I guess you did not understand me, I am trying to buy fishes when I click "buy fishes" button. When I tried your last codes, now "X" button(for close) is not working also "buy fishes" is not working neither.
  10. Everything works except buying, debugscript 3 says nothing, there is no errors. This is my script folder And this is the codes @HassoN
  11. I fixed the error, it was because of the forums. But the code is still not working, I mean, when I click "Buy Fishs" button, my money is still same and I don't have fishs. @HassoN
  12. I deleted end of the line " ) Not works. There is no invisible character.
  13. Line 80 is addEventHandler("buyFish", root, buyFish) And when I delete it, I still cannot buy
  14. Copy pasted this, but it says unexpected symbol near ' ( line 80 )
  15. function buyFish() local money = takePlayerMoney( localPlayer, 300 ) if (money >= 300) then outputChatBox("You have bought a fish food.") else outputChatBox("You don't have enough money.") end end end) This is the code, and still not working
  16. @HassoN Your code was not working( all script, ped and markers too ), error was saying "end" expected at line 65, but I fixed it. The main problem is, I still cant buy foods, I mean my money doesnt subtract.
  17. @HassoN Hello, I know that wiki is helpful but its even really hard for guys like me, that is why I am asking you manually. Well, I tried to do something by looking from wiki but not working :D I want to buy fish foods when player clicks the "buy" button. This is the code im using but not working addEventHandler( "onClientGUIClick", resourceRoot, function() if (source == GUIEditor.button[1]) then -- The button to buy guiSetVisible(GUIEditor.window[1], true) -- The window to buy showCursor(true) end end) function() local money = getPlayerMoney(getLocalPlayer( )) if (money >= 300) then outputChatBox("You have bought a fish food.") else outputChatBox("You don't have enough money.") end
  18. Its very hard for me to, can you do it? I added "addeventhandler" to below of the close button line, but I dont know rest, what to do.
  19. @HassoN And now your code is not working,
  20. @HassoN Its working thanks, and do you know how can I add close button to the gui window? I did not find on editor how to.
  21. @HassoN I've created a GUI, now I am trying to do that, when my player enters the marker, he will see GUI, but I can't. Can you help me? marker = createMarker (1623.5999755859, 577.59997558594, 0.79999995231628, "cylinder", 1.2, 255, 0, 0, 140 ) function playermarkerhit(markerHit) end addEventHandler( "onPlayerMarkerHit", resourceRoot, markerHit ) GUIEditor = { button = {}, window = {}, edit = {}, label = {} } addEventHandler("onClientResourceStart", resourceRoot, function() GUIEditor.window[1] = guiCreateWindow(448, 230, 504, 330, "Fisherman", false) guiWindowSetSizable(GUIEditor.window[1], false) guiSetAlpha(GUIEditor.window[1], 0.85) GUIEditor.label[1] = guiCreateLabel(7, 33, 222, 38, " Fisherman: Hello! Get some fish food!", false, GUIEditor.window[1]) guiSetFont(GUIEditor.label[1], "default-bold-small") GUIEditor.label[2] = guiCreateLabel(10, 83, 105, 33, " x10 Food = 300$", false, GUIEditor.window[1]) guiSetFont(GUIEditor.label[2], "default-bold-small") GUIEditor.button[1] = guiCreateButton(22, 133, 122, 80, " BUY FOODS(10)", false, GUIEditor.window[1]) GUIEditor.label[3] = guiCreateLabel(283, 79, 192, 55, "Do you have enough fishes to sell?\n Let me have!", false, GUIEditor.window[1]) GUIEditor.label[4] = guiCreateLabel(293, 33, 68, 20, " Fisherman:", false, GUIEditor.window[1]) guiSetFont(GUIEditor.label[4], "default-bold-small") GUIEditor.button[2] = guiCreateButton(278, 134, 192, 73, " SELL FISHES", false, GUIEditor.window[1]) GUIEditor.label[5] = guiCreateLabel(113, 266, 283, 18, " Note! You can buy maximum 20 foods for per deal", false, GUIEditor.window[1]) guiSetFont(GUIEditor.label[5], "default-bold-small") GUIEditor.edit[1] = guiCreateEdit(476, -28888, 18, 768, "", false, GUIEditor.window[1]) GUIEditor.edit[2] = guiCreateEdit(444, -31241, 30, 768, "", false, GUIEditor.window[1]) end )
  22. @HassoN Ok nvm, I fixed the problem
  23. @HassoN Hello again, now I am trying to create an marker in front of the ped, but when I try, even ped script doesnt work, why? function PedLoad(ped) ped = createPed ( 36, 1623.5, 576.70001220703, 1.7999999523163 ) setElementFrozen( ped, true ) addEventHandler("onClientPedDamage", ped, cancelEvent) end addEventHandler("onClientResourceStart", resourceRoot, PedLoad) -- Marker coords -- X: 1623.5999755859 Y: 577.59997558594 Z: 0.79999995231628 function MarkerLoad(marker) marker = createMarker ( 1623.5999755859, 577.59997558594, 0.79999995231628 [, string theType = "cylinder", ] ) end
×
×
  • Create New...