Jump to content

JR10

Retired Staff
  • Posts

    2,947
  • Joined

  • Last visited

Everything posted by JR10

  1. JR10

    Problems

    Because you changed it wrong, i made you Show function to use it. local Table = { {1636.267578125,-2286.37890625,72.458694458008, 1682.93359375,-2286.330078125,13.508057594299}, {1786.759765625,1450.986328125,92.410263061523, 1688.240234375,1448.77734375,10.767894744873}, {-1685.783203125,-580.9912109375,272.26177978516, -1570.81640625,-455.7080078125,14}} local timer = {} function Show(player) local x, y, z, lx, ly, lz = unpack(Table[math.random(#Table)]) -- get a random value from the Table and unpack it to get the coords fadeCamera(player, true, 5) setTimer(setCameraMatrix, 100, 1, player, x, y, z, lx, ly, lz) setTimer(fadeCamera, 100, 1, player, true) setTimer(Show, 8000, 1, player) end addEventHandler("onPlayerJoin", root, function() Show(source) end)
  2. function setThePlayerTeam(player) if player then getPlayerTeam(player) if (getPlayerTeam(player) == false) then -- OPEN THE GUI OR WHAT EVERY, THEN WHEN THEY CHOOSE A TEAM USE setPlayerTeam(player,getTeamFromName("THE TEAM")) local r, g, b = getTeamColor(getPlayerTeam(player)) createBlipAttachedTo(player,2,1,r,g,b) end end end Put it anywhere, and use setThePlayerTeam(player) anywhere you want to sets the player team to THE TEAM.
  3. Well, meta editor might be added in next versions. (If i could)
  4. JR10

    Problems

    You should make a table, a timer to change the matrix to a random value from the table. Example: local Table = { {0, 0, 0, 1, 1, 1}, {1, 1, 1, 2, 2, 2} } local timer = {} function Show(player) local x, y, z, lx, ly, lz = unpack(Table[math.random(#Table)]) -- get a random value from the Table and unpack it to get the coords fadeCamera(player, false, 1, 0, 0, 0) setTimer(setCameraMatrix, 1000, 1, player, x, y, z, lx, ly, lz) setTimer(fadeCamera, 1000, 1, player, true) setTimer(Show, 8000, 1, player) end
  5. JR10

    Hydra .

    Do you know what getControlState even do? Checks if the player is pressing a control, which is not what he wants.
  6. JR10

    Disable f11 map

    Use toggleControl(player, "radar", false) EDIT:Jasyds read what getControlState does.
  7. giveWeapon(player, weapon, ammo) Use the ammo argument
  8. That's wrong. function(player) if player then getPlayerTeam(player) if (getPlayerTeam(player) == false) then -- OPEN THE GUI OR WHAT EVERY, THEN WHEN THEY CHOOSE A TEAM USE setPlayerTeam(player,getTeamFromName("THE TEAM")) local r, g, b = getTeamColor(getPlayerTeam(player)) createBlipAttachedTo(player,2,1,r,g,b) end end end
  9. isCursorShowing(showCursor()) Won't work too, will just do the normal.
  10. Seriously what are you posting, wasEventCancelled is used to check if the even was cancelled, and it doesn't have any arguments.
  11. function func1(message) local pHealth = message setElementData ( getLocalPlayer(), "pHealth", pHealth, true ) end function func2() local pHealth = tostring(getElementData(getLocalPlayer(),"pHealth")) outputChatBox(pHealth) end It will work, but if you tried to do it outside func2 it won't work, because the variable pHealth in func2 is local, where it exists only inside it's block (function func2 in this situation).
  12. JR10

    Doors

    Why? it should work both sides, but why should he? It's server side too.
  13. You are trying to use pHealth in another functions right? Won't work because pHealth only exists inside func2. Because it's local.
  14. JR10

    Doors

    Door = createObject ( -2897.587890625, 494.71667480469, 5.4137649536133 ) addEventHandler("onResourceStart", getResourceRootElement(getThisResource()), function (resource) local doorCube = createColCube(-2897.587890625, 494.71667480469, 5.4137649536133, 6, 10, 4) addEventHandler("onColShapeHit", doorCube, onDoorCubeHit) addEventHandler("onColShapeLeave", doorCube, ondoorCubeLeave) end) function onDoorCubeHit(hitElement, matchingDimension) if (getElementType(hitElement) == "player") then moveObject ( Door, 3000, -2897.587890625, 494.71667480469, 9.9137649536133 ) end end function onDoorCubeLeave(leaveElement, matchingDimension) if (getElementType(leaveElement) == "player") then moveObject ( Door, 3000, -2897.587890625, 494.71667480469, 5.4137649536133 ) end end
  15. JR10

    Doors

    Yes, it will, don't double post.
  16. JR10

    Doors

    No, it's easy to make start to learn. WIKI: https://wiki.multitheftauto.com/wiki/Main_Page
  17. JR10

    Hydra .

    What happens?, if you are admin you will be able to shoot, if you are not you won't, maybe you are admin that's why.
  18. JR10

    Doors

    moveObject createColTube
  19. JR10

    Hydra .

    addEventHandler("onVehicleEnter", root, function(player) if getElementModel(source) == 520 then if hasObjectPermissionTo(player, "function.banPlayer", false) then toggleControl(player, "vehicle_fire", true) else toggleControl(player, "vehicle_fire", false) end end end ) addEventHandler("onVehicleExit", root, function(player) toggleControl(player, "vehicle_fire", true) end ) Server side, whole code.
  20. JR10

    Hydra .

    There is no need for client then. And setVehicleGunsEnabled doesn't exist then.
  21. JR10

    Hydra .

    Then the functions doesn't exist or removed. Even though there is a page for it in the wiki.
×
×
  • Create New...