Jump to content

Blaawee

Members
  • Posts

    857
  • Joined

  • Last visited

Everything posted by Blaawee

  1. -- Dim on hover addEventHandler( "onClientMouseEnter", root, function ( ) if source == rog_ucp_main_img_sms then guiSetAlpha( source, 100 ) elseif source == rog_ucp_main then guiSetAlpha( source, 100 ) end end ) -- Back when leave addEventHandler( "onClientMouseLeave", root, function ( ) if source == rog_ucp_main_img_sms then guiSetAlpha( source, 255 ) elseif source == rog_ucp_main then guiSetAlpha( source, 255 ) end end )
  2. hum... weird. you forget the second argument in the server side
  3. o.k then : guiComboBoxGetItemText ( element comboBox, int itemId ) comboBox: The combobox containing the item you're interested in itemId: The index of the item that's mean the number of item
  4. well you didn't wrote the type of the sound and it should be a string like this : sound = playSound( 'Dance_Dj.mp3' )
  5. Blaawee

    Question

    hows that ! well , i'm using string.dump
  6. Blaawee

    Question

    sure ? http://prntscr.com/qc132
  7. Blaawee

    Question

    i just found it limit is 65535 characters , btw if it's more than the limit how i can handle it !
  8. Blaawee

    Question

    hey , i'm just wondering how many characters or strings i can insert it in any table
  9. maybe : getGroundPosition and check this : https://community.multitheftauto.com/ind ... ls&id=6122
  10. https://community.multitheftauto.com/ind ... ls&id=6348 original https://community.multitheftauto.com/ind ... ls&id=1152 + Virus https://community.multitheftauto.com/ind ... ls&id=6352 DONE
  11. * EDIT Ok he done your welcome
  12. Blaawee

    Scoreboard

    exports.scoreboard:addScoreboardColumn( "deaths" )
  13. i think you should add it in single column , will try this i can't test it client : local gDataName = 'countryFlag'; --/ string local gWidth = 35; --/ integer local gFriendlyName = 'Home'; --/ string local gPriority = 1; --/ integer addEventHandler ( 'onClientResourceStart', resourceRoot, function( ) exports.scoreboard:scoreboardAddColumn ( gDataName, gWidth, gFriendlyName, gPriority ); end ); addEvent( 'setTheImg', true ) addEventHandler( 'setTheImg', root, function( theFlag ) setElementData ( localPlayer, gDataName, { type = "image", src = ':admin/client/images/flags/' .. theFlag .. '.png', color = tocolor( 255, 255, 255, 255 ), width = 20, height = 20 }, false ); end ); server: addEventHandler( 'onPlayerJoin', root, function( ) local theFlag = exports.admin:getPlayerCountry( source ); if theFlag then triggerClientEvent( source, 'setTheImg', source, theFlag ); end end );
  14. forget everything and let's start from the begin . what are you trying to do , and is this last scoreboard version
  15. Blaawee

    dxDrawText

    --\\\\\\\\\\\\\\\\\\\\\\\\\\ --// Setting local g_screenX, g_screenY = guiGetScreenSize(); local gScale = 0.3; local gAlphaDistance = 25; local gMaxDistance = 50; -- Max Distance local gTextAlpha = 120; local gTextSize = 1; local gAlphaDiff = gMaxDistance - gAlphaDistance; gScale = 1 / gScale * 800 / g_screenY; local gMaxScaleCurve = { { 0, 0 }, { 3, 3 }, { 13, 5 } }; local gTextScaleCurve = { { 0, 0.8 }, { 0.8, 1.2 }, { 99, 99 } }; local gTextAlphaCurve = { { 0, 0 }, { 25, 100 }, { 120, 190 }, { 255, 190 } }; local marker = createMarker( 1552.4996337891, -1677.3264160156, 15.1953125, 'Cylinder', 1.5, 0, 0, 255, 150 ); local marker1 = createMarker( -1604.5458984375, 712.25848388672, 12.8671875, 'Cylinder', 1.5, 0, 0, 255, 150 ); local marker2 = createMarker( 2340.9245605469, 2456.0463867188, 13.96875, 'Cylinder', 1.5, 0, 0, 255, 150 ); addEventHandler ( 'onClientRender', root, function ( ) -- local x, y, z = getCameraMatrix(); local x1, y1, z1 = getElementPosition ( marker ); local x2, y2, z2 = getElementPosition ( marker1 ); local x3, y3, z3 = getElementPosition ( marker2 ); local distance_1 = getDistanceBetweenPoints3D( x, y, z, x1, y1, z1 ); local distance_2 = getDistanceBetweenPoints3D( x, y, z, x2, y2, z2 ); local distance_3 = getDistanceBetweenPoints3D( x, y, z, x3, y3, z3 ); -- -- Marker #1 if distance_1 <= gMaxDistance then local x1_, y1_ = getScreenFromWorldPosition( x1, y1, z1 + 0.95, 0.06 ); if x1_ and y1_ then -- local scale = 1 / ( gScale * ( distance_1 / gMaxDistance ) ); local alpha = ( ( distance_1 - gAlphaDistance ) / gAlphaDiff ); alpha = ( alpha < 0 ) and gTextAlpha or gTextAlpha - ( alpha * gTextAlpha ); scale = math.evalCurve( gMaxScaleCurve, scale ); local textscale = math.evalCurve( gTextScaleCurve, scale ); local textalpha = math.evalCurve( gTextAlphaCurve, alpha ); -- dxDrawText( "police job", x1_, y1_, x1_, y1_, tocolor ( 255, 255, 255, textalpha ), textscale * gTextSize, "arial", "center", "bottom", false, false, false, true ); end -- Marker #2 elseif distance_2 <= gMaxDistance then local x2_, y2_ = getScreenFromWorldPosition( x2, y2, z2 + 0.95, 0.06 ); if x2_ and y2_ then -- local scale = 1 / ( gScale * ( distance_2 / gMaxDistance ) ); local alpha = ( ( distance_2 - gAlphaDistance ) / gAlphaDiff ); alpha = ( alpha < 0 ) and gTextAlpha or gTextAlpha - ( alpha * gTextAlpha ); scale = math.evalCurve( gMaxScaleCurve, scale ); local textscale = math.evalCurve( gTextScaleCurve, scale ); local textalpha = math.evalCurve( gTextAlphaCurve, alpha ); -- dxDrawText( "police job", x2_, y2_, x2_, y2_, tocolor ( 255, 255, 255, textalpha ), textscale * gTextSize, "arial", "center", "bottom", false, false, false, true ); end -- Marker #3 elseif distance_3 <= gMaxDistance then local x3_, y3_ = getScreenFromWorldPosition( x3, y3, z3 + 0.95, 0.06 ); if x3_ and y3_ then -- local scale = 1 / ( gScale * ( distance_3 / gMaxDistance ) ); local alpha = ( ( distance_3 - gAlphaDistance ) / gAlphaDiff ); alpha = ( alpha < 0 ) and gTextAlpha or gTextAlpha - ( alpha * gTextAlpha ); scale = math.evalCurve( gMaxScaleCurve, scale ); local textscale = math.evalCurve( gTextScaleCurve, scale ); local textalpha = math.evalCurve( gTextAlphaCurve, alpha ); -- dxDrawText( "police job", x3_, y3_, x3_, y3_, tocolor ( 255, 255, 255, textalpha ), textscale * gTextSize, "arial", "center", "bottom", false, false, false, true ); end end end ); -- ////////////////////////////////// -- // MATH FUNCTIONS // -- ////////////////////////////////// function math.evalCurve( curve, input ) if input < curve[ 1 ][ 1 ] then return curve[ 1 ][ 2 ]; end for idx = 2, #curve do if input < curve[ idx ][ 1 ] then local x1 = curve[ idx - 1 ][ 1 ]; local y1 = curve[ idx - 1 ][ 2 ]; local x2 = curve[ idx ][ 1 ]; local y2 = curve[ idx ][ 2 ]; local alpha = ( input - x1 ) / ( x2 - x1 ); return math.lerp( y1, y2, alpha ); end end return curve[ #curve ][ 2 ]; end function math.lerp( from, to, alpha ) return from + ( to-from ) * alpha; end
  16. Blaawee

    Export, calling

    here is an example alpha = 0; screen = { guiGetScreenSize( ) }; addEventHandler( 'onClientRender', root, function( ) alpha = alpha + 30 dxDrawText( '#FF0000Bomb #FFFFFFHas Been Planted. ', screen[ 1 ] / 2, screen[ 2 ] / 2, screen[ 1 ], screen[ 2 ], tocolor ( 0, 0, 0, alpha ), 0.8, 'sa-header', 'center', 'center', false, false, true, true ) if alpha == 255 then alpha = 0 end end )
  17. server : marker = createMarker ( -2411.6735839844, -608.75842285156, 132.6333772752, "cylinder", 1.5, 255, 0, 0, 255 ); addEventHandler( 'onMarkerHit' , marker, function( hitElement, matchingDimension ) if ( hitElement and getElementType( hitElement ) == 'player' and isObjectInACLGroup('user.'..getAccountName( getPlayerAccount( hitElement ) ), aclGetGroup( 'Admin' ) ) and matchingDimension ) then triggerClientEvent( hitElement, 'showGui', hitElement ); end end ); addEventHandler( 'onMarkerLeave', marker, function( leaveElement, matchingDimension ) if ( getElementType( leaveElement ) == "player" ) then triggerClientEvent( hitElement, 'hideGui', hitElement ); end end ); client: shopWindow = guiCreateWindow( 370, 90, 640, 456, "shop panel MR.KING111 ", false ); guiSetVisible( shopWindow, false ); guiWindowSetSizable( shopWindow, false ); guiWindowSetMovable( shopWindow, true ); addEvent( 'showGui', true ); addEventHandler( 'showGui', root, function ( hitPlayer ) if ( hitPlayer == localPlayer ) then guiSetVisible( myWindow, not guiGetVisible ( myWindow ) ); showCursor( guiGetVisible ( myWindow ) ); end end ); addEvent( 'hideGui', true ) addEventHandler( 'hideGui', root, function ( hitPlayer ) if ( hitPlayer == localPlayer ) then guiSetVisible( myWindow, not guiGetVisible ( myWindow ) ); showCursor( guiGetVisible ( myWindow ) ); end end );
  18. spam https://community.multitheftauto.com/ind ... ls&id=6319 DONE
  19. مم ضنتي تقدر .
  20. انا اقلكم السآلفه ي عيآل ذذ هو شآف وآحد ب سيرفر طآره الزومبي يرمي قنآبل ورى بعض وهو يطلق ب السلاح =) ف المهم .. هو يحسب انه في كود تكتبه ب اف 8 وتجيه ذي الخآصيهه ذذ واللي كآن يسوي الحركه وآحد يقولون له بلاوي =)
  21. GUIEditor = { button = {}, label = {}, window = {}, } addEventHandler( "onClientResourceStart", resourceRoot, function( ) GUIEditor.window[ 1 ] = guiCreateWindow( 0, 0, 1279, 715, "Buy A Vehicle", false ); guiWindowSetSizable( GUIEditor.window[ 1 ], false ); guiSetVisible( GUIEditor.window[ 1 ], false ); GUIEditor.label[ 1 ] = guiCreateLabel( 26, 98, 326, 34, "Infernous : $30000", false, GUIEditor.window[ 1 ] ); guiSetFont( GUIEditor.label[ 1 ], "sa-header" ); GUIEditor.button[ 1 ] = guiCreateButton( 373, 108, 86, 29, "BUY", false, GUIEditor.window[ 1 ] ); GUIEditor.button[ 2 ] = guiCreateButton( 1088, 668, 125, 35, "CLOSE", false, GUIEditor.window[ 1 ] ); end ) local buyVeh = createMarker( 1940.5185546875, -1707.1162109375, 12.3828125, "cylinder", 1.5, 255, 255, 0, 170 ); function showGUIp( hitPlayer ) if ( hitPlayer == localPlayer ) then setElementFrozen ( localPlayer, false ); guiSetVisible( GUIEditor.window[ 1 ], not guiGetVisible( GUIEditor.window[ 1 ] ) ); showCursor( guiGetVisible( GUIEditor.window[ 1 ] ) ); end end addEventHandler ( "onClientMarkerHit", buyVeh, showGUIp ) function initGUI( ) guiSetVisible ( GUIEditor.window[ 1 ], not guiGetVisible( GUIEditor.window[ 1 ] ) ); guiSetInputEnabled ( guiGetVisible( GUIEditor.window[ 1 ] ) ); showCursor ( guiGetVisible( GUIEditor.window[ 1 ] ) ); end addEventHandler ("onClientGUIClick", GUIEditor.button[ 2 ], initGUI, false )
  22. i don't think this make sense =)
×
×
  • Create New...