Matevsz Posted September 14, 2014 Share Posted September 14, 2014 Hi, I have a question how to do that over the name of a pansy he say something? (Some text) and how do I do if the barrier is created as the player will take the $ 50 it will raise up (as the boundaries of GTA 4), and how will take $ 50 and will open it immediately closes. Sorry for English = Google Translate Link to comment
MIKI785 Posted September 14, 2014 Share Posted September 14, 2014 I don't understand what you're trying to say here, i barely got the first part that you want to show some text over someone, right? Well use dx functions... getScreenFromWorldPosition --To get X,Y where the text will show on screen dxDrawText --Draw it The second part of your post i don't understand at all. Link to comment
Matevsz Posted September 14, 2014 Author Share Posted September 14, 2014 Sorry, bad english these are pictures of what I mean Link to comment
xeon17 Posted September 14, 2014 Share Posted September 14, 2014 You can try this resource. https://community.multitheftauto.com/in ... ls&id=5101 Link to comment
Matevsz Posted September 14, 2014 Author Share Posted September 14, 2014 Can you tell me which code is responsible for that as we stand before rail it gets $ 50 and opens? tings local tollPrice = 150 -- Toll Price (Default: 150) local allowedTypes = { -- Allowed vehicle types ["Automobile"]=true; ["Bike"]=true; ["Monster Truck"]=true; } local teamsImmuneToToll = { ["Police"]=true; } -- End of settings -- Barriers local tollbarrierLSLV = createObject (968, 1745.19, 509.79, 28.6, 0, 90, 340) -- gate LS > LV local tollbarrierLSLV2 = createObject (968, 1736.8, 513.2, 28.6, 0, 89, 338) -- gate LS > LV 2 local tollbarrierLVLS = createObject (968, 1723.5, 510.5, 28.9, 0, 270, 338) -- gate LV > LS local tollbarrierLVLS2 = createObject (968, 1731.9, 507.64, 28.9, 0, 271, 338) -- gate LV > LS 2 local tollbarrierLVSF = createObject (968, -1401.1, 826.2, 47.6, 0, 270, 318) -- gate LV > SF local tollbarrierLVSF2 = createObject (968, -1407.9, 832, 47.6, 0, 270, 316) -- gate LV > SF 2 local tollbarrierSFLV = createObject (968, -1395.1, 829.2, 47.6, 0, 90, 316) -- gate SF > LV local tollbarrierSFLV2 = createObject (968, -1389, 823.4, 47.6, 0, 90, 316) -- gate SF > LV 2 local tollbarrierTRSF = createObject (968, -2691.69, 1271.3, 55.5, 0, 270, 0) -- gate TR > SF local tollbarrierTRSF2 = createObject (968, -2683, 1271.19, 55.5, 0, 270, 0) -- gate TR > SF 2 local tollbarrierSFTR = createObject (968, -2671.2, 1277.7, 55.5, 0, 90, 0) -- gate SF > TR local tollbarrierSFTR2 = createObject (968, -2680.8, 1278.19, 55.5, 0, 90, 0) -- gate SF > TR 2 local tollbarrierLSSF = createObject (968, 51.7, -1528.1, 5.2, 0, 90, 85) -- gate LS > SF local tollbarrierSFLS = createObject (968, 53.7, -1535, 5.2, 0, 270, 85) -- gate SF > LS -- Blips local tollblip1 = createBlip (1736, 512, 28, 42) setBlipVisibleDistance (tollblip1, 250) local tollblip2 = createBlip (-1398, 828, 53, 42) setBlipVisibleDistance (tollblip2, 250) local tollblip3 = createBlip (-2676, 1278, 62, 42) setBlipVisibleDistance (tollblip3, 250) local tollblip4 = createBlip (52.7, -1531.6, 6, 42) setBlipVisibleDistance (tollblip4, 250) -- Markers local tollboothLSLV = createMarker (1746, 499, 27.5, "cylinder", 5, 0, 0, 0, 0) local tollboothLSLV2 = createMarker (1736.69, 503.2, 27.5, "cylinder", 5.0, 0, 0, 0, 0) local tollboothLVLS = createMarker (1725, 524, 27.5, "cylinder", 5, 0, 0, 0, 0) local tollboothLVLS2 = createMarker (1732.19, 518.2, 27.1, "cylinder", 5.0, 0, 0, 0, 0) local tollboothLVSF = createMarker (-1397, 836, 47, "cylinder", 5, 0, 0, 100, 0) local tollboothLVSF2 = createMarker (-1403.59, 839.79, 46, "cylinder", 4.0, 0, 0, 0, 0) local tollboothSFLV = createMarker (-1399, 820, 47, "cylinder", 5, 0, 0, 0, 0) local tollboothSFLV2 = createMarker (-1394.09, 813.7, 46, "cylinder", 4.0, 0, 0, 0, 0) local tollboothTRSF = createMarker (-2696, 1283, 54, "cylinder", 5, 0, 0, 0, 0) local tollboothTRSF2 = createMarker (-2686.3, 1281.8, 54, "cylinder", 5, 0, 0, 0, 0) local tollboothSFTR = createMarker (-2667, 1268, 54, "cylinder", 5, 0, 0, 0, 0) local tollboothSFTR2 = createMarker (-2677, 1267.3, 54, "cylinder", 5, 0, 0, 0, 0) local tollboothLSSF = createMarker (57.59, -1525.3, 4, "cylinder", 5, 0, 0, 0, 0) local tollboothSFLS = createMarker (46.79, -1537.09, 4, "cylinder", 5, 0, 0, 0, 0) addEventHandler ("onMarkerHit", root, function (hitElement, dimension) local s = source if s == tollboothLSLV or s == tollboothLVLS or s == tollboothLVSF or s == tollboothSFLV or s == tollboothTRSF or s == tollboothSFTR or s == tollboothLSLV2 or s == tollboothLVLS2 or s == tollboothLVSF2 or s == tollboothSFLV2 or s == tollboothTRSF2 or s == tollboothSFTR2 or s == tollboothLSSF or s == tollboothSFLS and dimension then if getElementType (hitElement) == "player" and isPedInVehicle (hitElement) then local sourceVehicle = getPedOccupiedVehicle (hitElement) local controller = getVehicleController (sourceVehicle) local pAcc = getPlayerAccount (hitElement) if allowedTypes [getVehicleType (sourceVehicle)] then if isGuestAccount (pAcc) then if getPlayerMoney (hitElement) < tollPrice then outputChatBox ("[TOLL] You don't have enough money. (Toll Price: $"..tollPrice..")", controller, 255, 0, 0) else setElementVelocity (sourceVehicle, 0, 0, 0) triggerClientEvent (controller, "manageTollGUI", controller, 1, tollPrice, true) end elseif not isGuestAccount (pAcc) then if getPlayerTeam (controller) and teamsImmuneToToll[getTeamName(getPlayerTeam(controller))] then triggerEvent ("tollPaid", controller, true) outputChatBox ("[TOLL] This pass was financed by the Government", controller, 120, 255, 0) else if getAccountData (pAcc, "toll.impulses") and getAccountData (pAcc, "toll.impulses") > 0 then setAccountData (pAcc, "toll.impulses", getAccountData (pAcc, "toll.impulses") - 1) triggerEvent ("tollPaid", controller, true) outputChatBox ("[TOLL] Toll impulse used, left:#ffffff "..getAccountData (pAcc, "toll.impulses"), controller, 255, 120, 0, true) elseif not getAccountData (pAcc, "toll.impulses") or getAccountData (pAcc, "toll.impulses") == 0 then setElementVelocity (sourceVehicle, 0, 0, 0) triggerClientEvent (controller, "manageTollGUI", controller, 1, tollPrice) end end end else outputChatBox ("[TOLL] This vehicle type is not allowed", controller, 255, 0, 0) end else return end end end ) addEventHandler ("onMarkerLeave", root, function (leaveElement, dimension) local s = source if s == tollboothLSLV or s == tollboothLVLS or s == tollboothLVSF or s == tollboothSFLV or s == tollboothTRSF or s == tollboothSFTR or s == tollboothLSLV2 or s == tollboothLVLS2 or s == tollboothLVSF2 or s == tollboothSFLV2 or s == tollboothTRSF2 or s == tollboothSFTR2 or s == tollboothLSSF or s == tollboothSFLS and dimension then if getElementType (leaveElement) == "player" and isPedInVehicle (leaveElement) then triggerClientEvent (leaveElement, "manageTollGUI", leaveElement, 2) end end end ) addEvent ("tollPaid", true) function openRamp (freePass) if isElementWithinMarker (source, tollboothLSLV) and not isTimer (ob1) then moveObject (tollbarrierLSLV, 1000, 1745.19, 509.79, 28.6, 0, -90, 0) setTimer (moveObject, 3500, 1, tollbarrierLSLV, 1000, 1745.19, 509.79, 28.6, 0, 90, 0) ob1 = setTimer (function () end, 5000, 1) elseif isElementWithinMarker (source, tollboothLVLS) and not isTimer (ob2) then moveObject (tollbarrierLVLS, 1000, 1723.5, 510.5, 28.9, 0, 90, 0) setTimer (moveObject, 3500, 1, tollbarrierLVLS, 1000, 1723.5, 510.5, 28.9, 0, -90, 0) ob2 = setTimer (function () end, 5000, 1) elseif isElementWithinMarker (source, tollboothLVSF) and not isTimer (ob3) then moveObject (tollbarrierLVSF, 1000, -1401.1, 826.2, 47.6, 0, 90, 0) setTimer (moveObject, 3500, 1, tollbarrierLVSF, 1000, -1401.1, 826.2, 47.6, 0, -90, 0) ob3 = setTimer (function () end, 5000, 1) elseif isElementWithinMarker (source, tollboothSFLV) and not isTimer (ob4) then moveObject (tollbarrierSFLV, 1000, -1395.1, 829.2, 47.6, 0, -90, 0) setTimer (moveObject, 3500, 1, tollbarrierSFLV, 1000, -1395.1, 829.2, 47.6, 0, 90, 0) ob4 = setTimer (function () end, 5000, 1) elseif isElementWithinMarker (source, tollboothTRSF) and not isTimer (ob5) then moveObject (tollbarrierTRSF, 1000, -2691.69, 1271.3, 55.5, 0, 90, 0) setTimer (moveObject, 3500, 1, tollbarrierTRSF, 1000, -2691.69, 1271.3, 55.5, 0, -90, 0) ob5 = setTimer (function () end, 5000, 1) elseif isElementWithinMarker (source, tollboothSFTR) and not isTimer (ob6) then moveObject (tollbarrierSFTR, 1000, -2671.2, 1277.7, 55.5, 0, -90, 0) setTimer (moveObject, 3500, 1, tollbarrierSFTR, 1000, -2671.2, 1277.7, 55.5, 0, 90, 0) ob6 = setTimer (function () end, 5000, 1) elseif isElementWithinMarker (source, tollboothLSLV2) and not isTimer (ob7) then moveObject (tollbarrierLSLV2, 1000, 1736.8, 513.2, 28.6, 0, -90, 0) setTimer (moveObject, 3500, 1, tollbarrierLSLV2, 1000, 1736.8, 513.2, 28.6, 0, 90, 0) ob7 = setTimer (function () end, 5000, 1) elseif isElementWithinMarker (source, tollboothLVLS2) and not isTimer (ob8) then moveObject (tollbarrierLVLS2, 1000, 1731.9, 507.64, 28.9, 0, 88, 0) setTimer (moveObject, 3500, 1, tollbarrierLVLS2, 1000, 1731.9, 507.64, 28.9, 0, -90, 0) ob8 = setTimer (function () end, 5000, 1) elseif isElementWithinMarker (source, tollboothLVSF2) and not isTimer (ob9) then moveObject (tollbarrierLVSF2, 1000, -1407.9, 832, 47.6, 0, 90, 0) setTimer (moveObject, 3500, 1, tollbarrierLVSF2, 1000, -1407.9, 832, 47.6, 0, -90, 0) ob9 = setTimer (function () end, 5000, 1) elseif isElementWithinMarker (source, tollboothSFLV2) and not isTimer (ob10) then moveObject (tollbarrierSFLV2, 1000, -1389, 823.4, 47.6, 0, -90, 0) setTimer (moveObject, 3500, 1, tollbarrierSFLV2, 1000, -1389, 823.4, 47.6, 0, 90, 0) ob10 = setTimer (function () end, 5000, 1) elseif isElementWithinMarker (source, tollboothTRSF2) and not isTimer (ob11) then moveObject (tollbarrierTRSF2, 1000, -2683, 1271.19, 55.5, 0, 90, 0) setTimer (moveObject, 3500, 1, tollbarrierTRSF2, 1000, -2683, 1271.19, 55.5, 0, -90, 0) ob11 = setTimer (function () end, 5000, 1) elseif isElementWithinMarker (source, tollboothSFTR2) and not isTimer (ob12) then moveObject (tollbarrierSFTR2, 1000, -2680.8, 1278.19, 55.5, 0, -90, 0) setTimer (moveObject, 3500, 1, tollbarrierSFTR2, 1000, -2680.8, 1278.19, 55.5, 0, 90, 0) ob12 = setTimer (function () end, 5000, 1) elseif isElementWithinMarker (source, tollboothLSSF) and not isTimer (ob13) then moveObject (tollbarrierLSSF, 1000, 51.7, -1528.1, 5.2, 0, -90, 0) setTimer (moveObject, 3500, 1, tollbarrierLSSF, 1000, 51.7, -1528.1, 5.2, 0, 90, 0) ob13 = setTimer (function () end, 5000, 1) elseif isElementWithinMarker (source, tollboothSFLS) and not isTimer (ob14) then moveObject (tollbarrierSFLS, 1000, 53.7, -1535, 5.2, 0, 90, 0) setTimer (moveObject, 3500, 1, tollbarrierSFLS, 1000, 53.7, -1535, 5.2, 0, -90, 0) ob14 = setTimer (function () end, 5000, 1) end if not freePass then takePlayerMoney (source, tollPrice) end end addEventHandler ("tollPaid", root, openRamp) addEvent ("manageImpulses", true) addEventHandler ("manageImpulses", root, function (value) local acc = getPlayerAccount (source) if value == 1 then if not getAccountData (acc, "toll.impulses") then setAccountData (acc, "toll.impulses", 1) else setAccountData (acc, "toll.impulses", getAccountData (acc, "toll.impulses") + 1) end outputChatBox ("[TOLL] Added one toll impulse to your account, total: #ffffff"..getAccountData (acc, "toll.impulses"), source, 10, 230, 10, true) takePlayerMoney (source, tollPrice) elseif value == 2 then givePlayerMoney (source, tollPrice) setAccountData (acc, "toll.impulses", getAccountData (acc, "toll.impulses") - 1) outputChatBox ("[TOLL] Removed an impulse, you got your money back. Left: #ffffff"..getAccountData (acc, "toll.impulses"), source, 255, 130, 0, true) end end ) -- Settings local enableImpulses = true -- If set to false players will not be able to purchase impulses -- End of settings function centerTollGUI (theWindow) local screenW, screenH = guiGetScreenSize () local windowW, windowH = guiGetSize (theWindow,false) local x, y = (screenW - windowW) / 2, (screenH - windowH) / 2 guiSetPosition (theWindow, x, y, false) end -- Toll GUI local tollGUI = guiCreateWindow(0.37, 0.22, 0.34, 0.41,"Toll Booth",true) centerTollGUI (tollGUI) guiWindowSetMovable(tollGUI,false) guiWindowSetSizable(tollGUI,false) guiSetVisible (tollGUI, false) local tollIMG = guiCreateStaticImage(0.27, 0.07, 0.48, 0.47,"tollbooth.png",true,tollGUI) local tollinfo = guiCreateLabel(0.34, 0.58, 0.42, 0.04,"Toll Price: $",true,tollGUI) local tollinfoPrice = guiCreateLabel(0.53, 0.58, 0.42, 0.04,"",true,tollGUI) local tollPay = guiCreateButton(0.17, 0.66, 0.64, 0.14,"Pay Toll",true,tollGUI) local tollImpulses = guiCreateButton(0.17, 0.82, 0.64, 0.14,"Purchase Impulses",true,tollGUI) local tollClose = guiCreateButton(0.88, 0.08, 0.09, 0.09,"X",true,tollGUI) -- Impulses GUI local impulsesGUI = guiCreateWindow(0.31, 0.24, 0.35, 0.22, "Purchase Impulses", true) guiWindowSetSizable(impulsesGUI, false) guiWindowSetMovable(impulsesGUI,false) guiSetVisible (impulsesGUI, false) centerTollGUI (impulsesGUI) local impulsesAdd = guiCreateButton(0.18, 0.21, 0.65, 0.20, "Add one", true, impulsesGUI) local impulsesCurrent = guiCreateMemo(0.39, 0.49, 0.16, 0.20, "0", true, impulsesGUI) guiMemoSetReadOnly(impulsesCurrent, true) local impulsesInfo = guiCreateLabel(0.25, 0.53, 0.13, 0.11, "Current:", true, impulsesGUI) local impulsesRemove = guiCreateButton(0.19, 0.72, 0.65, 0.20, "Remove one", true, impulsesGUI) local impulsesClose = guiCreateButton(0.90, 0.14, 0.08, 0.15, "X", true, impulsesGUI) addEvent ("manageTollGUI", true) addEventHandler ("manageTollGUI", root, function (state, tollPrice, guest) tollPrice = tonumber (tollPrice) if state == 1 then if not guiGetVisible (tollGUI) then guiSetVisible (tollGUI, true) showCursor (true) guiSetText (tollinfoPrice, tostring (tollPrice)) guiSetText (impulsesAdd, "Add one ($"..tollPrice..")") guiSetText (impulsesCurrent, "0") if enableImpulses == false or guest then guiSetEnabled (tollImpulses, false) elseif enableImpuses == true then guiSetEnabled (tollImpulses, true) end end elseif state == 2 then if guiGetVisible (tollGUI) then guiSetVisible (tollGUI, false) showCursor (false) end end end ) -- Handles GUI Clicks addEventHandler ("onClientGUIClick", root, function (button, state) if button == "left" and state == "up" then if source == tollPay then local vehicleController = getVehicleController (getPedOccupiedVehicle (localPlayer)) if vehicleController == localPlayer and getPlayerMoney (vehicleController) < tonumber (guiGetText (tollinfoPrice)) then outputChatBox ("[TOLL] You don't have enough money", 255, 0, 0) guiSetVisible (tollGUI, false) showCursor (false) else triggerServerEvent ("tollPaid", localPlayer) playSoundFrontEnd (5) guiSetVisible (tollGUI, false) showCursor (false) end elseif source == tollClose then guiSetVisible (tollGUI, false) showCursor (false) elseif source == tollImpulses then guiSetVisible (tollGUI, false) guiSetVisible (impulsesGUI, true) elseif source == impulsesClose then guiSetVisible (tollGUI, true) guiSetVisible (impulsesGUI, false) elseif source == impulsesAdd then if getPlayerMoney (getVehicleController (getPedOccupiedVehicle (localPlayer))) < tonumber (guiGetText (tollinfoPrice)) then outputChatBox ("[TOLL] You don't have enough money", 255, 0, 0) guiSetVisible (impulsesGUI, false) showCursor (false) else triggerServerEvent ("manageImpulses", localPlayer, 1) guiSetText (impulsesCurrent, tonumber (guiGetText (impulsesCurrent)) + 1) end elseif source == impulsesRemove then if getVehicleController (getPedOccupiedVehicle (localPlayer)) == localPlayer then if tonumber (guiGetText (impulsesCurrent)) > 0 then guiSetText (impulsesCurrent, tonumber (guiGetText (impulsesCurrent)) - 1) triggerServerEvent ("manageImpulses", localPlayer, 2) end end end end end ) Link to comment
xeon17 Posted September 14, 2014 Share Posted September 14, 2014 Line 3 local tollPrice = 150 -- Toll Price (Default: 150) Change to local tollPrice = 50 -- Toll Price (Default: 150) Link to comment
Matevsz Posted September 14, 2014 Author Share Posted September 14, 2014 and who is responsible for the code that retrieves kase as it is a gateway to open? Link to comment
Matevsz Posted September 19, 2014 Author Share Posted September 19, 2014 Can you check if it is good? Script consists of peds, barriers, and markers, If we hit the marker will check if we have $ 50 if it is a barrier to open if it is closed. function granice(name) -- Granica przy czerwonym moście San Fiero -- -- Policjanci ----------------------------------------------------------------------------------------------------------------------------- local ped=createPed(int 280, float -2672, float 1280.5999755859, float 55.900001525879 [, float rot = 2658.001831, bool synced = true]) setElementFrozen(ped,true) setElementData(ped,"name","Policja") getScreenFromWorldPosition(float -2671.8999023438, float 1280.5999755859, float 56.900001525879 [ float adgeTolerance=0, bool relative=true]) dxDrawText("Przejazd przez granice kosztuje 50$") local ped=createPed(int 280, float -2672, float 1280.5999755859, float 55.900001525879 [, float rot = 88.0018310, bool synced = true]) setElementFrozen(ped,true) setElementData(ped,"name","Policja") getScreenFromWorldPosition(float x, y, z ) dxDrawText("Przejazd przez granice kosztuje 50$") local ped=createPed(int 280, float -2682.3999023438, float 1280.4000244141, float 55.900001525879 [, float rot = 90.0018310, bool synced = true]) setElementFrozen(ped,true) setElementData(ped,"name","Policja") getScreenFromWorldPosition(float x, y, z) dxDrawText("Przejazd przez granice kosztuje 50$") local ped=createPed(int 280, float -2689.8999023438, float 1280.5999755859, float 56 [, float rot = 268.004119, bool synced = true]) setElementFrozen(ped,true) setElementData(ped,"name","Policja") getScreenFromWorldPosition(float x, y, z) dxDrawText("Przejazd przez granice kosztuje 50$") local ped=createPed(int 280, float -2691.1999511719, float 1280.5999765859, float 56 [, float rot = 90.0018310, bool synced = true]) setElementFrozen(ped,true) setElementData(ped,"name","Policja") getScreenFromWorldPosition(float x, y, z) dxDrawText("Przejazd przez granice kosztuje 50$") local ped=createPed(int 280, float -2681.1999511719, float 1280.4000244141, float 55.900001525879 [, float 270.001831, bool synced = true]) setElementFrozen(ped,true) setElementData(ped,"name","Policja") getScreenFromWorldPosition(float x, y, z) dxDrawText("Przejazd przez granice kosztuje 50$") ------------------------------------------------------------------------------------------------------------------------------------------- -- Barierki i markery----------------------------------------------------------------------------------------------------------------------------------------------- local object1=createObject(int 968, float -2671.8999023438, float 1283.1999511719, float 55.5, [ float 0, float 88, float 0, bool isLowLOD = false]) -- local marker=createMarker(-2668.1999511719, 1279.8000488281, 55.400001525879 [, string theType = "cylinder", size = 3.59999990, int g = 0 , int b = 0, int a = 0, visibleTo = getRootElement( ) ] ) local object2=createObject(int 968, float -2673.1000976563, float 1283.1999511719, float 55.5, [ float 0, float 270, float 0, bool isLowLOD = false]) -- local marker=createMarker(-2677, 1279.0999755859, 55.400001525879 [, string theType = "cylinder", size = 3.59999990, int g = 0, int b = 0, int a = 0, visibleTo = getRootElement( ) ] ) local object3=createObject(int 968, float -2681.6000976563, float 1283, float 55.5, float 0, [ float 0, float 270, float 0, bool isLowLOD = false]) -- local marker=createMarker(-2687.5, 1288.1999511719, 55.400001525879, [, string theType = "cylinder", size = 3.59999990, int g = 0, int b = 0, int a = 0, visibleTo = getRootElement( ) ] ) local object4=createObject(int 968, float -2690.6000976563, float 1282.9000244141, float 55.5, [ float 0, float 0, float 88.0018310, bool isLowLOD = false]) -- local marker=createMarker(-2694.6000976563, 1288.6999511719, 55.400001525879 [, string theType = "cylinder", size = 3.59999990, int g = 0, int b = 0, int a = 0, visibleTo = getRootElement( ) ] ) function bariers(thePlayer) -- Pobieranie pieniędzy (50$) i ruchome barierki if isElementWithinMarker(thePlayer, object1) then local pieniadze = getPlayerMoney(elementgracza) local koszt >= 50 if pieniadze == koszt then else outputChatBox("Nie posiadasz tyle pieniedzy", elementgracza) takePlayerMoney(thePlayer, tonumber(50) moveObject(1000, -2671.8999023438, 1283.1999511719, 55.5) moveObject(1000, -2671.8999023438, 1283.1999511719, 55.5 [, moverx 0, movery 88, moverz 0, ] ) end end function barriers2(thePlayer) if isElementWithinMarker(thePlayer, object2) then local pieniadze = getPlayerMoney(elementgracza) local koszt >= 50 if pieniadze == koszt then else outputChatBox("Nie posiadasz tyle pieniedzy", elementgracza) takePlayerMoney(thePlayer, tonumber(50) moveObject(1000, -2673.8999023438, 1283.1999511719, 55.5) moveObject(1000, -2673.1000976563, 1283.1999511719, 55.5 [, moverx 0, movery 270, move rz 0, ] ) end end function barriers3(thePlayer) if isElementWithinMarker(thePlayer, object3) then local pieniadze = getPlayerMoney(elementgracza) local koszt >= 50 if pieniadze == koszt then else outputChatBox("Nie posiadasz tyle pieniedzy", elementgracza) takePlayerMoney(thePlayer, tonumber(50) moveObject(-2681.6000976563, 1283, 55.5) moveObject(-2681.6000976563, 1283, 55.5 [, moverx 0, move ry 270, move rz 0 ] ) end end function barriers4(thePlayer) if isElementWithinMarker(thePlayer, object4) then local pieniadze = getPlayerMoney(elementgracza) local koszt >= 50 if pieniadze == koszt then else outputChatBox("Nie posiadasz tyle pieniedzy", elementgracza) takePlayerMoney(thePlayer, tonumber(50) moveObject(-2690.6000976563, 1282.9000244141, 55.5) moveObject(-2690.6000976563, 9000244141, 55.5 [, moverx 0, move ry 270, move rz 0 ] ) end end Link to comment
xeon17 Posted September 20, 2014 Share Posted September 20, 2014 Have you tested the script? what about /debugscript 3 ? errors ,warrings? Link to comment
Matevsz Posted September 20, 2014 Author Share Posted September 20, 2014 not because I know that I have done this that a player does not have $ 50 this barrier is closed and I have immediately that if we pay it opens and closes moveObject(-2690.6000976563, 1282.9000244141, 55.5) moveObject(-2690.6000976563, 9000244141, 55.5 [, moverx 0, move ry 270, move rz 0 ] ) Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now