Jump to content

GTX

Members
  • Posts

    1,273
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by GTX

  1. GTX

    [HELP] Skin

    Skin = {} function spawnskins(mid) if ( Skin[source] ) then setElementModel(source,tonumber(mid)) end end addEvent("spawnskin",true) addEventHandler("spawnskin",root,spawnskins)
  2. GTX

    db* functions

    How about if you show us function query? And you can use parameters that are defined with ?. Example: local qh = dbQuery( connection, "INSERT INTO table_name VALUES (?,?,?)", "aaa", "bbb", 10 ) dbFree( qh )
  3. GTX

    [Help] Teams

    Which jobs? In which gamemode? Give us more information.
  4. GTX

    [Help] Car Names

    https://community.multitheftauto.com/in ... ils&id=488
  5. You forgot alignY argument. local contador = 3 local alfa = 0 local movimiento = "fadein" local screenWidth, screenHeight = guiGetScreenSize() ------------------------------------------------------------------------------ function createText () if movimiento == "fadein" then contador = contador+1 else contador = contador-1 end if contador <= 100 then alfa = 255*(contador/100) end dxDrawText("#000000"..getPlayerName(getLocalPlayer()).." #000000is the final survivor!", screenWidth/2, screenHeight/3, screenWidth/2, screenHeight/3.5, tocolor ( 255,255, 255, alfa ), 3.22, "default-bold","center", "top", false,false,false,true) if contador == 2 then removeEventHandler("onClientRender",getRootElement(),createText) end if contador == 200 then contador = 100 movimiento = "negativo" end end function HandleTheRendering ( ) addEventHandler ( "onClientRender", root, createText ) end addEventHandler ( "onClientResourceStart", resourceRoot, HandleTheRendering )
  6. To loop through players in the server. onResourceStart doesn't return players or something.
  7. Restart the server or admin resource? Well, it is possible to save teams but it's pretty advanced. I'd recommend you to use this: https://community.multitheftauto.com/index.php?p= ... ls&id=5181 or https://community.multitheftauto.com/index.php?p= ... ls&id=2855
  8. When player joins: function join() setPlayerStat ( source, 69, 1000 ) setPlayerStat ( source, 71, 1000 ) setPlayerStat ( source, 72, 1000 ) setPlayerStat ( source, 73, 1000 ) setPlayerStat ( source, 74, 1000 ) setPlayerStat ( source, 75, 1000 ) setPlayerStat ( source, 76, 1000 ) setPlayerStat ( source, 77, 1000 ) setPlayerStat ( source, 78, 1000 ) setPlayerStat ( source, 79, 1000 ) setPlayerStat ( source, 80, 1000 ) setPlayerStat ( source, 81, 1000 ) setPlayerStat ( source, 24, 1000 ) end addEventHandler ( "onPlayerJoin", getRootElement(), join ) When you start the resource, it will assign stats to every player online: function start() for i, v in ipairs(getElementsByType"player") do setPlayerStat ( v, 69, 1000 ) setPlayerStat ( v, 71, 1000 ) setPlayerStat ( v, 72, 1000 ) setPlayerStat ( v, 73, 1000 ) setPlayerStat ( v, 74, 1000 ) setPlayerStat ( v, 75, 1000 ) setPlayerStat ( v, 76, 1000 ) setPlayerStat ( v, 77, 1000 ) setPlayerStat ( v, 78, 1000 ) setPlayerStat ( v, 79, 1000 ) setPlayerStat ( v, 80, 1000 ) setPlayerStat ( v, 81, 1000 ) setPlayerStat ( v, 24, 1000 ) end end addEventHandler ( "onResourceStart", resourceRoot, start )
  9. Like this: local state = false addCommandHandler("airbrake", function(player, command) state = not state if state == true then outputChatBox"Airbrake on" elseif state == false then outputChatBox"Airbrake off" end end )
  10. GTX

    Cinema

    I found this: https://github.com/lopezloo/mta-cinema but I never tested it.
  11. I don't know, if you don't tell us which zombie script you're using, we can't help you. onBotWasted should work since the zombie gamemode is based on slothbot resource.
  12. GTX

    Help

    This must work: setCameraClip(false, true) -- Clientside I'm not sure but I think setElementCollisionsEnabled might work too?
  13. GTX

    Screen Resolution

    Yes, with everything.
  14. Nope, that's not possible yet. But yeah, you can replace them.
  15. GTX

    Screen Resolution

    https://wiki.multitheftauto.com/wiki/Gu ... esolutions
  16. Nevermind my hesitation, it is possible: https://wiki.multitheftauto.com/wiki/Cl ... ponent_IDs
  17. GTX

    help ?

    Error 401: 401 Unauthorized Similar to 403 Forbidden, but specifically for use when authentication is required and has failed or has not yet been provided. The response must include a WWW-Authenticate header field containing a challenge applicable to the requested resource. See Basic access authentication and Digest access authentication. You must have done something wrong in ACL, double-check it. Tutorial written on wiki.
  18. You must write a script! Meta: <meta> <script src="script.lua" type="client"/> <file src="file.txd"/> <file src="file.dff"/> </meta> Script: txd = engineLoadTXD("file.txd") engineImportTXD(txd, YOUR_ID) dff = engineLoadDFF("file.dff") engineReplaceModel(dff, YOUR_ID)
  19. You can't add new clothes, but I think you can replace them with functions below, but I'm not entirely sure. engineLoadTXD engineImportTXD
  20. I think shader functions could do the job. I hope those examples can help you: https://wiki.multitheftauto.com/wiki/Shader_examples
  21. GTX

    dxDrawImage

    Try: local white = tocolor(255,255,255,255) function dxDrawImage3D(x,y,z,w,h,m,c,r) local lx, ly, lz = x+w, y+h, (z+tonumber(r or 0)) or z return dxDrawMaterialLine3D(x,y,z, lx, ly, lz, m, h, c or white) end local pnet = dxCreateTexture("planet.png") addEventHandler("onClientRender", root, function() dxDrawImage3D(0,0, 20, 20, 800, pnet, tocolor(255,255,255,255)) end )
  22. In your first script, I can't see anything related to "J" error. I can't see bound key. Therefore I cannot help you with that. In your second script, aclGetGroup returns false, that's either because the group does not exist or your ACL is corrupted. In your last script, again, I can't see anything related to /dap command.
  23. Glad it helped! If you want to reuse function, use _outputChatBox as in your example.
  24. Check https://community.multitheftauto.com. We're only here to help, not to make scripts. Also refer to: viewtopic.php?f=91&t=47897
  25. https://wiki.multitheftauto.com/wiki/Gu ... esolutions
×
×
  • Create New...