SuleymanM Posted March 15, 2013 Posted March 15, 2013 Hi , Please helpe me with script ... How to create a NITRO TEAM COLOR?
iPrestege Posted March 15, 2013 Posted March 15, 2013 Hmmm. i think you can do it with "Shader" only .
SuleymanM Posted March 15, 2013 Author Posted March 15, 2013 shader is not automatically set .... always set ... Please create a script
SuleymanM Posted March 15, 2013 Author Posted March 15, 2013 how to make resource : Nitro team color ? to always have team color
Castillo Posted March 15, 2013 Posted March 15, 2013 @SuleymanM: There's a resource named: "shader_nitro" on the MTA community, you could download it and edit it to work with team colors.
SuleymanM Posted March 16, 2013 Author Posted March 16, 2013 problem is : I dont know to set for TeamCOlor
SuleymanM Posted March 16, 2013 Author Posted March 16, 2013 this is in client.lua: How to modify ... to get team color? ----------------------------------------------------------------------------------- -- Nitro shader -- -- --------------------------------------------------------------------------------- addEventHandler("onClientResourceStart",resourceRoot, function() nitroShader = dxCreateShader("nitro.fx") end) -- This function will set the new color of the nitro function updateNitroColor(r,g,b) if nitroShader then if r and g and b then engineApplyShaderToWorldTexture (nitroShader,"smoke") dxSetShaderValue (nitroShader, "gNitroColor", r/255, g/255, b/255 ) end end end -- This function will reset the nitro back to the original function resetNitroColor() if nitroShader then engineRemoveShaderFromWorldTexture(nitroShader,"smoke") end end -- Example command use addCommandHandler("nitro", function(command,r,g,b) if r and g and b then local r,g,b = tonumber®,tonumber(g),tonumber(b) if r <= 255 and g <= 255 and b <= 255 then updateNitroColor(r,g,b) outputChatBox("Nitro color updated!",255,255,255,true) else outputChatBox("Colors must be between 0 and 255",255,255,255,true) end else resetNitroColor() outputChatBox("Nitro color reset to original!",255,255,255,true) end end)
Castillo Posted March 16, 2013 Posted March 16, 2013 They aren't "lines", they are functions, click on both of them and read their syntax, then try to implement them on the script. P.S: You'll need at least basic lua knowledge.
SuleymanM Posted March 16, 2013 Author Posted March 16, 2013 i dont know to make ... this is scripting and me not scipter
Castillo Posted March 16, 2013 Posted March 16, 2013 I'am helping you, but you seem not to understand the concept of learning.
SuleymanM Posted March 16, 2013 Author Posted March 16, 2013 know ... I dont know to make with functions . Can u make me please? i owe for you
Castillo Posted March 16, 2013 Posted March 16, 2013 Even though is not hard, I won't do it for you, because that is not helping. Maybe someone else wants to "help" you by making it.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now