Jump to content

benwilkins

Members
  • Posts

    80
  • Joined

  • Last visited

Recent Profile Visitors

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

benwilkins's Achievements

Transformer

Transformer (11/54)

0

Reputation

  1. I have tried the code below, and it just doesn't do anything on the maverick. I do the same code on a car, and it works perfectly as it should. I am trying to increase the acceleration and/or max speed of a maverick. setVehicleHandling(maverick, "maxVelocity", 10000) setVehicleHandling(maverick, "engineAcceleration", 10000)
  2. As you can see it would be nice if I could move the debugsscript to somewhere else on the screen. Is this possible, Havent seen any settings in my client.
  3. <removeWorldObject id="removeWorldObject (gm_build4_LAn2) (1)" radius="83.26461" interior="0" model="4718" lodModel="4719" posX="1760.1641" posY="-1127.2734" posZ="43.66406" rotX="0" rotY="0" rotZ="0"></removeWorldObject> I can't seem to remove the windows after removing the building?
  4. function toggle () local screenWidth, screenHeight = guiGetScreenSize( ) local window = guiCreateWindow( 0, 0, screenWidth/1.2, screenHeight/1.2, "Mobile Data Computer", false ) exports.global:centerWindow(window) guiSetInputEnabled(not guiGetInputEnabled()) guiWindowSetSizable ( window, false ) guiSetAlpha( window, 255) local browser = guiCreateBrowser( 0, 28, screenWidth/1.2, screenHeight/1.35, false, false, false, window ) local theBrowser = guiGetBrowser( browser ) local closeButton = guiCreateButton( 0, (screenHeight/1.35)+40, screenWidth/1.2, 50, "Close Mobile Data Computer", false, window ) addEventHandler("onClientGUIClick", closeButton, function () destroyElement(window) destroyElement(browser) destroyElement(theBrowser) destroyElement(closeButton) window = nil browser = nil theBrowser = nil guiSetInputEnabled(not guiGetInputEnabled()) end) addEventHandler( "onClientBrowserCreated", theBrowser, function( ) loadBrowserURL( source, "http://facebook.com" ) end ) end addCommandHandler("callmdc", toggle ) addEventHandler("onClientResourceStart", getResourceRootElement(), function() requestBrowserDomains({"http://facebook.com"}) end ) This code works fine sometimes, when I do it, its fine, but for everyone else, it just shows the GUI window, with no browser inside. No errors in debug.
  5. How can I request info from server scripts? Inside a client function, I need to run a SQL query, which can only be done in server, and I need to send back the row of data. I have tried: -- CLIENT function getCharacterInfo(charid) triggerServerEvent("server:getCharInfo", getRootElement(), charid) end function test () details = getCharacterInfo("1") outputChatBox(details["charactername"]) end -- SERVER function servergetCharInfo ( charid ) local cmSQL = mysql:query("SELECT * FROM `characters` WHERE `id`='"..charid.."'") or false local row = mysql:fetch_assoc(cmSQL) or false return row end addEvent( "server:getCharInfo", true ) addEventHandler( "server:getCharInfo", getRootElement(), servergetCharInfo ) Doesn't seem to work..
  6. local currentTab = guiGetSelectedTab(tabPanel) local currentTabText = currentTab[guiGetText(label)] local currentTab = guiGetSelectedTab(tabPanel) local currentTabText = currentTab.guiGetText(label) local label = guiCreateLabel (0.04, 0.04, 1, 1, "Value #1", true, tab) Above is my example code.. I create multiple tabs, and each tab has exactly the same label names, just different values. How can I get the value of something in say, "Tab 1", "Label 1", but outside of the tab creation area. Further down the scripts. I know it is possible, I have done it before, I just completely forgot how. I forgot to mention, first 2 blocks of code is what I have tried, and doesn't work.
  7. I am creating blips for all vehicles. They are fine, but how would I go about adding text to the side of the blip. My plan is to have a blip, and the vehicle name in a small bordered box to the right side. I am just unsure how to get the text binded to the blip.
  8. I am having a weird problem, I have this in my .map file when the map is loaded it removes the object, but when I go out of the interior, and re enter the interior the object is back. I tried searching, couldn't find anything like this. "removeWorldObject (MED_OFFICE_CHAIR) (14)" radius="2.7432575" interior="10" dimension="426" model="1806" lodModel="0" posX="275.15625" posY="108.34375" posZ="1007.8047" rotX="0" rotY="0" rotZ="0">
  9. Wow.. Some awesome maths right there! local x, y = getElementPosition(elem) x = math.floor((x + 3000) * g_MapSide / 6000) - 4 y = math.floor((3000 - y) * g_MapSide / 6000) - 4 guiSetPosition(player.gui.mapBlip, x, y, false) Thanks alot, I forgot all about the map in freeroam, I dont use the resource
  10. I am just thinking about a new idea that I thought up. A command to pop up a gui window, and a map inside. The map image will have icon images of players locations, I dont want to use the F11 map which would be easy, because that already has a tonne of blips on or other things. I know the map will be made with: guiCreateStaticImage ( 10, 30, 500, 500, "map.jpg", false, window) I have thought of every possible situation, and I cant seem to work it out how to convert player x,y,z into static screen x,y,z for the image icon locations. I dont think it is possible. What do you guys think?
  11. I can't believe I never thought of that. Thank you
  12. How did you solve it?
  13. Thank you, after your reply, I found out that TCP and UDP port 20031 needs to be open for anyone having this error.
×
×
  • Create New...