bitReplace | Multi Theft Auto: Wiki Skip to content

bitReplace

Client-side
Server-side
Shared

This page is incomplete! Help wanted!

Please finish this page using the corresponding Old Wiki article.
Go to Contribution guidelines for more information.


This function returns the unsigned number formed by var value with replacement specified at bits field to field + width - 1

Syntax

bitReplace ( )

Code Examples

server
function replaceColorAlpha(color, alpha)
return bitReplace(color,alpha,24,8) -- return value with replaced bits 24-32 ( the alpha, http://en.wikipedia.org/wiki/RGBA_color_space )
end