Jump to content

'LinKin

Members
  • Posts

    636
  • Joined

  • Last visited

Everything posted by 'LinKin

  1. Hello, As some of you might know, there's a free resouce which applies a shader to the vehicles. Since I was working in a script to enable/disable some other textures such as roads, ramps.. etc. I just realized that I don't know how to 'destroy' the vehicle's shader if it is being used. Here's the .lua file from the free resource which you can find at: https://community.multitheftauto.com/in ... ls&id=4422 addEventHandler( "onClientResourceStart", resourceRoot, function() -- Version check if getVersion ().sortable < "1.1.0" then outputChatBox( "Resource is not compatible with this client." ) return end -- Create shader local myShader, tex = dxCreateShader ( "car_paint.fx" ) if not myShader then outputChatBox( "Could not create shader. Please use debugscript 3" ) else outputChatBox( "Using technique " .. tex ) -- Set textures local textureVol = dxCreateTexture ( "images/smallnoise3d.dds" ); local textureCube = dxCreateTexture ( "images/cube_env256.dds" ); dxSetShaderValue ( myShader, "sRandomTexture", textureVol ); dxSetShaderValue ( myShader, "sReflectionTexture", textureCube ); engineApplyShaderToWorldTexture ( myShader, "vehiclegrunge256" ) engineApplyShaderToWorldTexture ( myShader, "?emap*" ) end end ) Thanks, LinKin
  2. Hello, I've seen some stuff like this outputColoredMessage ( "|C_PLAY|TITLE |C_1|This is coloured somehow |C_2| Another Colour now." ) Just wondering, what's that..? I've browsed on google, looking after some MTA:Wiki feedback. But found nothing... Can someone tell me how it works? because I've tried to put one line like this in a script I made, but it doesn't output anything in the chatbox. For example; where do you define the colors for: |C_PLAY| |C_1| |C_2| Thanks.
  3. local player = getLocalPlayer() if(AFKtime >= MaxAFKtime) then if (afkCounter <= 4) then triggerServerEvent ( "afkWarn", player, 1, afkCounter) afkCounter = afkCounter+1 triggerServerEvent ( "afkSlap", player) stopWarn()
  4. It does not work. It still be the same as before.
  5. Hello, I've been working on an AFK Killer / Kicker. I've modified the following function: function afkKill() local car = getPedOccupiedVehicle(source) blowVehicle (car) --setElementHealth( source, 0) end addEvent( "afkSlap", true ) addEventHandler( "afkSlap", getRootElement(), afkKill) *Note: The original funtion did not include the code-lines 2,3. (original function works 100%) When I test the modified function in my local server, it works perfectly. '/debugscript 3' doesn't show any @Bad Argument. But, when I upload it in a hosted server oppened for public, the script doesn't work. While having enabled 'debugscript 3'; the console shows an error by the following statement "@ Bad Argument 'blowVehicle' ". Which causes the script run prematurely (when the player is killed by the first time by the AFK, the 'bug' makes it to keep counting the number of times the played was killed by AFK up to 3 (which is the limit and when the player gets kicked)) as a result, the player gets kicked if he's killed just once by the AFK. Any ideas / solutions related to this problem are welcome. Thanks, LinKin.
  6. Hello, I've been wondering if it is possible to remove the number of a map's rating in the votemanager. Here's an example. * 6. [DD] Cross XL (10); where (10) corresponds to map's rating. Is it possible to remove this number in brackets without stopping the Maps Rating resource? Thanks, LinKin.
  7. Hello, I've been trying to make it so that the chatbox gets the player's nick without the #RRGGBB hex color code. But I've not been successful with it. Here's the line I'm working on outputChatBox(tostring(getPlayerName(source)).. "#ff0000's vehicle has been blown for being AFK [#ABCDEF"..afkCount.."/3#ff0000]",getRootElement(),255,0,0,true) As a result, the chatbox shows the player's nick colour based on the current hex code the player is wearing. But I don't want that. I wanna make it so that it doesn't matter when the player is wearing a hex color code with his nick, the chatbox's message displays in RED color. Thanks, Linkin.
  8. Hi guys, I wanna make a script so that the user can change his vehicle's doors state. I wanna make it so that for example when the use types /doors 0 4 , the hood turns missing, or if he types /doors 3 3 , the Front right door turns Ajar, damaged. This is what I've done, but without success. I hope someone can help me. function Doorless(localPlayer, doors, state, a, b) local car = getPedOccupiedVehicle(localPlayer) state = setVehicleDoorState ( car, tonumber(a), tonumber(b) ) outputChatBox("The reurn was: "..tostring(state)) end addCommandHandler("doors", Doorless) Regards, LinKin
  9. I agree. It's a great gamemode and it'd be a good idea to encourage newbies to play it. This way DD would be more likely to gain new players, new experiences, new incomings.
×
×
  • Create New...