Jump to content

tuaos

Members
  • Posts

    83
  • Joined

  • Last visited

Everything posted by tuaos

  1. Try using Razor Cortex; http://www.razerzone.com/cortex/game-booster Or use low resolution!
  2. Looooool .. Download one of those.. Recommended latest one.. And unpack it to your resources folder https://mirror.multitheftauto.com/mtasa/resources/
  3. https://forum.multitheftauto.com/viewtopic.php?f=108&t=86386
  4. Use this manually: getPedBonePosition attachElements Or you can try this script: https://community.multitheftauto.com/index.php?p=resources&s=details&id=2540
  5. tuaos

    MTA Local Server

    Not possible
  6. You can use it in client side with the getPlayerCount function..
  7. Use this code client only.. you can see no. of players in bottom left of screen in ur server. local screenWidth, screenHeight = guiGetScreenSize ( ) -- Get the screen resolution (width and height) function createText ( ) local count = getPlayerCount() dxDrawText ( count, 44, screenHeight - 41, screenWidth, screenHeight, tocolor ( 0, 0, 0, 255 ), 1.02, "pricedown" ) -- Draw zone name text. dxDrawText ( count, 44, screenHeight - 43, screenWidth, screenHeight, tocolor ( 255, 255, 255, 255 ), 1, "pricedown" ) end function HandleTheRendering ( ) addEventHandler ( "onClientRender", root, createText ) -- keep the text visible with onClientRender. end addEventHandler ( "onClientResourceStart", resourceRoot, HandleTheRendering ) local originalGetPlayerCount = getPlayerCount -- Store the original getPlayerCount function to a variable function getPlayerCount() -- If originalGetPlayerCount is defined, that means that this function is executed serverside. -- The next line returns the result of the original function if it's defined. If not, it counts the number of player elements (to also work clientside). return originalGetPlayerCount and originalGetPlayerCount() or #getElementsByType("player") end Now change the position as you like!!
  8. tuaos

    [HELP] Please

    1)Keep that Map"Resource in MTA San Andreas 1.4\server\mods\deathmatch\resources 2)Open "Map Editor" ingame MTA! 3)Press "F" then select second Option on top named "Open". 4)Search your map file. Load it. Done!
  9. function loginHandler(player,username,password) -- check that the username and password are correct local account = getAccount(username,password) -- the player has successfully logged in, so spawn them if account then logIn(player,account,password) spawnPlayer(player, 1959.55, -1714.46, 10) outputChatBox("Welcome to My Server.", player) else outputChatBox("Invalid username and password. Please re-connect and try again.",player) end end addEvent("submitLogin",true) addEventHandler("submitLogin",root,loginHandler)
  10. Did you add this? In Server Lua: function callClientFunction(client, funcname, ...) local arg = { ... } if (arg[1]) then for key, value in next, arg do if (type(value) == "number") then arg[key] = tostring(value) end end end -- If the clientside event handler is not in the same resource, replace 'resourceRoot' with the appropriate element triggerClientEvent(client, "onServerCallsClientFunction", resourceRoot, funcname, unpack(arg or {})) end andIn Client Lua: function callClientFunction(funcname, ...) local arg = { ... } if (arg[1]) then for key, value in next, arg do arg[key] = tonumber(value) or value end end loadstring("return "..funcname)()(unpack(arg)) end addEvent("onServerCallsClientFunction", true) addEventHandler("onServerCallsClientFunction", resourceRoot, callClientFunction)
  11. [quote name=..&G:..]Hello guys, I am trying to make a gridlist with items, and when the player clicks a row with lets say "Item1", the image from the left size of the gridlist, is updated with a value from the table: local items = { {"Infernus", 5, "vehicles/infernus.png"}, {"Bullet", 3, "vehicles/bullet.png"}, } for i, v in ipairs(items) do local row = guiGridListAddRow(donItemsList) guiGridListSetItemText(donItemsList, row, donItemsName, v[1], false, false) guiGridListSetItemText(donItemsList, row, donItemsPrice, v[2]..".00 €", false, false) end I don't know how to update the picture and and to get the picture of the selected item... Thanks. guiGridListGetSelectedItem
  12. local cam = getCameraTarget() attachElements( cam, chair )
  13. setDevelopementMode is Client-Sided
  14. tuaos

    2 questions

    Use this code in your lua: function enterVehicle ( player, seat, jacked ) local owner = getPlayerName ( player ) if not getElementData ( source, "myboat") == owner then cancelEvent() end end addEventHandler ( "onVehicleStartEnter", getRootElement(), enterVehicle )
  15. To open server console, go to the directory where mta-server present then use: screen -ls You will get PROCESS_ID of your server, there might be more than 1 process_ID. Copy both of them and try with each using, screen -r PROCESS_ID use your process_ID no. instead of PROCESS_ID in above code. Now you can control your server from console!
  16. tuaos

    Help me fast

    local fishmark = createMarker ( -2185.32202, 2416.38135, 4.5, "cylinder", 1.5, 255, 255, 0, 255 ) createBlipAttachedTo ( fishmark, 9 ) function outPut ( hitElement, matchingDimension ) if not isPedInVehicle ( hitElement ) and not (getElementData ( hitElement, "fisher" ) == true) then outputChatBox ( "Press E to start the job", hitElement, 255, 255, 0, true ) end if not isPedInVehicle ( hitElement ) and (getElementData ( hitElement, "fisher" ) == true) then outputChatBox ( "You have already started the job before", hitElement, 255, 255, 0, true ) end end addEventHandler( "onMarkerHit", fishmark, outPut ) function start ( hitElement, key, keyState ) local name = getPlayerName (hitElement) if not isPedInVehicle ( hitElement ) and not (getElementData ( hitElement, "fisher" ) == true) then if hitElement then setElementData ( hitElement, "fisher", true ) local boat = createVehicle ( 473, -2218.21387, 2419.93970, 1 ) local blip = createBlipAttachedTo ( boat, 56 ) setElementVisibleTo ( blip, root, false ) setElementData ( boat, "myboat", name ) setElementVisibleTo ( blip, hitElement, true ) outputChatBox ( "Your boat is in the water, find it and start your job", hitElement, 255, 255, 0, true ) unbindKey ( hitElement, "E", "down", start ) end end end function bind (hitElement, matchingDimension) bindKey ( hitElement, "E", "down", start ) end addEventHandler( "onMarkerHit", fishmark, bind ) function unbind ( hitElement, matchingDimension ) unbindKey ( hitElement, "E", "down", start ) end addEventHandler( "onMarkerLeave", fishmark, unbind )
  17. function skinTeam(oldModel, newModel) local players = getElementsByType ( "player" ) for i,thePlayer in ipairs(players) do if newModel == skinID then -- skinID must be filled with your preferred ID if not isPlayerInTeam(thePlayer, "team Name") then -- set your team name cancelEvent() end end end end addEventHandler("onElementModelChange", root, skinTeam) function isPlayerInTeam(player, team) assert(isElement(player) and getElementType(player) == "player", "Bad argument 1 @ isPlayerInTeam [player expected, got " .. tostring(player) .. "]") assert((not team) or type(team) == "string" or (isElement(team) and getElementType(team) == "team"), "Bad argument 2 @ isPlayerInTeam [nil/string/team expected, got " .. tostring(team) .. "]") return getPlayerTeam(player) == (type(team) == "string" and getTeamFromName(team) or (type(team) == "userdata" and team or (getPlayerTeam(player) or true))) end
  18. setElementData ( source, "fisherman", true) --Use it on function for accepting job This will set the player data as fisherman, source is the player so make sure to change it according to your function argument for player Element. -- use it for checking if ( getElementData( source, "fisherman" ) == true ) then Same for source, define it accordingly...
  19. https://github.com/WilliamDASILVA/thesimsmta
  20. tuaos

    Help!

    If you want to set position outside world, then no need to use setElementInterior Or if you want to set Interior then use this. setElementInterior ( theElement, interiorID) --visit link down to get interior ID you prefer. https://wiki.multitheftauto.com/wiki/Interior_IDs For Dimension, setElementDimension ( theElement, anyNo ) --anyNo you like, 0 is default. Note that theElement is the player, so specify it.
  21. tuaos

    Help!

    onMarkerHit setElementPosition
  22. VPS is not really meant for gaming, there are alot of chances of DDOS attack due to instability and not even good for single server. Dedicated is the best choice and yeah you could give a try on Cloud host, its better than Classic VPS(Linux).
×
×
  • Create New...