-
Posts
2,947 -
Joined
-
Last visited
Everything posted by JR10
-
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)
-
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.
-
Well, meta editor might be added in next versions. (If i could)
-
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
-
Do you know what getControlState even do? Checks if the player is pressing a control, which is not what he wants.
-
Use toggleControl(player, "radar", false) EDIT:Jasyds read what getControlState does.
-
giveWeapon(player, weapon, ammo) Use the ammo argument
-
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
-
isCursorShowing(showCursor()) Won't work too, will just do the normal.
-
Seriously what are you posting, wasEventCancelled is used to check if the even was cancelled, and it doesn't have any arguments.
-
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).
-
Why? it should work both sides, but why should he? It's server side too.
-
You are trying to use pHealth in another functions right? Won't work because pHealth only exists inside func2. Because it's local.
-
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
-
No, it's easy to make start to learn. WIKI: https://wiki.multitheftauto.com/wiki/Main_Page
-
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.
-
Thanks.
-
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.
-
There is no need for client then. And setVehicleGunsEnabled doesn't exist then.
-
Then the functions doesn't exist or removed. Even though there is a page for it in the wiki.