SuleymanM Posted March 15, 2013 Share Posted March 15, 2013 Hi , Please helpe me with script ... How to create a NITRO TEAM COLOR? Link to comment
iPrestege Posted March 15, 2013 Share Posted March 15, 2013 Hmmm. i think you can do it with "Shader" only . Link to comment
SuleymanM Posted March 15, 2013 Author Share Posted March 15, 2013 shader is not automatically set .... always set ... Please create a script Link to comment
SuleymanM Posted March 15, 2013 Author Share Posted March 15, 2013 how to make resource : Nitro team color ? to always have team color Link to comment
SuleymanM Posted March 15, 2013 Author Share Posted March 15, 2013 need only this line in client.lua? Link to comment
iPrestege Posted March 15, 2013 Share Posted March 15, 2013 no you have to use "DxShader" With it . Link to comment
Castillo Posted March 15, 2013 Share 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. Link to comment
SuleymanM Posted March 16, 2013 Author Share Posted March 16, 2013 problem is : I dont know to set for TeamCOlor Link to comment
SuleymanM Posted March 16, 2013 Author Share 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) Link to comment
Castillo Posted March 16, 2013 Share Posted March 16, 2013 getPlayerTeam getTeamColor Link to comment
SuleymanM Posted March 16, 2013 Author Share Posted March 16, 2013 where put that lines? Link to comment
Castillo Posted March 16, 2013 Share 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. Link to comment
SuleymanM Posted March 16, 2013 Author Share Posted March 16, 2013 i dont know to make ... this is scripting and me not scipter Link to comment
Castillo Posted March 16, 2013 Share Posted March 16, 2013 I'am helping you, but you seem not to understand the concept of learning. Link to comment
SuleymanM Posted March 16, 2013 Author Share Posted March 16, 2013 know ... I dont know to make with functions . Can u make me please? i owe for you Link to comment
Castillo Posted March 16, 2013 Share 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. Link to comment
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