Jump to content

Castillo

Retired Staff
  • Posts

    21,935
  • Joined

  • Last visited

  • Days Won

    6

Everything posted by Castillo

  1. Castillo

    boneAttach

    Works perfect here, the burger get's attached to my hand.
  2. Castillo

    boneAttach

    The script with the command is server side, right? because addCommandHandler doesn't has 'thePlayer' argument on client side.
  3. Castillo

    boneAttach

    Any error(s) on debug script? is bone_attach resource running?
  4. Castillo

    boneAttach

    function burger (thePlayer) --x,y,z=getElementPosition(thePlayer) burger1 = createObject ( 2880, 0, 0, 0 ) exports.bone_attach:attachElementToBone ( burger1, thePlayer, 12, 0, 0, 0, 0, -90, 0 ) end addCommandHandler ( "bu", burger ) Your error(s): 1: You forgot about 'thePlayer' in the function . 2: You forgot to rename 'source' to 'thePlayer.
  5. Castillo

    3D text

    https://community.multitheftauto.com/index.php?p= ... ls&id=3090
  6. Is not easy for a unexperienced scripter ( no offense ), you have to edit more than one file.
  7. local trailers = {} addEventHandler ( "onResourceStart", resourceRoot, function ( ) for index, player in ipairs ( getElementsByType ( "player" ) ) do trailers[ player ] = { } end end ) addEventHandler ( "onPlayerJoin", root, function ( ) trailers[ source ] = { } end ) function attachTrailer () for _,player in pairs ( getElementsByType ( "player" ) ) do local veh = getPedOccupiedVehicle ( player ) if ( not trailers[player] ) then trailers[player] = { } end trailers[player][1] = createVehicle ( 435, 2682, -2127.5, 15, 0, 0, 90) -- create a trailer -- Here you put 'source' instead of 'player'. outputChatBox ( "A trailer will be attached", getRootElement(), 255, 0, 0 ) setTimer (attachTrailerToVehicle, 5000, 1, veh, trailers[player][1]) -- Attach trailer to roadtrain after 5 sec end end addEventHandler ( "onPlayerVehicleEnter", getRootElement(), attachTrailer )
  8. Yeah, the same happened in another topic where they wanted the same thing. I guess it's a zombies resource bug.
  9. Vehicle mod: https://community.multitheftauto.com/index.php?p= ... ls&id=3996
  10. http://www.lua.org/pil/13.html
  11. function crearBoss () BOSS = exports.zombies:createZombie ( 1086.6645507813, 1076.1888427734, 10.838157653809, 90, 13, 0, 0 ) exports.extrahealth:setElementExtraHealth(BOSS, 100000) end addEventHandler ( "onResourceStart", resourceRoot, crearBoss ) Your error(s): 1: Your function name was "crearBoss", but you we're using "createZombie" in the event handler. 2: You forgot to use 'exports' @ createZombie.
  12. That sounds like a custom object.
  13. Add the resource "sql" to "acl.xml" group "Admin".
  14. Castillo

    ID chat

    function idtag(text, msgtype) local tag = getElementData ( source, "ID" ) or 0 local tagcolor = get ( 'tagidcolor' ) or "#FFFFFF" local textcolor = get ( 'textcolor' ) or "#FFFFFF" local name = getPlayerName ( source ) local r, g, b = getPlayerNametagColor ( source ) if ( msgtype == 0 ) then cancelEvent() if ( tag ) then cancelEvent ( ) outputChatBox ( tagcolor .."[".. tag .."] #FFFFFF".. name ..": ".. textcolor .. text, root, 255, 255, 255, true) outputServerLog ( name .. ": " .. text ) end elseif ( msgtype == 2 ) then cancelEvent ( ) local team = getPlayerTeam ( source ) if ( team ) then for index, player in ipairs">ipairs ( getPlayersInTeam ( team ) ) do outputChatBox ( RGBToHex ( getTeamColor( team ) ) .."(TEAM) ".. tagcolor .."[".. tag .."] #FFFFFF".. name ..": ".. textcolor ..text, player, 255, 255, 255, true ) end end outputServerLog ( "TEAM: ".. name .. ": " .. text ) end end addEventHandler("onPlayerChat", root, idtag) function RGBToHex(red, green, blue, alpha) if ( ( red < 0 or red > 255 or green < 0 or green > 255 or blue < 0 or blue > 255 ) or ( alpha and ( alpha < 0 or alpha > 255 ) ) ) then return nil end if ( alpha ) then return string.format( "#%.2X%.2X%.2X%.2X", red, green, blue, alpha ) else return string.format( "#%.2X%.2X%.2X", red, green, blue ) end end
  15. Castillo

    Territories

    I'm afraid you're posting in the wrong forum, this is MTA forum, not the forum of the server you're talking about.
  16. local screenW, screenH = guiGetScreenSize() function values() vehicle = getPedOccupiedVehicle ( localPlayer ) if vehicle then HP = getElementHealth (vehicle) vehname = getVehicleName ( vehicle ) vehID = getElementModel ( vehicle ) end end addEventHandler("onClientRender",root,values) function drawGUI() if ( source == localPlayer and vehicle ) then HPG = guiCreateLabel(0,0,1247.0,328.0,"Health: ", false) NG = guiCreateLabel(0,0,1247.0,303.0,"Vehicle: ".. vehname .." (ID: " .. vehID .. " ) ", false) G = guiCreateLabel(0,0,1247.0,303.0,"Vehicle Info", false) guiSetFont(G,"default-bold-small") guiSetFont(NG,"default-small") guiSetFont(HPG,"default-small") guiLabelSetColor(G,0,200,0) local windowW1,windowH1=guiGetSize(HPG,false) local x1,y1 = (screenW-windowW1)/2,(screenH-windowH1)/2 guiSetPosition(HPG,x1 + 1020,y1 + 40,false) local windowW2,windowH2=guiGetSize(NG,false) local x2,y2 = (screenW-windowW2)/2,(screenH-windowH2)/2 guiSetPosition(NG,x2 + 1020,y2 + 40,false) local windowW3,windowH3=guiGetSize(G,false) local x3,y3 = (screenW-windowW3)/2,(screenH-windowH3)/2 guiSetPosition(G,x3 + 1000,y3 + 10,false) addEventHandler("onClientRender",root,renderHP) end end addEventHandler("onClientPlayerVehicleEnter", root, drawGUI) function renderHP() if HPG then guiSetText(HPG,"Health: ".. math.floor(HP) .."") else removeEventHandler("onClientRender",root,renderHP) end end function doText(command, ...) if ( command == "showvi" ) then guiSetVisibility(HPG,true) guiSetVisibility(NG,true) guiSetVisibility(G,true) elseif ( command == "hidevi" ) then guiSetVisibility(HPG,false) guiSetVisibility(NG,false) guiSetVisibility(G,false) end end addCommandHandler("showvi", doText) addCommandHandler("hidevi", doText) function deleteGUI( thePlayer ) if ( thePlayer == localPlayer ) then if HPG then destroyElement(HPG) destroyElement(NG) destroyElement(G) removeEventHandler("onClientRender",root,renderHP) end end end addEventHandler("onClientVehicleExit",root,deleteGUI) Try that.
  17. And the problem is? you didn't specify it.
  18. Lee la descripcion. No creo que use mapas, pero una tabla en el mismo script.
  19. We don't accept requests here, you can either learn to make it yourself or pay someone to do it for you. https://wiki.multitheftauto.com/wiki/Scr ... troduction https://wiki.multitheftauto.com/wiki/Int ... ng_the_GUI
  20. Ese recurso deberia crear una radar area con zombieProof.
  21. https://community.multitheftauto.com/index.php?p= ... ls&id=2020
  22. Castillo

    Little help

    http://www.microsoft.com/download/en/de ... px?id=5582
×
×
  • Create New...