-
Posts
1,273 -
Joined
-
Last visited
-
Days Won
1
Everything posted by GTX
-
Skin = {} function spawnskins(mid) if ( Skin[source] ) then setElementModel(source,tonumber(mid)) end end addEvent("spawnskin",true) addEventHandler("spawnskin",root,spawnskins)
-
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 )
-
Which jobs? In which gamemode? Give us more information.
-
https://community.multitheftauto.com/in ... ils&id=488
-
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 )
-
To loop through players in the server. onResourceStart doesn't return players or something.
-
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
-
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 )
-
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 )
-
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.
-
Nope, that's not possible yet. But yeah, you can replace them.
-
https://wiki.multitheftauto.com/wiki/Gu ... esolutions
-
Nevermind my hesitation, it is possible: https://wiki.multitheftauto.com/wiki/Cl ... ponent_IDs
-
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.
-
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)
-
You can't add new clothes, but I think you can replace them with functions below, but I'm not entirely sure. engineLoadTXD engineImportTXD
-
I think shader functions could do the job. I hope those examples can help you: https://wiki.multitheftauto.com/wiki/Shader_examples
-
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 )
-
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.
-
Glad it helped! If you want to reuse function, use _outputChatBox as in your example.
-
Check https://community.multitheftauto.com. We're only here to help, not to make scripts. Also refer to: viewtopic.php?f=91&t=47897
-
https://wiki.multitheftauto.com/wiki/Gu ... esolutions