Jump to content

karlis

Members
  • Posts

    1,314
  • Joined

  • Last visited

Everything posted by karlis

  1. take look at it https://community.multitheftauto.com/index.php?p= ... ils&id=234 crouch for peds is working there somehow
  2. use dxGetFontHeight() dxGetTextWidth()
  3. too bad signatures are disabled, i would put there disclaimer that my scripts wont work likely just simple command handler added(/rotateme): -- EDIT ME local rotSpeed = 1 -- How much degrees you want the camera to turn per frame -- DON'T EDIT ME ANYMOAR local angle = 0 local elem local zOff local dist local active = false function getPointFromDistanceRotation(x, y, dist, angle) --credits to robhol from wiki snippets local a = math.rad(90 - angle) local dx = math.cos(a) * dist; local dy = math.sin(a) * dist; return x+dx, y+dy; end function attachrotatingcamera(bool,element,Zoffset,distance) if bool then active=true elem,zOff,dist=element,Zoffset,distance --make values global addEventHandler("onClientRender",getRootElement(),createRotRamera) else removeEventHandler("onClientRender",getRootElement(),createRotRamera) setCameraTarget(getLocalPlayer(),getLocalPlayer()) active=false end end function createRotRamera() local x,y,z=getElementPosition(elem) local camx,camy=getPointFromDistanceRotation(x, y, dist, angle) setCameraMatrix(camx,camy,z+zOff,x,y,z) angle=(angle+rotSpeed)%360 end addCommandHandler("rotateme",function() attachrotatingcamera(not active,getLocalPlayer(),5,10) end)
  4. https://community.multitheftauto.com/index.php?p= ... ils&id=649 https://community.multitheftauto.com/index.php?p= ... ils&id=647 <
  5. no, use 2texts combination for that
  6. try this, but its untested: angle=0 function getPointFromDistanceRotation(x, y, dist, angle) --credits to robhol from wiki snippets local a = math.rad(90 - angle) local dx = math.cos(a) * dist; local dy = math.sin(a) * dist; return x+dx, y+dy; end function attachrotatingcamera(bool,element,Zoffset,distance) if bool then element,Zoffset,distance=element,Zoffset,distance --make values global addEventHandler("onClientRender",getRootElement(),createRotRamera) else removeEventHandler("onClientRender",getRootElement(),createRotRamera) end end function createRotRamera() local x,y,z=getElementPosition(element) local camx,camy=getPointFromDistanceRotation(x, y, distance, angle) setCameraMatrix(camx,camy,z+Zoffset,x,y,z) angle=angle+1 --you can change value if angle>359 then angle=0 end end
  7. nice, 5stars, was going make some recorder too, but now im free of it btw why is crouching disabled?theres simple function isPedDucked() for geting it, and controlstate for making him crouch. also you could use ped task system for enter/exit vehicle animations
  8. restart admin and freeroam resources after starting zday
  9. just video card/cpu is busy of so much objs
  10. isn't addEvent() needed for custom events?
  11. my bad,that "It can(not should) be set to the same value as ", they wasn't same on default config, and for me they are diffrent, but still all working made me think they are not needed to be same
  12. if you want to respawn vehicles after leaving, not streaming out try this: --serverside addEventHandler("onVehicleExit",boxwille,function(_,seat) if seat==0 then respawntimer=setTimer(function() respawnVehicle(boxwille) end,8000,1) --time in miliseconds end end) addEventHandler("onVehicleEnter",boxwille,function() if isTimer(respawntimer) then killTimer(respawntimer) end end) im not sure, will it work, but you can try
  13. setvehiclerespawndelay is not what u need as it wont respawn if some1 is in stream range
  14. karlis

    spawn help.

    add this after spawnplayer: fadeCamera(source, true) setCameraTarget(source, source) and specify root=getRootElement() and delete 1st line,and end at 16 line what will cause error
  15. you should check is clientside and sevrerside money same for that
  16. i think they arent integrated, but you can make them yourself with events system example: --serverside forbiddenweapons={38,36} addEventHandler("onPlayerWeaponSwitch",getRootElement(),function(_,newweapon) for k,v in pairs("forbiddenweapons") do if v==newweapon then banPlayer(source,"[anticheat]cheating with "..forbiddenweapons[k]) --be sure you disabled they in freeroam first... end end end) for hp kick you need check players hp every second for example, and check how did you get hp, for that u need some events both on pickup use and on custom script hp refill
  17. karlis

    I need help

    try don't ask so stupid questions here, but read this first: https://wiki.multitheftauto.com/wiki/Ser ... our_server and before asking something like this again read all server manual: https://wiki.multitheftauto.com/wiki/Server_Manual
  18. ill specify "truck" as your truck element ------ create markers with .map file and call them eg . "truckMarker1"-"truckMarker27", and then randommarker=getElementByID("truckMarker"..math.random(1,27)) ------ lock: --serverside addEventHandler("onVehicleEnter",truck,function() setVehicleLocked(truck,true) end) addEventHandler("onVehicleStartExit",truck,function() setVehicleLocked(truck,false) end) ------ respawn: --serverside addEventHandler("onVehicleExit",truck,function(_,seat) if seat==0 then respawntimer=setTimer(function() respawnVehicle(truck) end,1200000,1) end end) addEventHandler("onVehicleEnter",truck,function() if isTimer(respawntimer) then killTimer(respawntimer) end end) ------- explosion: triggerServerEvent(functionname,source,arguments) and make explosion code serverside --- anyway if you even dont know how to trigger events to server you shouldn't make so complicated scripts
  19. [/code]OR [lua][/lua] [code=lua]
  20. what is outputChatBox("* Command !"..nBeginn["c_Arg"].." not found in tha Resource :o", source)
  21. oh sory, not problem that i didnt see it on wiki, problem thats i messed em up on brain
  22. decrase zombie count to 20 and test then
×
×
  • Create New...