Jump to content

help edit


Flipi

Recommended Posts

Posted

hi, how to modify for to be visible for everyone? (to see the color of nitro for any player)

addEventHandler("onClientResourceStart",resourceRoot, 
function() 
    nitroShader = dxCreateShader("nitro.fx") 
end) 
  
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 
  
function resetNitroColor() 
    if nitroShader then 
        engineRemoveShaderFromWorldTexture(nitroShader,"smoke") 
    end 
end 
  
  
  
addCommandHandler("nitro", 
function(command,r,g,b) 
    if r and g and b then 
        local r,g,b = tonumber(r),tonumber(g),tonumber(b) 
        if r <= 0 and g <= 128 and b <= 255 then 
            updateNitroColor(r,g,b) 
            outputChatBox("Nuevo color de nitro!", 0, 128, 255, true) 
        else 
            outputChatBox("Los colores deben ser entre 0 y 255", 0, 128, 255, true) 
        end 
    else 
        resetNitroColor() 
        outputChatBox("El color del nitro volvio al original!", 0, 128, 255, true) 
    end 
end) 

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...