-
Posts
142 -
Joined
-
Last visited
Everything posted by JustP
-
-- ملف السيرفر addEventHandler( "onPlayerJoin", root, function() triggerClientEvent( source, "startBar", source ) end ) -- ملف الكلينت Bar = guiCreateProgressBar(0.25, 0.93, 0.48, 0.05, true) guiSetVisible( Bar, false ) addEvent( "startBar", true ) addEventHandler( "startBar", root, function() setTimer( function() if not guiGetVisible( Bar ) then guiSetVisible( Bar, true ) guiProgressBarSetProgress( Bar, 10 ) if guiProgressBarGetProgress( Bar ) == 100 then guiSetVisible( Bar, false) end end end, 1000, 8 ) end )
-
local Group1 = ""..getElementData ( resourceRoot, "group1" ).."" local Group2 = "" Groups = { "Admin", "Console", } -- by justp function justA ( thePlayer, commandName, ... ) local accName = getAccountName ( getPlayerAccount ( thePlayer ) ) for i, v in ipairs ( Groups ) do if isObjectInACLGroup ( "user."..accName, aclGetGroup ( v ) ) then local justp = { ... } local textt = table.concat ( justp, " " ) setElementData ( resourceRoot, "group1", textt ) outputChatBox(getElementData ( resourceRoot, "group1" ), thePlayer) exports["guimessages"]:outputServer(thePlayer, "#C38EC7[Clanwar] group1 set to " ..getElementData ( resourceRoot, "group1" ), 255, 255, 0) end end end addCommandHandler('setgtext', justA) في مشكلة بـ السطر رقم واحد يقول attempt to concatenate a boolean value
-
اللفل احتمال داتا فلذلك تسوي local level = getElementData(source, 'level') -- serial local serial = getPlayerSerial(source)
-
وضح بالتفاصيل.. سوي تحقق عشان تسوي الي تبيه
-
local hydra = { } addEventHandler ( "onVehicleStartEnter" , root , function ( ) if getTeamName( getPlayerTeam ( source ) == "SWAT" ) then if getElementModel ( source ) == 520 then if isElement ( hydra [ source ] ) ) then destroyElement ( hydra [ source ] ) end hydra [ source ] = createBlipAttachedTo ( source , 9 , 0,2,255,0,0,255,0,16383.0,getTeamFromName("SWAT")) end end end ) ; addEventHandler ( "onVehicleStartExit" , root , function ( ) if ( getElementModel ( source ) == 520 and isElement ( hydra [ source ] ) ) then destroyElement ( hydra [ source ] ) hydra [ source ] = nil end end )
-
local hydra = { } addEventHandler ( "onVehicleStartEnter" , root , function ( ) if getTeamName( getPlayerTeam ( source ) == "SWAT" then if getElementModel ( source ) == 520 ) then if isElement ( hydra [ source ] ) ) then destroyElement ( hydra [ source ] ) end hydra [ source ] = createBlipAttachedTo ( source , 9 , 0,2,255,0,0,255,0,16383.0,getTeamFromName("SWAT")) end end ) ; addEventHandler ( "onVehicleStartExit" , root , function ( ) if ( getElementModel ( source ) == 520 and isElement ( hydra [ source ] ) ) then destroyElement ( hydra [ source ] ) hydra [ source ] = nil end end ) هذا بيشتغل
-
addEventHandler('onVehicleEnter',root, function(thePlayer, seat , jacked) if getElementModel(source) == 520 then -- يتحقق من انو الموديل حق الهايدرا outputChatBox(getPlayerName(thePlayer)..'entered a hydra', root) -- يكتبلك بالشات انو اللاعب ذا دخل بهايدرا createBlipAttachedTo(source, 52) --- يصنع البلب destroyElement(source) -- يشيل الهايدرا outputChatBox(getPlayerName(thePlayer).."don't enter a hydra again", thePlayer) -- يكتب للاعب end end )
-
جرب function test() for i , v in ipairs (getElementsByType('object')) do setObjectBreakable(v, false) end end
-
لو انا مسوي جدول كذا tires = { {tireleft}, {tireright}, } function gettire() for i , theVehicle in ipairs getElementsByType('vehicle') do local pos = getVehicleComponeontPosition(theVehicle)[tires] if getPositionBetweenPoints3D(unpack(pos), unpack(getElementPosition(source)) < 3 then outputChatBox(''..getVehicleWheelState(theVehicle)..'', source) end end end وهذا يجيبلي التاير الي انا قريب عليه يجيبلي حالة التاير طبعاً انا بضيف حدث الي هو اون المنت كلكد لكن كيف اخلي يجيب حالة التاير الي قريب عليه يعني انا واقف عند التاير اليمين يجيب حالة هذا التاير وهكذا الي مايعرف وش تايرات يعني عجلات السيارة
-
https://community.multitheftauto.com/index.php?p=resources&s=details&id=14600 هذا رابط مود نفس الي تحتاجه انت
-
حسب اذا انت مسويه على داتا او على تيم او على وظيفة فتجيب الداتا حقه وتتحقق من هالشيء وتخلي اللون الي تبيه
-
اعتقد انك لازم تحط الوظيفة بالاخير.. يعني مو قبل الي تبي تستخدمه انت
-
جرب هالكود function displayServerMessage(source, message, type) triggerClientEvent(source, "servermessages", getRootElement(), message, type) end وتحت مثال عليه displayServerMessage(source, "test.", "confirm") -- هذا عشان يكون اخضر displayServerMessage(source, "test.", "warning") -- كذا يكون احمر او انك ببساطة تحط التايب كذا "warning" مو كذا warning
-
ليش ثلاثة اند ؟ ماعتقد البايند يحتاج اند
-
mensages = {} messagetick = 0 function servermessages(message, type) table.insert(mensages, {message, type or "confirm", getTickCount(), dxGetTextWidth(message, fontScale*0.06, Font_1) + screenH*0.01, 0, 0, 0}) messagetick = getTickCount() end addEvent("servermessages", true) addEventHandler("servermessages", getRootElement(), servermessages) function renderMensages() local msgd = mensages if #msgd ~= 0 then local startY = screenW*0.5 local i = 1 repeat mData = msgd[i] local drawThis = true if i~= 1 then startY = startY + screenW*0.0425 end if mData[5] == 0 and mData[6] == 0 then mData[5] = - mData[4] - screenH*0.015 mData[6] = startY mData[7] = startY end local tick = getTickCount() - mData[3] local posX, posY, alpha if tick < 1000 then local progress = math.min(tick/1000,1) mData[5] = interpolateBetween(mData[5], 0, 0, 0, 0, 0, progress, "Linear") elseif tick >= 1000 and tick <= 7000 then mData[5] = 0 elseif tick > 7000 then local progress = math.min((tick - 7000)/1000,1) mData[5] = interpolateBetween(mData[5], 0, 0, - mData[4] - mData[4] - screenH*0.015, 0, 0, progress, "Linear") if progress >= 1 then table.remove(msgd, i) drawThis = false messagetick = getTickCount() end end local globalTick = getTickCount() - messagetick if drawThis then mData[7] = startY mData[6] = interpolateBetween(mData[6], 0, 0, mData[7], 0, 0, math.min(globalTick/1000,1), "Linear") posX = mData[5] posY = mData[6] alpha = 255 dxDrawRectangle(posX, posY, mData[4], screenW*0.04, tocolor(0, 0, 0, alpha*0.75), true) local r, g, b = 0, 255, 0 if mData[2] == "warning" then r, g, b = 255, 0, 0 end dxDrawRectangle(posX + mData[4], posY, screenH*0.010, screenW*0.04, tocolor(r, g, b, alpha*0.85), true) dxDrawText(mData[1], posX, posY, posX + mData[4], posY + screenW*0.04, tocolor(255, 255, 255, alpha), fontScale*0.05, Font_1, "center", "center", false, false, true, false, false) end i = i + 1 until i > #msgd mensages = msgd end end addEventHandler("onClientRender", getRootElement(), renderMensages) ذا الي تبيه انت لكن يطلع لك من اليسار مو من فوق تقدر تسوي لما يضغط اف 2 servermessages('....') والتايب عادي تقدر تتركه او انك تسويه warn يطلع فيه rec احمر تتركه يطلعلك اخضر
-
جرب تسوي fileDelete('resourcename/filename.lua')