subenji99

Members
  • Content Count

    264
  • Joined

  • Last visited

Community Reputation

1 Neutral

About subenji99

  • Rank
    Peon

Recent Profile Visitors

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

  1. Indeed, the shader can be applied/unapplied at will to control whether the texture is replaced or not, and shaders can do a whole lot more than just basic texture replacement!
  2. Yes, it's possible by way of shaders in MTA 1.1. Here is the shader fx code you need (provided with no restrictions by Gamesnert): texture gTexture; technique TexReplace { pass P0 { Texture[0] = gTexture; } } As you can see, all it does is substitute the texture it would have used for the one you provide. In lua, you use it like so: addEventHandler( "onClientResourceStart", resourceRoot, function() texture = dxCreateTexture ( "path/to/imagename.png/.jpg/.bmp" ) shader, tec = dxCreateShader( "texturereplaceshader.fx" ) --bit of sanity checking if not shader then outputConsole( "Could not create shader. Please use debugscript 3" ) destroyElement( texture ) return elseif not texture then outputConsole( "loading texture failed" ) destroyElement ( shader ) tec = nil return else engineApplyShaderToWorldTexture ( shader, "internalfilenamewithoutextension" ) dxSetShaderValue ( shader, "gTexture", texture ) end end ) dxCreateTexture is quite versatile for what filetypes it will take, but it will not accept txd files, and the files given should be in sizes of a power of 2. (1,2,4,8,16,32,64,128,256...) If you don't want a texture to be stretched/cropped, it should match the size of the texture you're replacing. You can call the shader file whatever you want, as long as it's referenced correctly in the code and the meta.xml. Use the tag. The internal texture file name can be retrieved in one of 2 ways: the 'hard' way of calling http://wiki.multitheftauto.com/wiki/Eng ... xtureNames and trying to identify which one in the list you are after, or how DazzaJay hinted at above, open the relevant TXD file in an editor and see what the filename is for the texture you want to replace. Don't append an extension. The dxSetShaderValue line actually passes the texture data to the shader. If you want an animated texture, you can keep calling this function. (this is what Gamesnert's nyancat resource does) the "gTexture" string is a reference to the texture variable defined in the shader file. Remember to also send your clients the image file! Again, use the tag. common names for car paintjobs: body256 e.g.: elegy2body256 flash3body256 jester1body256 stratum2body256 sultan2body256
  3. http://gamingbolt.com/2010/03/20/15-mod ... pc-gaming/ GamingBolt ran an article on ther 15 most influential PC modding teams and MTA Team came 13th! I've always felt MTA hasn't received half of the attention it rightly deserves in relation to the effort that has gone into it. The entire team should be very proud of their accomplishments, and congratulations on the accolade!
  4. http://www.rpmfind.net//linux/RPM/fedor ... .i586.html When dealing with dependencies, it's always best to search for a package that provides it.
  5. The non-functional "community" login is not how you authenticate with your own server. Read the server manual again. http://wiki.multitheftauto.com/wiki/Ser ... nistrators
  6. subenji99

    Mta race death ??

    Funny, I thought the archive link was there for just that reason. And indeed, http://files.mtasa.com/apps/1.0/race/
  7. local SpawnElements = getElementsByType ( "spawnpoint", mapRoot ) for key, value in pairs(SpawnElements) do --DELETE THIS LINE!!! local value = SpawnElements[math.random(#SpawnElements)] local x = tonumber( getElementData( value, "posX" ) ) --50p was correct in that these have to be converted to numbers, I missed that local y = tonumber( getElementData( value, "posY" ) ) local z = tonumber( getElementData( value, "posZ" ) ) local r = tonumber( getElementData( value, "rotZ" ) or 0 ) repeat until spawnPlayer ( thePlayer , x, y, z, r, math.random (0,288)) end --DELETE THIS LINE!!! Do you have any notion of code execution AT ALL? Look back to what I said earlier: I told you what to put in instead of looping through, and you totally ignored me and just pasted in my replacement, IN THE LOOP I TOLD YOU NOT TO USE. You are currently spawning the same player over and over again for as many times as you have spawnpoints. Remove the for...do ... end loop lines altogether. You do NOT need to parse every spawnpoint, just pick one of them, which the code I wrote for you did. This will be the last time I help you in this matter, as clearly you just want someone to just fix your code for you. I help people correct their mistakes, not do their work for them.
  8. Or you failed to notice that the result was a Heuristics detection, meaning your anti-virus "guessed" as it does modify an executable, which is often (but not always) virus behaviour.
  9. subenji99

    AFK kick

    Indeed, I was saying that a player that uses a gamepad will be sending AnalogState's, not the usual digital inputs. Therefore this code will not see any input, and will kick an active player.
  10. If I recall, Interstate69 had fatal issues (causing a server crash I think), which is why it was not updated. As long as you give credit however, I doubt anyone would mind it being fixed up, and it may well be possible that the problem does not exist anymore.
  11. If I recall, Interstate69 had fatal issues (causing a server crash I think), which is why it was not updated. As long as you give credit however, I doubt anyone would mind it being fixed up, and it may well be possible that the problem does not exist anymore.
  12. subenji99

    AFK kick

    Quick note - this code will kick anyone that plays with a gamepad and uses an analog stick for input. http://wiki.multitheftauto.com/wiki/Get ... ntrolState
  13. subenji99

    AFK kick

    Quick note - this code will kick anyone that plays with a gamepad and uses an analog stick for input. http://wiki.multitheftauto.com/wiki/Get ... ntrolState
  14. http://wiki.multitheftauto.com/wiki/Character_Skins List of valid skin IDs. And in case you are even lazier than clicking a link: The best option around this is to use repeat until spawnPlayer ( thePlayer , x, y, z, r, math.random (0,288)) end Edit: Quick glance at your code reveals that IF it's getting the data from the map file correctly (I didn't look at that) your loop will overwrite x,y,z,r each time, then the values they will actually contain every single time it reaches spawnPlayer will be the ones for your final spawnpoint in the map file. Use: local value = SpawnElements[math.random(#SpawnElements)] local x = getElementData( value, "posX" ) local y = getElementData( value, "posY" ) local z = getElementData( value, "posZ" ) local r = getElementData( value, "rotZ" ) or 0 repeat until spawnPlayer ( thePlayer , x, y, z, r, math.random (0,288)) end This will pick a random spawnpoint element rather than loop through all of them. Edit2: getElementData( value, "rot" ) is returning nil. It doesn't exist, as your map file contains "rotX, rotY, rotZ" values. Edit3: Your timers are not passing "thePlayer" to your joinHandler function. Alter them: setTimer( joinHandler, 1800, 1, source ) Edit4: This just won't work. (Line 7) triggerEvent ( "PlayerSpawn", rootElement ) Again, it will not receive "thePlayer". You should use getElementsByType("player") and loop through them, triggering your event for each and making sure to pass on the player element.
  15. http://wiki.multitheftauto.com/wiki/Character_Skins List of valid skin IDs. And in case you are even lazier than clicking a link: The best option around this is to use repeat until spawnPlayer ( thePlayer , x, y, z, r, math.random (0,288)) end Edit: Quick glance at your code reveals that IF it's getting the data from the map file correctly (I didn't look at that) your loop will overwrite x,y,z,r each time, then the values they will actually contain every single time it reaches spawnPlayer will be the ones for your final spawnpoint in the map file. Use: local value = SpawnElements[math.random(#SpawnElements)] local x = getElementData( value, "posX" ) local y = getElementData( value, "posY" ) local z = getElementData( value, "posZ" ) local r = getElementData( value, "rotZ" ) or 0 repeat until spawnPlayer ( thePlayer , x, y, z, r, math.random (0,288)) end This will pick a random spawnpoint element rather than loop through all of them. Edit2: getElementData( value, "rot" ) is returning nil. It doesn't exist, as your map file contains "rotX, rotY, rotZ" values. Edit3: Your timers are not passing "thePlayer" to your joinHandler function. Alter them: setTimer( joinHandler, 1800, 1, source ) Edit4: This just won't work. (Line 7) triggerEvent ( "PlayerSpawn", rootElement ) Again, it will not receive "thePlayer". You should use getElementsByType("player") and loop through them, triggering your event for each and making sure to pass on the player element.