Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function mapLoad ( name )
- createObject (851, -2145.0131835938, -134.62689208984, 35.8)
- createObject (851, -2146.5131835938, -134.62689208984, 35.8)
- createObject (851, -2148.0131835938, -134.62689208984, 35.8)
- createObject (851, -2145.0131835938, -136.62689208984, 35.8, 0, 0, 120)
- createObject (851, -2146.5131835938, -136.62689208984, 35.8, 0, 0, 120)
- createObject (851, -2148.0131835938, -136.62689208984, 35.8, 0, 0, 120)
- end
- addEventHandler ( "onResourceStart", resourceRoot, mapLoad )
- col = createColSphere(-2146.1701660156, -136.81063842773, 36.522750854492, 10.0)
- setElementData("timerEnabled", player, false)
- addCommandHandler("keres", function(player, cmd)
- if not isElementWithinColShape(player, col) then return outputChatBox("RiseMTA: Nem vagy ott!", player) end
- if not getElementData(player, "timerEnabled") then
- setElementData(player, "timerEnabled", true)
- timer = setTimer(function()
- setElementData(player, "timerEnabled", false)
- end, 30000, 1)
- exports.rise_chat:sendLocalMeAction(player, "Kutatni kezdett a szemétben")
- setPedAnimation(player, "BOMBER", "BOM_Plant", -1, true, false, false)
- setTimer(setPedAnimation, 1000*10, 1, player)
- local randomItem = math.random(2,#randomItems)
- exports.rise_item:giveItem(player,randomItems[randomItem][1],randomItems[randomItem][2],1,0)
- return
- else
- outputChatBox("RiseMTA: Nem lehet!", player)
- end
- end)
- randomItems = {
- {3,1},{3,1},{3,1},{3,1},{3,1},{3,1},
- {5,1},{5,1},{5,1},{5,1},{5,1},{5,1},
- {27,10},{27,2},{27,1},{27,20},{27,20},{27,12},
- {150,10},{150,2},{150,1},{150,20},{150,20},{150,12},
- {19,1},{19,2},{19,1},{19,2},{19,2},{19,2},
- {7,1},{7,2},{7,1},{7,2},{7,2},{7,2},
- {216,1},{216,1},{216,1},{216,1},{216,1},{216,1},
- {219,1},{219,1},{219,1},{219,1},{219,1},{219,1},
- }
- local piszkoselad =
- --id ár
- {
- {208, 1},
- }
- local elado2 = {}
- local elado = {
- {240, -2143.9018554688, -146.3910369873, 36.472557067871, "Piszkos Géza", 150, 0, 10, 90}
- }
- addEventHandler("onResourceStart", getResourceRootElement(getThisResource()), function ()
- for index, value in ipairs (elado) do
- if isElement(elado2[index]) then destroyElement(elado2[index]) end
- elado2[index] = createPed(value[1], value[2], value[3], value[4])
- setPedRotation(elado2[index], value[6])
- setElementData(elado2[index], "ped:name", value[5])
- setElementData(elado2[index], "sell:piszkos", true)
- setElementFrozen(elado2[index],true)
- end
- end)
- function piszkospenz(element)
- for key, value in ipairs(piszkoselad) do
- triggerClientEvent(element, "deleteItem22", element, value[1],value[2])
- end
- end
- addEvent("sell:piszkos", true)
- addEventHandler("sell:piszkos", root, piszkospenz)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement