Jump to content


  • Posts

  • Joined

  • Last visited

About Mr3b

  • Birthday 01/01/1996


  • Gang
  • Location
  • Occupation
  • Interests

Recent Profile Visitors

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

Mr3b's Achievements


Square (6/54)



  1. Can you provied the code?
  2. So i am trying to edit a custom plate script to new style but when i use dxSetShaderValue(tex_plates[vehicle], "platetex", rt) The plate show small like this and when i add engineApplyShaderToWorldTexture(tex_plates[vehicle], "plateback*") It show 2 plates the small one and correct one like this Full Code: local color = 0xff111111 local font = dxCreateFont("files/font.ttf", 20, true) local size = 1.5 local tex_plates = {} local raw_shader = [[ texture platetex; technique TECHNIQUE_REPLACE { pass P0 { Texture[0] = platetex; } } ]] -- Load the custom image for the license plate local customPlateTexture = dxCreateTexture("files/plate.png", "dxt5") local function getPlateShader(vehicle) if tex_plates[vehicle] then if isElement(tex_plates[vehicle]) then destroyElement(tex_plates[vehicle]) end tex_plates[vehicle] = nil end local rtWidth, rtHeight = 226, 123 local rt = dxCreateRenderTarget(rtWidth, rtHeight) dxSetRenderTarget(rt) dxDrawImage(0, 0, rtWidth, rtHeight, customPlateTexture) -- Add the custom plate background image dxDrawText("111", 2, 2, 112 + 2, 59 + 2, color, size, font, "center", "center") dxDrawText("R3B", 117, 3, 78 + 117, 58 + 3, color, size, font, "center", "center") dxDrawText("111", 2, 64, 112 + 2, 59 + 64, color, size, font, "center", "center") dxDrawText("R3B", 117, 64, 78 + 117, 58 + 64, color, size, font, "center", "center") dxSetRenderTarget() tex_plates[vehicle] = dxCreateShader(raw_shader) dxSetShaderValue(tex_plates[vehicle], "platetex", rt) -- engineApplyShaderToWorldTexture(tex_plates[vehicle], "plateback*") return tex_plates[vehicle] end local function onStreamIn(vehicle) local shader = getPlateShader(vehicle) engineApplyShaderToWorldTexture(shader, "custom_car_plate", vehicle) end local function onStreamOut(vehicle) if tex_plates[vehicle] then engineRemoveShaderFromWorldTexture(tex_plates[vehicle], "custom_car_plate", vehicle) if isElement(tex_plates[vehicle]) then destroyElement(tex_plates[vehicle]) end tex_plates[vehicle] = nil end end addEventHandler("onClientElementStreamIn", root, function() if getElementType(source) == "vehicle" then onStreamIn(source) end end) addEventHandler("onClientElementStreamOut", root, function() if getElementType(source) == "vehicle" then onStreamOut(source) end end) addEventHandler("onClientResourceStart", resourceRoot, function() local vehicles = getElementsByType("vehicle", root, true) for i = 1, #vehicles do onStreamIn(vehicles[i]) end end) addEventHandler("onClientRestore", root, function(cleared) if cleared then for vehicle in pairs(tex_plates) do onStreamOut(vehicle) onStreamIn(vehicle) end end end)
  3. Mr3b

    Brodcast Error

    i am trying to create a voice mode on teams but i get this error but i don't know why can anyone help please?, thanks. Bad 'broadcastTo' pointer @ 'setPlayerVoiceBroadcastTo'(2) here is my code ( only server ) function getTeamPlayers(target) local teamTable = {} if not (Team.isInTeam(target)) then return false end for i, player in ipairs(getElementsByType("player")) do if (Team.inSameTeam(target, player)) then if (player ~= target) then if (getElementData(target, "radio")) then table.insert(teamTable, player) end end end end return teamTable end setTimer(function() for i, player in ipairs(getElementsByType("player")) do setPlayerVoiceBroadcastTo(player, getTeamPlayers(player)) end end, 1150, 0) function radioON(thePlayer) setElementData(thePlayer, "radio", true) end function radioOFF(thePlayer) setElementData(thePlayer, "radio", false) end function bindKeyJoin() bindKey(source, "/", "down", radioON) bindKey(source, "/", "up", radioOFF) end addEventHandler('onPlayerJoin', root, bindKeyJoin) function bindKeyOnStart() for i, player in pairs(getElementsByType("player")) do bindKey(player, "/", "down", radioON) bindKey(player, "/", "up", radioOFF) end end addEventHandler('onResourceStart', getResourceRootElement(getThisResource()), bindKeyOnStart)
  4. Hello, I am now creating a downloading screen in my server and I was wondering how can I know the name of the file being downloaded, and of course I use onClientTransferBoxProgressChange If you know the answer please reply.
  5. Try This addEvent("textoComprado", true) addEventHandler("textoComprado", root, function() local model = getElementModel(source) local charID = exports.players:getCharacterID(source) if (exports.sql:query_free("UPDATE characters SET skin= '" .. model .."' WHERE characterID = '"..charID.."'")) then -- ..... end end )
  6. Mr3b

    help me please

    This for build car --Server Side function checkAccess(thePlayer) if isPlayerInACL(thePlayer, "") then local veh = createVehicle(vehid, x, y, z, 0, 0, rotz) if (veh) then outputChatBox("Done") end else outputChatBox("Access Denied!") end end addCommandHandler("createveh", checkAccess And This for Enter car --Server Side vehs = { [598]=true, [596]=true, [597]=true, [599]=true } function enterVehicle ( theVehicle, seat, jacked ) --when a player enters a vehicle if ( vehs[getElementModel ( theVehicle )] ) and ( not isPlayerInACL(source, "") ) then -- if the vehicle is one of 4 police cars, and the skin is not a police skin removePedFromVehicle ( source ) -- force the player out of the vehicle end end addEventHandler ( "onPlayerVehicleEnter", getRootElement(), enterVehicle ) Source : https://wiki.multitheftauto.com/wiki/OnPlayerVehicleEnter https://wiki.multitheftauto.com/wiki/IsPlayerInACL
  7. Mr3b


    did you try it ?
  8. Mr3b

    help me please

    Do you mean a dedicated group that can ride or build a car?
  9. Mr3b


    Look at this
  • Create New...