-
Posts
1,143 -
Joined
-
Last visited
-
Days Won
42
Everything posted by Patrick
-
You can't do that. You haven't possibility to list files in a folder.
-
Check this: https://community.multitheftauto.com/index.php?p=resources&s=details&id=3016
-
local maxOxygen = math.floor ( 1000 + getPedStat ( localPlayer, 22 ) * 1.5 + getPedStat ( localPlayer, 225 ) * 1.5 ) addEventHandler("onClientRender", getRootElement(), function() setPedOxygenLevel ( localPlayer, maxOxygen ) end)
-
Try this: -- SERVER SIDE local spawns = { {0,0,4}, {5,0,4}, {10,0,4}, {15,0,4}, {20,0,4}, } local pickups = {} function pickupObject(i) outputChatBox("pickuped! | objectid: "..getElementModel(pickups[i].object)) destroyElement(pickups[i].object) destroyElement(pickups[i].pickupCol) pickups[i] = "pickuped" end function createPickup(i) local object = createObject(336, spawns[i][1], spawns[i][2], spawns[i][3]) local col = createColSphere(spawns[i][1], spawns[i][2], spawns[i][3], 2) pickups[i] = {object = object, pickupCol = col} addEventHandler("onColShapeHit", col, function() pickupObject(i) end) end function respawnPickups() for i, v in ipairs(pickups) do if v == "pickuped" then createPickup(i) end end end addCommandHandler("respawn", respawnPickups) for i, v in ipairs(spawns) do createPickup(i) end
-
And you want to respawn this pickups, with a command. (only with command?)
-
You want to do an item pickup script?
-
If you create the col, after the object, it's works. I tried it before. Example. local object = createObject(336, 0,0,4) local col = createColSphere(0,0,4,5) addCommandHandler("countit", function() local objects = getElementsWithinColShape(col, "object") outputChatBox(#objects) end)
-
You need to start the 'killmessages' resource.
-
Már a kocsi model-t így modellezték meg, hogy a Spoiler külön component. Ezért a 'setVehicleComponentPosition' funkcióval tudja változtatni a pozícióját. Ez egy alap járművel nem megoldható. [You need a vehicle model, what have the spoiler component, and you can move this component, with the 'setVehicleComponentPosition' function.]
-
It's a good idea, but think this function use a lot of server processor. (If 500 vehs spawned on the server, this function count all vehicles in every 50ms)
-
function SetDimensionLobby() local returned_rValue = getAllPlayerInDimension(0) outputChatBox ("all players in Dimension 0 "..table.concat(returned_rValue)) end addCommandHandler ("s",SetDimensionLobby,false)
-
I have not. And a faction system is really complicated.
-
-- SERVER SIDE addEventHandler("onPlayerChat", getRootElement(), function(message) cancelEvent() local x, y, z = getElementPosition(source) local radius = createColSphere(x, y, z, 15) -- see the message in 15m radius local nearPlayers = getElementsWithinColShape(radius, "player") destroyElement(radius) for _, player in ipairs(nearPlayers) do if getElementDimension(player) == getElementDimension(source) then outputChatBox(getPlayerName(source)..": #FFFFFF"..message, player, 255, 255, 255, true) end end end)
-
https://community.multitheftauto.com/index.php?p=resources&s=list&name=afk&descr=&category=
-
3DS max plugin: http://www.gtagarage.com/mods/show.php?id=28651 You can export .dff, with this script.
-
function decrease() for _, thePlayer in ipairs(getElementsByType("player" )) do local accName = getAccountName(getPlayerAccount(thePlayer)) if isObjectInACLGroup("user."..accName, aclGetGroup("Admin")) then setElementHealth(thePlayer, getElementHealth(thePlayer) - 5) end end end setTimer(decrease, 2000, 0)
-
I have no idea, maybe try this. If it is not working, I don't know how to do that. Find base.lua and open it. (race/modes/base.lua) Find this function: 'function RaceMode.endMap()' And replace it to this: function RaceMode.endMap() if stateAllowsPostFinish() then gotoState('PostFinish') RaceMode.startNextMapSelect() triggerEvent('onPostFinish', g_Root) end end
-
I have not. Upload it to imgur and send me the link.
-
What Intro? Send me a screenshot of it.
-
Ohh my god.. Bro.. I made you a settings table.. Only for you... please check it... Change this:.. imageWidth = 1024, imageHeight = 1024,
-
Change this: setTimer(showImageOnJoin, 2000, 1) -- start render To this: setTimer(showImageOnJoin, 500, 1) -- start render