Jump to content

Zcraks

Members
  • Posts

    47
  • Joined

  • Last visited

Everything posted by Zcraks

  1. Zcraks

    Working limit

    Hi. How to make a limit on jobs? If 10 places and 10 players work, then you will be told that "There are no places".
  2. outputChatBox dont workin on server side
  3. localPlayer. This variant dont working triggerServerEvent ("setAnim",localPlayer, localPlayer) The fucntion on server side "setAnim" Event dont started
  4. Dont working server trigger triggerServerEvent ("setAnim",localPlayer, localPlayer) but this works for all players triggerServerEvent ("setAnim", root, localPlayer)
  5. The script performs for all players, how to fix it? client.Lua function work (element) if element == localPlayer and isElement(marker) then triggerServerEvent("setAnim", root) end addEventHandler("onClientMarkerHit",root, work) server.Lua function getAnim (player) setPedAnimation(player, ...) obj = createObject ( id, x, y, z, 0, 0, 0 ) exports.bone_attach:attachElementToBone( obj, player, 4, 0, 0.4, - 0.6, -90, 0, 0 ); end addEvent("setAnim", true) addEventHandler("setAnim", resourceRoot, getAnim)
  6. I have a problem with rendering DX at different screen size. If 1980x1920 then it works and if 1366x768 it does not work.
  7. 31- setPedAnimation(source, "cop_ambient", "copbrowse_loop",5000,true,false,false) 32- setTimer(function() 33- setPedAnimation(source) end, 5000, 1) 33: Bad argument @ 'setPedAnimation' [Expected element at argument 1, go nill]
  8. Zcraks

    exports

    Resource "Job" - get XP on marker hit and export to "lvlsyt" server.lua exports [ "lvlsyt" ]:givePlayerXP (source, 200) Resource "lvlsyt" - give XP to player server.lua function giveXP ( player, xp) givePlayerXP (player, xp) end meta.xml <export function="giveXP" type="server"/>
  9. Zcraks

    exports

    call: failed to call: givePlayerXP[string "?"] call: failed to call: giveXP[string "?"]
  10. Zcraks

    exports

    Hi, i have ERROR. " attempt to call global 'source' (a userdata value). " function giveXP ( player, xp) givePlayerXP (player, xp) end function jobMMM() exports [ "lvlsyt" ]:givePlayerXP (source(getRootElement()), 10) end end addEventHandler("onPlayerMarkerHit",root,jobMMM)
  11. Hi, i have created login panel. This option displays a warning. @bad argument 'getPlayerAccount'. triggerClientEvent ( "register.success", getRootElement()) logIn(client, getAccount(name), password) local account = getPlayerAccount(source) if (account) then setElementData ( source, "Word", word ) end end end addEvent("registerPlayer", true) addEventHandler("registerPlayer", getRootElement(), registerPlayer)
  12. Zcraks

    table in work

    Hi, sry for my Eng lng. I have one problem in my script. I want the marker to be created sequentially, but not random. local tbl = { {1954, -1241.29, 20.3828}, {1898.87, -1205.36, 20.3984}, {1892.98, -1159.29, 25.3828}, {1988.98, -1162.29, 21.3828}, {2041.87, -1208.36, 25.3984}, {2038.98, -1240.29, 25.3828}, } local bsNumber = {} function creteMarker (ID) --rnd = math.random(1,#tbl) ID = 1 marker = createMarker(tbl[ID][1], tbl[ID][2],tbl[ID][3],"checkpoint",3,0,255,0,180) blip = createBlipAttachedTo( marker, 0, 2, 255, 255, 0, 255 ) end addEvent("super", true) addEventHandler ( "super", root, creteMarker) function testJob(e) if isElement(e) then destroyElement(source) destroyElement(blip ) creteMarker () givePlayerMoney(e, 5) end end addEventHandler("onMarkerHit",root,testJob)
  13. In the ACL account is written and login panel too. I dont understand how to check for administrator rights.
  14. My login panel based on SQL works. My character will spawn, but just as a player. How to access the admin panel?
  15. do local windContainer = createElement("windContainer") function createWind () local wind = createObject() if wind then setElementParent(wind, windContainer) return wind end return false end function destroyWind () if doesWindExist () then destroyElement(windContainer) windContainer = createElement("windContainer") return true end return false end function doesWindExist () return getElementChildrenCount ( windContainer ) > 0 end function chekTime () local timehour, timeminute = getTime(soucre) if timehour <= 19 and timehour >= 6 then if wind and isElement(windContainer) () then destroyWind() outputChatBox ("Object destroyed") end elseif not doesWindExist () then wind = createWind(3892,-2072.5,285.5,34.3, 0,0,0) wind = createWind(3895,-2035.6,263.39999,34.3, 0,0,0) wind = createWind(3896,-2096.5,146.5,34.3, 0,0,0) wind = createWind(3897,-2056.1001,214.8,34.3, 0,0,0) outputChatBox ("Object created") end end end Sry but i didn't succeed
  16. function chekTime () local timehour, timeminute = getTime(soucre) local windContainer = createElement("windContainer") if not wind or not isElement(windContainer) then wind = createObject(3892,-2072.5,285.5,34.3, 0,0,0) wind = createObject(3892,-2072.5,285.5,34.3, 0,0,0) wind = createObject(3895,-2035.6,263.39999,34.3, 0,0,0) wind = createObject(3896,-2096.5,146.5,34.3, 0,0,0) wind = createObject(3897,-2056.1001,214.8,34.3, 0,0,0) outputChatBox ("Object created") if wind then setElementParent(wind, windContainer) return wind end return false end elseif timehour <= 19 and timehour >= 6 then if doesWindExist () then destroyElement(windContainer) outputChatBox ("Object destroyed") windContainer = createElement("windContainer") return true return false return getElementChildrenCount ( windContainer ) > 0 end end addEventHandler( "onClientRender", getRootElement( ),chekTime) It is difficult to understand. What are my mistakes?
  17. I have problem. This script destroys only the first object. How to delete all objects? if timehour <= 19 and timehour >= 6 then if wind and isElement(wind) then destroyElement(wind) wind = nil outputChatBox ("Object destroyed") end elseif not wind or not isElement(wind) then wind = createObject(3892,-2072.5,285.5,34.3, 0,0,0) wind = createObject(3895,-2035.6,263.39999,34.3, 0,0,0) wind = createObject(3896,-2096.5,146.5,34.3, 0,0,0) wind = createObject(3897,-2056.1001,214.8,34.3, 0,0,0) outputChatBox ("Object created")
  18. Zcraks

    destroyElement

    Object is not created
  19. I have problem in my script. The created object don't destroyed after "timehour == 6". Sry for my bad English. Help me pls.  function chekTime(wind) local timehour, timeminute = getTime(soucre) if(timehour ~= 6 )then wind = createObject(1337,2321.5, -1659.5,13.5) outputChatBox ("Object created") else if (timehour == 6 ) then destroyElement(wind) outputChatBox ("Object destroyed") end end end addEventHandler( "onClientRender", getRootElement( ),chekTime)
  20. I have problem in my script. The created object don't destroyed after "timehour == 6". Sry for my bad English. Help me pls. function chekTime(wind) local timehour, timeminute = getTime(soucre) if(timehour ~= 6 )then wind = createObject(1337,2321.5, -1659.5,13.5) outputChatBox ("Object created") else if (timehour == 6 ) then destroyElement(wind) outputChatBox ("Object destroyed") end end end addEventHandler( "onClientRender", getRootElement( ),chekTime)
×
×
  • Create New...