Jump to content

Solstice.

Members
  • Content Count

    42
  • Joined

  • Last visited

Community Reputation

0 Neutral

About Solstice.

  • Rank
    Rat

Details

  • Location
    South Africa, Cape Town

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. for _, cars in ipairs( getElementsByType( "vehicle" ) ) do if getElementData( cars, "mapeditor" ) == 1 then respawnVehicle( cars ) end end Add elementdata in the spawn function for normal vehicles to distinguish.
  2. The benefit of the script is being able to just load a .map file with a command instead of having to plow through the XML adding the LODs manually.
  3. I added a loop to try and get the LOD and it doesn't get a LOD. local result3 = exports.sql:query_assoc( "SELECT * FROM remove_objects WHERE mapID = " .. data.mapID .. " ORDER BY objectID ASC" ) if result3 then for k, value in ipairs( result3 ) do removeWorldModel( value.model, value.radius, value.x, value.y, value.z ) --outputChatBox( LOD_MAP[ tonumber(value.model) ) --removeWorldModel( LOD_MAP[ tonumber(value.model) ], value.radius, value.
  4. Make a loop that sums up the ammo of the same type.
  5. I don't have the LOD model of the buildings I'm trying to remove. I copied the LOD_MAP table from mapEditorScriptingExtension_s. On instance the element model of the object I'm trying to remove is 5408 (the nightclub in singleplayer) but that model isn't in there, as with the gas station in Idlewood. I was thinking of trying to use getLowLODElement but I'm not sure how to acquire the parent element I'm removing that the LOD is attached to.
  6. I'm loading XML nodes from a .map file to load maps into a server. I'm trying to add removeWorldObject nodes but for some buildings the LOD element is still there. I tried to use setOcclusionsEnabled but it's not working. Is there a way to find a work around? I was thinking of using getLowLODElement but I'm not sure how to get the world element from the model ID. I tried using the LOD_MAP from the scripting extension but it doesn't seem to work either. for k, value in ipairs( result3 ) do removeWorldModel( value.model, value.radius, value.x, value.y, value.z ) removeWorldModel( LOD_MAP[ t
  7. One of the parameters for onPlayerWasted is the killer.
  8. Make it so you can only press the button once in a while. Use toggleControl and setTimer to re-enable..
  9. http://www.lua.org/pil/2.5.html blips = { } -- Defines a table called 'blips' with no elements in it. function consoleCreateObject ( thePlayer, commandName, id ) if ( thePlayer ) then teamElement = getPlayerTeam( thePlayer ) if getTeamName(teamElement) == "Camorra" then local x, y, z = getElementPosition ( thePlayer ) local object = createObject ( tonumber(id), x, y, z, 0, 0, 0 ) -- You want it to be local so you can only use the variable in this function. table.insert( blips, object ) -- Insert the object into
  10. Solstice.

    Radar

    You need to draw a smaller image section. If your map is 6000 x 6000 then the player position can be an exact pixel. local x, y, z = getElementPosition( getLocalPlayer( ) ) local sx, sy = guiGetScreenSize( ) local radarWidth = 250 local radarHeight = 250 dxDrawImageSection ( sx/2 - radarWidth/2, sy/2 - radarHeight/2, radarWidth, radarHeight, x - mapWidth / 2,y - mapWidth / 2, 250, 250, "map.jpg" )
  11. Basically this. When the resource starts or a player joins the server it puts all data in a table. You can create a timer to update the MySQL database every 30 minutes. Make a function for the updating then call that function every 30 minutes for all players using setTimer. And onPlayerQuit would trigger the update for that player aswell.
  12. Just look for the function that spawns the zombie, and add the setElementDimension function in it. So if the variable that specifies the zombie spawned is "zombie" then you add a line in that function: setElementDimension( zombie, 2 )
  13. I barely modified the players resource and sql is left untouched. Idk if you're running it with multiple people on the server. The lag is only noticable when you have around ten people on it, and more causes more and heavier lagspikes. I'll try running a clean paradise mod and see what happens.
  14. Hello, Working on a small RP gamemode for me and some friends using MTA paradise. Thing is server performance is just horrid. There's a lot of lag. The host is perfectly fine though. I first thought it was an issue with the MySQL server but it's on the same server, so this can't be it. I get CPU spikes on the sql and players resource, and sometimes the vehicles resource. I have bandwidth reduction disabled and bullet sync is enabled in the configuration files. IPB Warning: sql is using 206% CPU IPB Warning: vehicles is using 156% CPU IPB Warning: players is using 84% CPU There's two even
×
×
  • Create New...