Jump to content

TrapLord Studios™

Members
  • Posts

    328
  • Joined

  • Last visited

Everything posted by TrapLord Studios™

  1. Hello there everyone, I would like help in setting up "MTA:RP" Scripts. I have the DB and everything. The only problem I am having, thus far is that I can't login or register.
  2. How do I make a UCP for my server?
  3. NO I want help in setting up, The Multi Theft Auto ROleplay Scripts.
  4. I would like help, in setting Up MTA:RP roleplay scripts.
  5. In mta it is possible to put mods in your server using scripts, I want to know if it is possible to Put Building mods aswell? Please Help me with this.
  6. I need Help with this, all things setup, when I Register it registers and i see the account come up in the localhost but I cant login. What to do?
  7. No i mean, like in the mtaserver.conf <!-- If set, this parameter specifies the external URL from which clients will be able to download needed resources ingame. Otherwise they will download them directly from the server. --> <httpdownloadurl></httpdownloadurl> this how do i make one of these
  8. How do you make one of those links for your server for ppl to download resources from instead of directly? Please Help me.
  9. I need help how to make the shodown speedometer look like this with the two addons. It has the pictures in the resource but its not showing in game. This is the code it has fuellessVehicle = { [594]=true, [537]=true, [538]=true, [569]=true, [590]=true, [606]=true, [607]=true, [610]=true, [590]=true, [569]=true, [611]=true, [584]=true, [608]=true, [435]=true, [450]=true, [591]=true, [472]=true, [473]=true, [493]=true, [595]=true, [484]=true, [430]=true, [453]=true, [452]=true, [446]=true, [454]=true, [497]=true, [592]=true, [577]=true, [511]=true, [548]=true, [512]=true, [593]=true, [425]=true, [520]=true, [417]=true, [487]=true, [553]=true, [488]=true, [563]=true, [476]=true, [447]=true, [519]=true, [460]=true, [469]=true, [513]=true, [509]=true, [510]=true, [481]=true } enginelessVehicle = { [510]=true, [509]=true, [481]=true } local active = true local fuel = 0 function drawSpeedo() if active and not isPlayerMapVisible() then local vehicle = getPedOccupiedVehicle(getLocalPlayer()) if (vehicle) then speed = exports.global:getVehicleVelocity(vehicle) local width, height = guiGetScreenSize() local x = width local y = height -- street names local streetname = getElementData(getLocalPlayer(), "speedo:street" ) if streetname and getVehicleType(vehicle) ~= "Car" and getVehicleType(vehicle) ~= "Helicopter" and getVehicleType(vehicle) ~= "Plane" then local width = dxGetTextWidth( streetname ) local x = width < 200 and ( x - 110 - width / 2 ) or ( x - 10 - width ) dxDrawRectangle( x - 8, y - 296, width + 17, 24, tocolor( 5, 5, 5, 220 ) ) dxDrawText( streetname, x, y - 292 ) end dxDrawImage(x-210, y-275, 200, 200, "disc.png", 0, 0, 0, tocolor(255, 255, 255, 200)) local speedlimit = getElementData(getLocalPlayer(), "speedo:limit") if speedlimit and getVehicleType(vehicle) ~= "Car" and getVehicleType(vehicle) ~= "Helicopter" and getVehicleType(vehicle) ~= "Plane" then local ax, ay = x - 243, y - 202 dxDrawImage(ax,ay,32,37,"images/speed" .. speedlimit .. ".png") ay = ay - 32 if speedlimit >= 120 then dxDrawImage(ax,ay,32,37,"images/highway.png") ay = ay - 32 end if speed > speedlimit then dxDrawImage(ax,ay,32,37,"images/accident.png") end end speed = speed - 100 nx = x + math.sin(math.rad(-(speed)-150)) * 90 ny = y + math.cos(math.rad(-(speed)-150)) * 90 dxDrawLine(x-110, y-175, nx-110, ny-175, tocolor(255, 0, 0, 255), 2) dxDrawText( tostring(math.floor(getDistanceTraveled()/1000)), x - 117, y - 215, 5, 5, tocolor (255,255,255, 200), 1 ) end end end function syncFuel(ifuel) if not (ifuel) then fuel = 100 else fuel = ifuel end end addEvent("syncFuel", true) addEventHandler("syncFuel", getRootElement(), syncFuel) function drawFuel() if active and not isPlayerMapVisible() then local vehicle = getPedOccupiedVehicle(getLocalPlayer()) if (vehicle) then local width, height = guiGetScreenSize() local x = width local y = height dxDrawImage(x-265, y-165, 100, 100, "fueldisc.png", 0, 0, 0, tocolor(255, 255, 255, 200)) movingx = x + math.sin(math.rad(-(fuel)-50)) * 50 movingy = y + math.cos(math.rad(-(fuel)-50)) * 50 dxDrawLine(x-215, y-115, movingx-210, movingy-115, tocolor(255, 0, 0, 255), 2) if fuel < 10 then local ax, ay = x - 274, y - 202 if (getElementData(vehicle, "vehicle:windowstat") == 1) then ay = ay - 32 end if getTickCount() % 1000 < 500 then dxDrawImage(ax,ay,32,37,"images/fuel.png") else dxDrawImage(ax,ay,32,37,"images/fuel2.png") end end end end end function drawWindow() if active and not isPlayerMapVisible() then local vehicle = getPedOccupiedVehicle(getLocalPlayer()) if (vehicle) then local width, height = guiGetScreenSize() local x = width local y = height if (getElementData(vehicle, "vehicle:windowstat") == 1) then local ax, ay = x - 274, y - 202 dxDrawImage(ax,ay,32,37,"images/window.png") end end end end -- Check if the vehicle is engineless or fuelless when a player enters. If not, draw the speedo and fuel needles. function onVehicleEnter(thePlayer, seat) if (thePlayer==getLocalPlayer()) then if (seat<2) then local id = getElementModel(source) if seat == 0 and not (fuellessVehicle[id]) then addEventHandler("onClientRender", getRootElement(), drawFuel) end if not (enginelessVehicle[id]) then addEventHandler("onClientRender", getRootElement(), drawSpeedo) addEventHandler("onClientRender", getRootElement(), drawWindow) end end end end addEventHandler("onClientVehicleEnter", getRootElement(), onVehicleEnter) -- Check if the vehicle is engineless or fuelless when a player exits. If not, stop drawing the speedo and fuel needles. function onVehicleExit(thePlayer, seat) if (thePlayer==getLocalPlayer()) then if (seat<2) then local id = getElementModel(source) if seat == 0 and not (fuellessVehicle[id]) then removeEventHandler("onClientRender", getRootElement(), drawFuel) end if not(enginelessVehicle[id]) then removeEventHandler("onClientRender", getRootElement(), drawSpeedo) removeEventHandler("onClientRender", getRootElement(), drawWindow) end end end end addEventHandler("onClientVehicleExit", getRootElement(), onVehicleExit) function hideSpeedo() removeEventHandler("onClientRender", getRootElement(), drawSpeedo) removeEventHandler("onClientRender", getRootElement(), drawFuel) removeEventHandler("onClientRender", getRootElement(), drawWindow) end function showSpeedo() source = getPedOccupiedVehicle(getLocalPlayer()) if source then if getVehicleOccupant( source ) == getLocalPlayer() then onVehicleEnter(getLocalPlayer(), 0) elseif getVehicleOccupant( source, 1 ) == getLocalPlayer() then onVehicleEnter(getLocalPlayer(), 1) end end end -- If player is not in vehicle stop drawing the speedo needle. function removeSpeedo() if not (isPedInVehicle(getLocalPlayer())) then hideSpeedo() end end setTimer(removeSpeedo, 1000, 0) addCommandHandler( "togglespeedo", function( ) local source = getPedOccupiedVehicle(getLocalPlayer()) if source then active = not active if active then outputChatBox( "Speedo is now on.", 0, 255, 0 ) else outputChatBox( "Speedo is now off.", 255, 0, 0 ) end end end ) addEventHandler( "onClientResourceStart", getResourceRootElement(), showSpeedo ) addEvent("addWindow", true) addEventHandler("addWindow", getRootElement(), function () if source == getLocalPlayer() then addEventHandler("onClientRender", getRootElement(), drawWindow) end end ) addEvent("removeWindow", true) addEventHandler("removeWindow", getRootElement(), function () if source == getLocalPlayer() then removeEventHandler("onClientRender", getRootElement(), drawWindow) end end )
  10. I transfered Interior-system from hereitic rp resources and put it with vg and it adds the interior but u dont see words and u cant enter plz help
  11. FOr this server please help you will get admin and cash http://cyborgroleplay.freeinvision.net/ Just to make help make this server success and improve it'
  12. Good Day every one, i am having a problem with the /makeveh cmd in the shodown roleplay script, when i use it i see the syntax but when i do it correctly it doesnt work. I am also having a problem with the interior, when i make an interior it says the "Government Cant Afford". I would Like If you help me please
  13. Good day everyone, i would like if i can get the lod id for model (5397) please and thank you!
  14. Can you give me the code for removing the lod please.
  15. When i Remove the Building it works but i still see the Building, I am using this code: removeWorldModel(5397,10,1866.4000244141,-1789.9000244141,20.89999961853)
  16. yh thats it thanks am whats your skype maybe u can help me with stuff. Edit: But how do i get the default position of the default objects? Edit 2: I am seeing the building still but i can walk through it
  17. Ok everyone I want to remove only one building in the default SA map i used this code for i=0, 4023 do removeWorldModel(i,4023,0,0,0) end But it doesnt work, I still see the building, and when i go close i walk through it. Please help.
  18. Watch this Castillo, the image is scripted but when you go in you dont see it wats the problem? local SCOREBOARD_WIDTH = 420 -- The scoreboard window width local SCOREBOARD_HEIGHT = 360 -- The scoreboard window height local SCOREBOARD_HEADER_HEIGHT = 25 -- Height for the header in what you can see the server info local SCOREBOARD_TOGGLE_CONTROL = "tab" -- Control/Key to toggle the scoreboard visibility local SCOREBOARD_PGUP_CONTROL = "mouse_wheel_up" -- Control/Key to move one page up local SCOREBOARD_PGDN_CONTROL = "mouse_wheel_down"-- Control/Key to move one page down local SCOREBOARD_DISABLED_CONTROLS = { "next_weapon", -- Controls that are disabled when the scoreboard is showing "previous_weapon", "aim_weapon", "radio_next", "radio_previous" } local SCOREBOARD_TOGGLE_TIME = 50 -- Time in miliseconds to make the scoreboard (dis)appear local SCOREBOARD_POSTGUI = true -- Set to true if it must be drawn over the GUI local SCOREBOARD_INFO_BACKGROUND = { 255,0,0, 200 } -- RGBA color for the info header background local SCOREBOARD_SERVER_NAME_COLOR = { 0, 255,50, 160 } -- RGBA color for the server name text local SCOREBOARD_PLAYERCOUNT_COLOR = { 255, 255,50, 160 } -- RGBA color for the server player count text local SCOREBOARD_BACKGROUND = { 0,0,0, 200} -- RGBA color for the background local SCOREBOARD_BACKGROUND_IMAGE = { 255, 255, 255, 0 } -- RGBA color for the background image local SCOREBOARD_HEADERS_COLOR = { 0, 0, 0, 255 } -- RGBA color for the headers local SCOREBOARD_SEPARATOR_COLOR = { 82, 82, 82, 140 } -- RGBA color for the separator line between headers and body content local SCOREBOARD_SCROLL_BACKGROUND = { 0, 10, 20, 0 } -- RGBA color for the scroll background local SCOREBOARD_SCROLL_FOREGROUND = { 15, 177, 253, 0 } -- RGBA color for the scroll foreground local SCOREBOARD_SCROLL_HEIGHT = 40 -- Size for the scroll marker local SCOREBOARD_COLUMNS_WIDTH = { 0.08, 0.74, 0.14, 0.04 } -- Relative width for each column: id, player name, ping and scroll position local SCOREBOARD_ROW_GAP = 0 -- Gap between rows = 0 -- Gap between rows --[[ Global variables to this context ]]-- local g_isShowing = false -- Marks if the scoreboard is showing local g_currentWidth = 0 -- Current window width. Used for the fade in/out effect. local g_currentHeight = 0 -- Current window height. Used for the fade in/out effect. local g_scoreboardDummy -- Will contain the scoreboard dummy element to gather info from. local g_windowSize = { guiGetScreenSize () } -- The window size local g_localPlayer = getLocalPlayer () -- The local player... local g_currentPage = 0 -- The current scroll page local g_players -- We will keep a cache of the conected player list local g_oldControlStates -- To save the old control states before disabling them for scrolling --[[ Pre-calculate some stuff ]]-- -- Scoreboard position local SCOREBOARD_X = math.floor ( ( g_windowSize[1] - SCOREBOARD_WIDTH ) / 2 ) local SCOREBOARD_Y = math.floor ( ( g_windowSize[2] - SCOREBOARD_HEIGHT ) / 2 ) -- Scoreboard colors SCOREBOARD_INFO_BACKGROUND = tocolor ( unpack ( SCOREBOARD_INFO_BACKGROUND ) ) SCOREBOARD_SERVER_NAME_COLOR = tocolor ( unpack ( SCOREBOARD_SERVER_NAME_COLOR ) ) SCOREBOARD_PLAYERCOUNT_COLOR = tocolor ( unpack ( SCOREBOARD_PLAYERCOUNT_COLOR ) ) SCOREBOARD_BACKGROUND = tocolor ( unpack ( SCOREBOARD_BACKGROUND ) ) SCOREBOARD_BACKGROUND_IMAGE = tocolor ( unpack ( SCOREBOARD_BACKGROUND_IMAGE ) ) SCOREBOARD_HEADERS_COLOR = tocolor ( unpack ( SCOREBOARD_HEADERS_COLOR ) ) SCOREBOARD_SCROLL_BACKGROUND = tocolor ( unpack ( SCOREBOARD_SCROLL_BACKGROUND ) ) SCOREBOARD_SCROLL_FOREGROUND = tocolor ( unpack ( SCOREBOARD_SCROLL_FOREGROUND ) ) SCOREBOARD_SEPARATOR_COLOR = tocolor ( unpack ( SCOREBOARD_SEPARATOR_COLOR ) ) -- Columns width in absolute units for k=1,#SCOREBOARD_COLUMNS_WIDTH do SCOREBOARD_COLUMNS_WIDTH[k] = math.floor ( SCOREBOARD_COLUMNS_WIDTH[k] * SCOREBOARD_WIDTH ) end -- Pre-calculate each row horizontal bounding box. local rowsBoundingBox = { { SCOREBOARD_X, -1 }, { -1, -1 }, { -1, -1 }, { -1, -1 } } -- ID rowsBoundingBox[1][2] = SCOREBOARD_X + SCOREBOARD_COLUMNS_WIDTH[1] -- Name rowsBoundingBox[2][1] = rowsBoundingBox[1][2] rowsBoundingBox[2][2] = rowsBoundingBox[2][1] + SCOREBOARD_COLUMNS_WIDTH[2] -- Ping rowsBoundingBox[3][1] = rowsBoundingBox[2][2] rowsBoundingBox[3][2] = rowsBoundingBox[3][1] + SCOREBOARD_COLUMNS_WIDTH[3] -- Scrollbar rowsBoundingBox[4][1] = rowsBoundingBox[3][2] rowsBoundingBox[4][2] = SCOREBOARD_X + SCOREBOARD_WIDTH --[[ Pre-declare some functions ]]-- local onRender local fadeScoreboard local drawBackground local drawScoreboard --[[ * clamp Clamps a value into a range. --]] local function clamp ( valueMin, current, valueMax ) if current < valueMin then return valueMin elseif current > valueMax then return valueMax else return current end end --[[ * createPlayerCache Generates a new player cache. --]] local function createPlayerCache ( ignorePlayer ) -- Optimize the function in case of not having to ignore a player if ignorePlayer then -- Clear the gloal table g_players = {} -- Get the list of connected players local players = getElementsByType ( "player" ) -- Dump them to the global table for k, player in ipairs(players) do if ignorePlayer ~= player then table.insert ( g_players, player ) end end else g_players = getElementsByType ( "player" ) end --[[ Uncomment to test with dummies ]]-- --[[ for k,v in ipairs(getElementsByType("playerDummy")) do table.insert(g_players, v) end --]] -- Sort the player list by their ID, giving priority to the local player table.sort ( g_players, function ( a, b ) local idA = getElementData ( a, "playerid" ) or 0 local idB = getElementData ( b, "playerid" ) or 0 -- Perform the checks to always set the local player at the beggining if a == g_localPlayer then idA = -1 elseif b == g_localPlayer then idB = -1 end return tonumber(idA) < tonumber(idB) end ) end --[[ * onClientResourceStart Handles the resource start event to create the initial player cache --]] addEventHandler ( "onClientResourceStart", getResourceRootElement(getThisResource()), function () createPlayerCache () end, false ) --[[ * onClientElementDataChange Handles the element data changes event to update the player cache if the playerid was changed. --]] addEventHandler ( "onClientElementDataChange", root, function ( dataName, dataValue ) if dataName == "playerid" then createPlayerCache () end end ) --[[ * onClientPlayerQuit Handles the player quit event to update the player cache. --]] addEventHandler ( "onClientPlayerQuit", root, function () createPlayerCache ( source ) end ) --[[ * toggleScoreboard Toggles the visibility of the scoreboard. --]] local function toggleScoreboard ( show ) -- Force the parameter to be a boolean local show = show == true -- Check if the status has changed if show ~= g_isShowing then g_isShowing = show if g_isShowing and g_currentWidth == 0 and g_currentHeight == 0 then -- Handle the onClientRender event to start drawing the scoreboard. addEventHandler ( "onClientPreRender", root, onRender, false ) end -- Little hack to avoid switching weapons while moving through the scoreboard pages. if g_isShowing then g_oldControlStates = {} for k, control in ipairs ( SCOREBOARD_DISABLED_CONTROLS ) do g_oldControlStates[k] = isControlEnabled ( control ) toggleControl ( control, false ) end else for k, control in ipairs ( SCOREBOARD_DISABLED_CONTROLS ) do toggleControl ( control, g_oldControlStates[k] ) end g_oldControlStates = nil end end end --[[ * onToggleKey Function to bind to the appropiate key the function to toggle the scoreboard visibility. --]] local function onToggleKey ( key, keyState ) -- Check if the scoreboard element has been created if not g_scoreboardDummy then local elementTable = getElementsByType ( "scoreboard" ) if #elementTable > 0 then g_scoreboardDummy = elementTable[1] else return end end -- Toggle the scoreboard, and check that it's allowed. toggleScoreboard ( keyState == "down" and getElementData ( g_scoreboardDummy, "allow" ) ) end bindKey ( SCOREBOARD_TOGGLE_CONTROL, "both", onToggleKey ) --[[ * onScrollKey Function to bind to the appropiate key the function to change the current page. --]] local function onScrollKey ( direction ) if g_isShowing then if direction then g_currentPage = g_currentPage + 1 else g_currentPage = g_currentPage - 1 if g_currentPage < 0 then g_currentPage = 0 end end end end bindKey ( SCOREBOARD_PGUP_CONTROL, "down", function () onScrollKey ( false ) end ) bindKey ( SCOREBOARD_PGDN_CONTROL, "down", function () onScrollKey ( true ) end ) --[[ * onRender Event handler for onClientPreRender. It will forward the flow to the most appropiate function: fading-in, fading-out or drawScoreboard. --]] onRender = function ( timeshift ) -- Boolean to check if we must draw the scoreboard. local drawIt = false if g_isShowing then -- Check if the scoreboard has been disallowed if not getElementData ( g_scoreboardDummy, "allow" ) then
  19. Please reply i would like to know how to script a Radio for my server that plays 3d.
  20. Hello everyone again, i would like to now how to put an image as the background for an Roleplay Scoreboard. please help me thanks!
  21. Hey, All mta players, i want to know how do i find the Screen POS XYZ so i will know where to put a certain picture, is there a script or seomting i can use inorder to do this please help me.
×
×
  • Create New...