-
Posts
142 -
Joined
-
Last visited
Everything posted by JustP
-
addEventHandler("onVehicleEnter", root, function (player, _, jacked) if isElement(jacked) and getElementType(player) == "player" and getElementType(jacked) == "player" and not (getPlayerTeam(player) == 'Police') then setElementData(player, "Charges", tonumber(getElementData(player, "Charges"))+30) end end)
-
نفس الكود الفوق لكن تأكد انك تسوي if status == 'AM' and hour == 12 then ... end
-
كيف فاتح جدول وغالقه بنفس الوقت؟ local markers = { { .. }, }
-
بدل forward بـ accelerate
-
bool dxDrawRectangle3D ( float x, float y, float z, float width, float height[, int color, float rotation, float faceTowardX, float faceTowardY, float faceTowardZ] الاحداثيات بعدين العرض والارتفاع واللون الروتويشن او مو شرط لانو هذي اختياري اهم شيء اول خمسة local dot = dxCreateTexture(1,1) local white = tocolor(255,255,255,255) function dxDrawRectangle3D(x,y,z,w,h,c,r,...) local lx, ly, lz = x+w, y+h, (z+tonumber(r or 0)) or z return dxDrawMaterialLine3D(x,y,z, lx, ly, lz, dot, h, c or white, ...) end useful function
-
rect1 = dxDrawRectangle(......tocolor(color, color, color, rectalpha) rectalpha = 255 addEventHandler('onClientClick' if rect1 then rectalpha = 0 يقصد إنك تسوي الي تريد تضغط عليه ويظهر ولما تضغط عليه تصير الالفا حقته صفر ويظهر زر ثاني تصير الالفا حقه 255 او 100 الي يعجبك
-
شنو هو تعريف rect1?
-
تقدر تسوي لوحتين dx لما يضغط عالزر الاول يسويله ريموف ايفنت وهاه لازم تضبط المقاسات وتطلع له اللوحة الثانية الي بتكون نفس مقاس الاولى لكن غير المحتوى هذا ابسط شيء
-
تقدر تسوي ايفنت onClientRender , افضل لك من التايمر
-
معي مود مسوي فيه انك تقدر تاخذ فيه اوبجكت ويجي على يدك لكن لما اسوي كذا addEvent('makeobject:O',true) addEventHandler('makeobject:O',root, function ( Data, x , y , z ) object = createObject(Data, x , y , z ) attachElements(object, source, x , y , z ) end ) -- سيرفر -- كلاينت x, y , z = getPedBonePosition(localPlayer, 25) triggerServerEvent('makeobject:O', localPlayer, Data, x , y , z) --[[ لو اشيل الـx, y, z من attachElements يشتغل عادي لكن يكون الاوبجكت بنصف الشخص ولما احطهم مايجي الاوبجكت اساساً
-
نفس الشيء.. استبدلت كل الي معي marker = createMarker(2159.54297, 943.37616, 9.82031,"cylinder", 1.5) blip = createBlip(2159.54297, 943.37616, 10.82031,41) positions = { {-2145.67310, -2297.88965, 30.62500}, {-2110.29370, -2326.92236, 46.57813}, {-2098.56860, -2401.86328, 30.62500}, {-2094.41064, -2454.47412, 46.57813}, {-2175.17822, -2536.86670, 30.61719}, {-2220.07153, -2505.76782, 30.73003}, {-2151.32471, -2463.63232, 30.84375}, {-2146.31616, -2375.85156, 30.62500}, {-2154.75439, -2370.47974, 30.68164}, } addEventHandler('onMarkerHit',marker, function( hitElement ) if hitElement and getElementType( hitElement ) == 'player' and not isPedInVehicle( hitElement ) then online = getplayers() if tonumber(online)+1 < 10 then local num = math.random (#positions) x, y, z = positions [num][1], positions [num][2], positions [num][3] setElementPosition(hitElement, x, y, z) setElementFrozen(hitElement, true) setElementData(hitElement,"dm",hitElement) outputChatBox('انتظر ريثماً يدخُل شخصاً', hitElement,0,255,0,true) setElementDimension(hitElement, 530) setTimer(checkPlrs,15000,1) else outputChatBox("اذهب وأحضر معك شخصاً لتستطيع اللعب.",hitElement,0,255,0,true) end end end ) addEventHandler('onPlayerChat',root, function(message) if tostring(message) == 'قتال' then setElementPosition(source ,2139.64502, 945.49158, 10.81252) end end ) function asdf( ammo, attacker, weapon, bodypart ) if getElementData(source , 'dm') then if attacker then mon = math.random(1500,15000) armor = getPlayerArmor(attacker) hea = getElementHealth(attacker) setPlayerArmor(attacker, armor + 50 ) setElementHealth(attacker, hea + 50 ) givePlayerMoney(attacker, mon) setElementData(source, 'dm', false) setElementData(source, 'undamagable', false) setPlayerHudComponentVisible ( source, "radar", true ) else setPlayerHudComponentVisible ( source, "radar", true ) setElementData(source, 'dm', false) setElementData(source, 'undamagable', false) end end end addEventHandler('onPlayerWasted',root, asdf) addEventHandler('onPlayerJoin',root, function () setElementData(source, 'dm', false) setElementData(source, 'undamagable', false) end ) addEvent('giveWeaponme',true) addEventHandler('giveWeaponme',root, function( Data ) giveWeapon(source, Data , 9999) setElementFrozen(source, false) setElementData(source, 'undamagable', false) end) function getplayers() c = -1 for i,p in pairs(getElementsByType("player"))do if theyinmatch(p) then c = c+1 end end return tonumber(c) end function theyinmatch(p) per = getElementData(p,"dm") if tostring(per) == true then return true else return false end end function checkPlrs () c = 0 for i,p in pairs(getElementsByType("player"))do if theyinmatch(p) then c = c+1 end end if tonumber(c) > 1 then for i,p in pairs(getElementsByType("player"))do if theyinmatch(p) then outputChatBox("روح اسحك روح",p,0,255,0,true) triggerClientEvent(p,'gui', p) setElementHealth(p, 200) setPlayerArmor(p, 100) takeAllWeapons( p ) setElementFrozen(p, false) setPlayerHudComponentVisible ( p, "radar", false ) end end else burnthemall() end end function burnthemall() for i,p in ipairs(getElementsByType("player"))do if theyinmatch(p) then killPed(p) outputChatBox('جيبلك واحد حتى تكدر تلعب!',p,0,255,0,true) end end end
-
السلام عليكم , طبعأ عندي هذي المشكلة function checkPlrs () c = 0 for i,p in pairs(getElementsByType("player"))do if theyinmatch(p) then c = c+1 end end if tonumber(c) > 1 then for i,p in pairs(getElementsByType("player"))do if theyinmatch(p) then outputChatBox("روح اسحك روح",p,0,255,0,true) triggerClientEvent(p,'gui', p) setElementHealth(p, 200) setPlayerArmor(p, 100) takeAllWeapons( p ) setElementFrozen(p, false) setPlayerHudComponentVisible ( p, "radar", false ) end end else burnthemall() end end function burnthemall() for i,p in pairs(getElementsByType("player"))do if theyinmatch(p) then killPed(p) outputChatBox('جيبلك واحد حتى تكدر تلعب!',p,0,255,0,true) end end end انه مايستدعي الـ فانكشن burnthemall جربت اسوي killPed( source ) يقول لي nil في حل وشكراً
-
addCommandHandler("تواجد", function ( player ) if not ( isGuestAccount ( getPlayerAccount ( player ) ) ) then if ( getAccountData ( getPlayerAccount ( player ), "newdata" ) == false ) then if ( getElementData ( resourceRoot, "enabledTwaged" ) == true ) then setPlayerTime ( player, "+", getElementData ( resourceRoot, "hoursTwaged" ) ) setAccountData ( getPlayerAccount ( player ), "newdata", true ) outputChatBox("* You Have Been Get " .. getElementData ( resourceRoot, "hoursTwaged" ) .." Hours !", player, 255, 255, 0, true) else outputChatBox("* This Command Not Enabled !", player, 255, 0, 0, true) end else outputChatBox("* You Already Use This Command !", player, 255, 0, 0, true) end else outputChatBox("* Please Register To Use This Command !", player, 255, 0, 0, true) end end) جرب هذا بيشتغل معك
-
جرب تغير اسم الداتا , احتمال انك مسوي توزيع من قبل والداتا باقية بالحساب
-
لان القريد ليست احسن وانظم من هذي الي مسويه كله انت + تقدر تسوي جدول وتحط فيه الاشياء عشان للاختصار فقط