Jump to content

Feche1320

Members
  • Content Count

    461
  • Joined

  • Last visited

Community Reputation

4 Neutral

About Feche1320

  • Rank
    Hustler
  • Birthday 16/07/1994

Details

  • Gang
    -|ERU|*
  • Location
    Argentina

Recent Profile Visitors

905 profile views
  1. addEventHandler("onResourceStart", getResourceRootElement(), function() exports.slothbot:spawnBot(3, 3, 5, 0, 108, 0, 0, teamLV, 31, "guarding", true) end ) addEvent("onBotWasted") addEventHandler("onBotWasted", getRootElement(), function() setTimer( function() exports.slothbot:spawnBot(3, 3, 5, 0, 108, 0, 0, teamLV, 31, "guarding", true) end , 5000, 1) end ) You were missing 'addEvent' and on the timer to use exported functions you need to make the function inside the timer.
  2. local bot1 = nil addEventHandler("onResourceStart", getResourceRootElement(), function() bot1 = exports.slothbot:spawnBot(4845.0258789063, -1713.5711669922, 59.668750762939, 0, 108, 0, 0, teamLV, 31, "guarding", true) end ) addEventHandler("onBotWasted", getRootElement(), function() setTimer(spawnPlayer, 5000, 1, bot1, 4845.0258789063, -1713.5711669922, 59.668750762939) end )
  3. <map edf:definitions="editor_main"> <removeWorldObject id="1" radius="0.25" interior="0" model="4024" lodModel="0" posX="1479.8672" posY="-1790.3984" posZ="56.0234" rotX="0" rotY="0" rotZ="0"></removeWorldObject> <removeWorldObject id="2" radius="0.25" interior="0" model="4044" lodModel="0" posX="1481.1875" posY="-1785.0703" posZ="22.3828" rotX="0" rotY="0" rotZ="0"></removeWorldObject> <removeWorldObject id="3" radius="0.25" interior="0" model="4046" lodModel="0" posX="1479.5234" posY="-1852.6406" posZ="24.5156" rotX="0" rotY="0" rotZ="0"></removeWorl
  4. Check that the song exists, it should work.
  5. With getTickCount() the script is more efficient: local SECONDS = 20 -- 20 seconds between command use local tick = {} function fix(playerSource) local theVehicle = getPedOccupiedVehicle(playerSource) if theVehicle and getVehicleController ( theVehicle ) == playerSource then if getTickCount() - (tick[playerSource] or 0) >= SECONDS * 1000 then fixVehicle (theVehicle) tick[playerSource] = getTickCount() outputChatBox ("Your vehicle has been repaired !" , thePlayer) else outputChatBox ("Don't abuse the command!" , thePlayer) end end end addCommandHa
  6. Exports are slow too, and it's much faster to setElementData rather than creating a custom function, and adding it to the meta.xml. If I need to share a table with all server resources, I set the element data to the 'root', and disable data client synchronization to save bandwidth since the data is not needed client side. local mytable = { a = 1, b = 2, c = 3 } setElementData(root, "mytable", mytable, false) -- Disable sync with fourth argument -- On the other resource local mytable = getElementData(root, "mytable")
  7. local r, g, b = 255, 255, 255 dxSetShaderValue(theTechnique,"color", r / 255, g / 255, b / 255) #include "mta-helper.fx" float size = 30.0; float speed= .75; float2 resolution = float2(1, 1); float intensity = 1; float opacity = 1; float3 color = float3(1.0, 1.0, 1.0); float rate = 1.0; struct vsin { float4 Position : POSITION; float2 TexCoord : TEXCOORD0; }; struct vsout { float4 Position : POSITION; float2 TexCoord : TEXCOORD0; }; vsout vs(vsin input) { vsout output; output.Position = mul(input.Position, gWorldViewProjection); output.TexCoord = input.TexCoord; return output; }
  8. local ypos = ((totalheight * scrollheight) - (youriconsize / 2)) / (totalitems - totalheight) Change to your needs
  9. If you don't need very accurate positions, math.floor the coordinates. Anyways, assuming MTA 'fixes' this issue, you are going to be using the same amount of bandwidth vs calling the client fix, since the server will ask the client the camera matrix constantly to have it updated on server-side
  10. I have been making some tests since I still have this issue, added an IF statement to check if time was set or not since the Wiki says that it returns true if set succesfully, false otherwise: This is my current code with the IF statement: if setTime(22, 0) then setMinuteDuration(600000) -- 10 minutes = 1 ingame minute outputDebugString("[RACE] Time set") else outputDebugString("[RACE] Could not set game time") end And this is what I got: What could be the reason of setTime() returning false? Thanks EDIT: Okay so nevermind, I'm stupid.. I
  11. Call client function getCameraMatrix and return it to server
  12. Just get the cursor position with getCursorPosition, and if it's inside the image, change the image color to pink and you will have that effect.
×
×
  • Create New...