-
Posts
573 -
Joined
-
Last visited
-
Days Won
4
Everything posted by #\_oskar_/#
-
onClientRender setTime setWeather weather ID
- 1 reply
-
- 1
-
-
function createCircle(text,posX,posY,radius,startAngle,stopAngle,color,Sezi) dxDrawCircle(posX,posY,radius, 0,360, tocolor(0,0,0,255), tocolor(0,0,0,255)) dxDrawCircle (posX,posY,radius+Sezi,startAngle,stopAngle,color,tocolor(255,255,255,255),nil, 1) dxDrawCircle(posX,posY, radius, 0,360, tocolor(0,0,0,255), tocolor(0,0,0,255)) dxDrawText(text,posX-30,posY-4,radius+posX,radius+posY,color) end ---- #Code addEventHandler("onClientRender", root, function () local Vehs = getPedOccupiedVehicle(localPlayer) local nitros = getVehicleNitroLevel(Vehs) or 0 if Vehs and nitros then createCircle(math.ceil(nitros*100).."% Nitro",500,400,50,1,nitros/2*725,tocolor(0,5,255,255),5) -- Health Car local Health = getElementHealth (Vehs) Healths = math.ceil(Health/10) createCircle(Healths.."% Health",800,400,50,1,(Health-250)/2,tocolor(0,255,0,255),5) if Healths < 50 then createCircle(Healths.."% Health",800,400,50,1,(Health-250)/2,tocolor(255,0,0,255),5) end end end) قصدك كدا ؟
-
بالتوفيق لك كمان يا احمد ان شاء الله اضيفه ♥
-
السلام عليكم اول مره اطرح وظيفه ☺ الوظيفه هي اغلاق اللوحه مثل اللي بالجيو اديتور function CreateButtonClose( GuiElement , text,d) if getElementType(GuiElement) == 'gui-window' then local Text = '|'..text..' |' local Font = 'default-bold-small' local width = dxGetTextWidth(Text, 1, Font) local x = d == 'left' and guiGetSize(GuiElement, false)-50 or d == 'right' and 5 local ln = guiCreateLabel(x,2,width+5,15,Text, false,GuiElement) guiSetProperty(ln ,'ClippedByParent', 'False') guiSetProperty(ln ,'AlwaysOnTop', 'True') guiSetFont(ln , Font) guiLabelSetColor(ln ,150,150,150) guiLabelSetHorizontalAlign(ln , 'center', false) --- Events addEventHandler('onClientGUIClick',ln, function() guiSetVisible(GuiElement, false ) end,false) addEventHandler('onClientMouseEnter',ln, function() guiLabelSetColor(source ,255, 69, 59) end,false) addEventHandler('onClientMouseLeave',ln, function() guiLabelSetColor(source ,150,150,150) end,false) else print('This function is a static function the Window') end end --- Test Code window1 = guiCreateWindow(0.01, 0.04, 0.70, 0.70, "Window1", true) window2 = guiCreateWindow(0.43, 0.04, 0.38, 0.29, "Window2", true) for k,element in ipairs(getElementsByType('gui-window',getResourceGUIElement(getThisResource()))) do CreateButtonClose ( element,'Close','right' ) --CreateButtonClose ( element,'Close','left' ) end معلش مابعرف اشرح بس تقدرو تجربو الوظيفه واتمني ان تنال اعجابكم ?
-
مدري كيف حاطت اضافة الرندر وحذفه فوق بعضهم + وضح اللي تبي تسويه
-
حط ب اول سطر wndd = {} وجرب
-
مدري بس تقدر تسويه بالشادر
-
-- Client-only engineImportTXD (engineLoadTXD ("Txd Name.txd" ), ID ) -- meta.xml <file src="Txd Name.txd" />
-
setElementModel + setElementPosition
-
getTeamFromName استخدم دا والتحقق سوي اثنين == وشيل اللوكال وفنكشن اللي يجيب اسم اللاعب رح يجيب لك خطاء بالديبق وحط مكان السورس , لوكال بلاير
-
local d1 = dxCreateTexture("Gang1.png") local d2 = dxCreateTexture("Gang2.png") local d3 = dxCreateTexture("Mafia1.png") addEventHandler("onClientRender",root, function() x1, y1, z1 = 184, 1915, 17 dxDrawMaterialLine3D(x1, y1, z1+3.6, x1, y1, z1+2,d1, 2.5) x2, y2, z2 = 172, 1888, 20 dxDrawMaterialLine3D(x2, y2, z2+3.6, x2, y2, z2+2,d2, 2.5) x3, y3, z3 = 203, 1874, 17 dxDrawMaterialLine3D(x3, y3, z3+3.6, x3, y3, z3+2,d3, 2.5) end)
-
وشح وش تقصد بشريط التحميل ؟
-
getPedMoveState -- jump or getKeyState -- lshift
-
دا متغير عادي عشان احط اسم السيرفر باللوحه اللي جلبناه من ملف السيرفر بالترايقر
-
addEvent ( "getServer:Name" , true ) addEventHandler ( "getServer:Name" , root , function ( ) triggerClientEvent ( source , "setServer:Name" , source ,table.concat({getServerName( ),'Players : '..getMaxPlayers ( )},',')) end ) triggerServerEvent ( "getServer:Name" , localPlayer ) addEvent ( "setServer:Name" , true ) function TitleWindow( name ) guiSetText ( window , "Server Name: "..name ) end addEventHandler( "setServer:Name", root, TitleWindow )
-
اطرح محاولتك اللي سويتها !
-
porte = createMarker (1491.136, -1768.475, 17.796, "cylinder", 2, 255, 0, 0, 50) function infoporte(source) outputChatBox ("#000000[INFO] #bababaPorte De Arma Custa R$300.000, Deseja Comprar? #FF0000[/comprarporte]", source, 255, 255, 255,true) end addEventHandler ("onMarkerHit", porte, infoporte) function comprarporte(player) if isElementWithinMarker(player, porte) then if getPlayerMoney(player) >= 300000 then takePlayerMoney(player, 300000) outputChatBox("#000000[INFO] #FF0000Você Comprou o Porte De Armas!", player, 255, 255, 0, true) else outputChatBox("#000000[INFO] #FF0000Você Não Possui Dinheiro, Vá Trabalhar!", player, 255, 255, 0, true) end end end addCommandHandler ("comprarporte", comprarporte) function trport ( source ) if isElementWithinMarker (source, porte ) then if isObjectInACLGroup ("user."..getAccountName (getPlayerAccount (source)), aclGetGroup("PorteDeArmas")) then ---- Acl outputChatBox ("#000000[ #ff0000Sistema #000000] #ffffff Agora Você #00ff00Possui #ffffffo #ffff00"..NomeTag,source,255,255,255,true) else outputChatBox ('#000000[ #ff0000Sistema #000000] #ffffff Voce Tem Que Estar na #ff0000Prefeitura Para Pegar o Porte',source,255,255,255,true) end end end addCommandHandler ( "comprarporte", trport )
-
start = getTickCount() DxAnimation = function (text,color1,color2) local now = getTickCount() x_,y_,w_,h_ = 254, 368, 465, 25 local progress = (now - start) / (start + 1000 - start) local h,r,g = interpolateBetween(h_-50,color1 or 0, color1 or 0, 0,color2 or 255, color2 or 255, progress, "CosineCurve") dxDrawRectangle (x_,y_-25,w_,h_, tocolor ( 0, 0, 0, 200 ) ) dxDrawRectangle (x_,y_,w_,h, tocolor ( 255,255,255, 165 ) ) dxDrawText(text or 'oskar',x_,y_-50,w_+x_,h_+y_, tocolor(r,g,r), 1.00, "bankgothic", "center", "center", false, false, false, true, false) end addEventHandler("onClientRender", root,function () DxAnimation ('Welcome To BlackHeart',0,255) end) اي خطاء قوله
-
وظيفتها انها ترجع القيمه فقط بعد عمل الشرط
-
اعرض الاخطاء اللي تظهرلك بالدي بق
-
يعني انت مسوي الكود بس المشكله عندك هي تكرار الرساله في الشات بعدد المتواجدين بالسيرفر ؟
-
جرب استخدم الرندر بدل التايمر onClientRender
-
Nice
-
كودك ناقصه فقط تحقق #Edit addEventHandler ("onResourceStart",root,function() givePlayerMoney(root,math.random (200,800)) outputChatBox ("Giving All Players Random In Game Money !!",root,255,255,255,true) end) -- function GiveMoneyTokiller(message, thetype ,player ,r, g, b) if thetype == 'takeMoney' then takePlayerMoney (player,100) elseif thetype == 'giveMoney' then givePlayerMoney (player,math.random(200,250)) end return outputChatBox (message,player, r or 231, g or 217, b or 176, true ) end addEventHandler("onPlayerWasted",root,function(_,killer) if (killer) and (killer ~= source) then GiveMoneyTokiller('You Lost 100$ From Your Wallet For Getting Killed','takeMoney',source, 255, 0, 0) GiveMoneyTokiller('You Got Some Money For Killing A Player','giveMoney',killer,0,255, 0) end end) طبعا سويت حقت القتل بطريقه ثانيه عشان اقدر افيد غيري