Jump to content

IIYAMA

Moderators
  • Posts

    6,097
  • Joined

  • Last visited

  • Days Won

    218

Everything posted by IIYAMA

  1. and use getTickcount() to reduce data overclow. getTickCount()
  2. try this: for k,v in pairs(getElementsByType("player")) do bindKey(v, "o", "down", "pullover") end local circlearea = createColCircle ( 0, 0, 10 ) function ColShapeHit ( su, command) local vehicle =getPedOccupiedVehicle ( su ) if isElementWithinColShape ( vehicle, circlearea ) and getElementType ( vehicle ) == "vehicle" then setVehicleEngineState ( vehicle, false ) end end addCommandHandler("pullover", ColShapeHit)
  3. Because "su" is a player and not a vehicle.
  4. Pc would probably look better then this.
  5. When I am home, I will try to help you as far as I can.
  6. Btw there wasn't much wrong with your code. Maybe the triggerClientEvent did had a root argument, but that should not make it not working. triggerClientEvent("clientStartFiring", player, false) -- to triggerClientEvent(player,"clientStartFiring", player, false) sendTo: The event will be sent to all players that are children of the specified element. By default this is the root element, and hence the event is sent to all players. If you specify a single player it will just be sent to that player.
  7. Because you wanted to shoot while skydiving? "setControlState("fire", state)" = shooting..... or was it for opening the parachute? -- SERVER function skyD(player) local px,py,pz = getElementModel(player) setElementPosition(player, px,py,(pz + 300),false) giveWeapon ( player,46 ,1, true ) setControlState(player,"fire", true) setTimer(function() if isElement(player) then setControlState(player,"fire", false) end end, 500, 1) end addCommandHandler("letMeFly", skyD) --[[CLIENT function clientStartFiring(state) setControlState("fire", state) end addEvent("clientStartFiring", true) addEventHandler("clientStartFiring", getRootElement(), clientStartFiring) ]]
  8. Also it required admin rigts.
  9. I have never made a script like this before, but this may help you. --client setElementFrozen (localPlayer) addEventHandler("onClientPreRender",root, function () local x,y,z = getElementPositon(localPlayer) setElementPosition (localPlayer,x,y,z+.0001,false) -- false is not interrupt animations. end)
  10. I am a little late, (14 days) But It happened to me when I was changing the projectile counter. https://wiki.multitheftauto.com/wiki/Se ... ileCounter When you set projectiles to infinity, this bug somehow shows up. (because of the many active projectiles) I bet there are more ways this could happen, I haven't found a way to debug it. It only starts working again after a while. You always can try to freeze and de-freeze your self to know if it is gta or controlstate(script).
  11. Wrong section. (was at scripting section) https://forum.multitheftauto.com/viewforum.php?f=104
  12. Why not use addCommandHandler? I have never added acl rights with scripts so I may made a mistake. local trueOrFalse = {["true"]=true,["false"]=true} local setTrueOrFalse = {["true"]=true,["false"]=false} function changeAcl (player,CMD,pointer1,pointer2) if pointer1 = "admin" and trueOrFalse[pointer2] then local acl = aclGet (CMD) if acl then aclSetRight (acl, "admin",setTrueOrFalse[pointer2]) aclSave () end end end addCommandHandler ( "command.stop", changeAcl) This may also works: local trueOrFalse = {["true"]=true,["false"]=true} addCommandHandler ( "command.stop", function (player,CMD,pointer1,pointer2) if pointer1 = "admin" and trueOrFalse[pointer2] then local acl = aclGet (CMD) if acl then aclSetRight (cal, "admin",(pointer2 == "true" and true or false)) aclSave () end end end)
  13. Maybe because you only get localPlayer Element data? localPlayer or getLocalPlayer() = YOU Learn to work with tables, you have to change your system totally.
  14. ja mogelijk, scripten. Je kan er niet om heen.....
  15. The map editor isn't that great, hundreds of errors/warnings when stopping the source. Just make sure you got enough ram. You can check the editor meta.xml, but I don't think you can disable it.
  16. What also works is translate some of the words to dutch, it did work for me. It will make it a lot easier when you know the exact meanings of the words. NL: Probeer niet scripts te verkopen, als je het nog niet kan. -__-"
  17. Use these: addCommandHandler moveObject createObject People won't script for free. We are here to help, but not to make it for you.
  18. ah that is why "setVehiclePlateText" wasn't blue, I was thinking it was a function in the rest of the script.
  19. Is your script serverside? (because this code is)
  20. (col problems from the screenshot) attach 2 other objects on it and make them invisible.(per door) and remove the collision of the scaled doors.
  21. ok, I only don't understand what they mean with this: (This only makes a difference when the body of the function contains references to f.) -What is "f"? Is that the function that contains the function? Can you give me two samples when I better can use: local function f () body end --and local f = function () body end Because in my opinion the website isn't very clear.
  22. are they 100% the same? with the same performance?
  23. Why would you disable auto safer? If your server crashed everything you have done before is gone.
  24. Is there any special differences between those two local functions: local myFunction = function () end local function myFunction () end
×
×
  • Create New...