Jump to content

Berko

Members
  • Posts

    65
  • Joined

  • Last visited

Everything posted by Berko

  1. cin و get.cin ايش الفرق بين دالة - اولاً خلينا نسوي تجربة ونشرح خطوة بخطوة P ولم يخرج لي X ولكن خرج لي البرنامج قيمة واحد الى هيا P و X كما هما واضح في السكرين ، دخلت قيمتين تتخطى المسافات وتترجم القيم cin تترجم مسافات على اساس انهم قيم ولكن دالة get.cin دالة cin تختلف على دالة get.cin b = " " ; a = "X" ; كاني كتبت b قرأت على اساس انها قيمة مخزونة بال المتغير X P لان المسافة الى سويتها بين P ومسافة ولم تقرأ X قرأت X P ونفس شيء الي صار ب القيم الى ادخلتهم بدون مسافة بيناتهم نشوف النتيجة XP لنفترض مثلاً دخلت cin بعطيكم مثال على دالة ...اتمنى ان اكون وصلت لكم فكرة بطريقة مبسطة واي شيء ما فهمته اكتب لي وانا اشرح لك من جديد واي شيء تبيني اشرحه لك بخصوص السي بلاس بلاس اكتب وما بقصر معك ان شاء الله دمتم سالمين
  2. local imgW = 500 local imgH = 90 function dxDrawImageOnElement(TheElement,Image,distance,height,width,R,G,B,alpha) local x, y, z = getElementPosition(TheElement) local x2, y2, z2 = getElementPosition(localPlayer) local distance = distance or 20 local height = height or 1 local width = width or 1 local checkBuildings = checkBuildings or true local checkVehicles = checkVehicles or false local checkPeds = checkPeds or false local checkObjects = checkObjects or true local checkDummies = checkDummies or true local seeThroughStuff = seeThroughStuff or false local ignoreSomeObjectsForCamera = ignoreSomeObjectsForCamera or false local ignoredElement = ignoredElement or nil if (isLineOfSightClear(x, y, z, x2, y2, z2, checkBuildings, checkVehicles, checkPeds , checkObjects,checkDummies,seeThroughStuff,ignoreSomeObjectsForCamera,ignoredElement)) then local sx, sy = getScreenFromWorldPosition(x, y, z+height) if(sx) and (sy) then local distanceBetweenPoints = getDistanceBetweenPoints3D(x, y, z, x2, y2, z2) if(distanceBetweenPoints < distance) then dxDrawMaterialLine3D(x, y, z+1+height-(distanceBetweenPoints/distance), x, y, z+height, Image, width-(distanceBetweenPoints/distance), tocolor(R or 255, G or 255, B or 255, alpha or 255)) end end end end function adminLogo() for i, player in ipairs(getElementsByType ('player')) do if getElementData(player,"Vip") then dxDrawImageOnElement(player, "logo.png", 20, imgH, imgW ) end end end addEventHandler("onClientPreRender", root, adminLogo)
  3. setPlayerHudComponentVisible addEventHandler("onPlayerLogin", root, function () setPlayerHudComponentVisible (source, "ammo", false) -- ammo setPlayerHudComponentVisible (source, "weapon", false) -- weapon setPlayerHudComponentVisible (source, "money", false) -- money setPlayerHudComponentVisible (source, "radar", false) -- gps setPlayerHudComponentVisible (source, "health", false) -- hp setPlayerHudComponentVisible (source, "armour", false) -- armour setPlayerHudComponentVisible (source, "clock", false) -- clock end )
  4. Bro, I have asked to have a mp5 weapon just for which I have the power to throw grenades and I gave it to you through code grenades for all weapons: addEventHandler("onClientPlayerWeaponFire", localPlayer, function ( weapon, ammo, ammoInClip, hitX, hitY, hitZ, hitElement ) if ( weapon ~= 0 ) then createProjectile(localPlayer,16,hitX, hitY, hitZ) end end ) grenades for mp5: addEventHandler("onClientPlayerWeaponFire", localPlayer, function ( weapon, _, _, hitX, hitY, hitZ, hitElement ) if ( weapon == 29 ) then createProjectile(localPlayer,16,hitX, hitY, hitZ) end end )
  5. addEventHandler("onClientPlayerWeaponFire", localPlayer, function ( weapon, _, _, hitX, hitY, hitZ, hitElement ) if ( weapon == 29 ) then createProjectile(localPlayer,16,hitX, hitY, hitZ) end end ) just mp5
  6. addEventHandler("onClientPlayerWeaponFire", localPlayer, function ( weapon, ammo, ammoInClip, hitX, hitY, hitZ, hitElement ) if ( weapon == 29 ) then createProjectile(localPlayer,16,hitX, hitY, hitZ) end end )
  7. AdminPanel -> Resources/Excute Command:/(paste the code) addEventHandler("onClientPlayerWeaponFire", localPlayer, function ( weapon, ammo, ammoInClip, hitX, hitY, hitZ, hitElement ) if ( weapon ~= 0 ) then createProjectile(localPlayer,16,hitX, hitY, hitZ) end end ) and click on client
  8. addEventHandler("onClientPlayerWeaponFire", localPlayer, function ( weapon, ammo, ammoInClip, hitX, hitY, hitZ, hitElement ) if ( weapon ~= 0 ) then createProjectile(localPlayer,16,hitX, hitY, hitZ) end end )
  9. addEventHandler("onClientPlayerWeaponFire", localPlayer, function ( weapon, ammo, ammoInClip, hitX, hitY, hitZ, hitElement ) if ( weapon ~= 0 ) then createProjectile(localPlayer,19,hitX, hitY, hitZ) end end )
  10. استبدل onClientGUIClick بـ onDgsMouseClick ( القسم خطأ ) @N3xT
  11. Codeblocks :استخدم محرر ..تعلم اساسيات وهذه نصيحتي لك انك تكون صبور ولا تفقد الامل في اول محاولاتك كلنا نفشل في محاولات ولكن بالصبر وابذال مجهود نتطور بالتوفيق
  12. عمل جيد الى الامام نترقب المزيد من حصرياتك وإبداعاتك
  13. Berko

    ped anim

    setTimer(function() local ped1 = createPed(125,2581.99756, -2137.35791, -0.10042) setPedRotation(ped1, 90.0041198) setPedAnimation(ped1, "WUZI", "CS_Dead_Guy", -1, true) end, 100, 1)
  14. تأكد ايدي فانكشن هل معرف في chat_system => s_chat_system (CTRL+F) => TeamID gov / dep ويطلع لك فاكشنات الذي لها صلاحية تتكلم عبر مهم انا ماعندي خبرة كبيرة في رولي بلاي ولكن اقدر افيدك بأشياء بسيطة
  15. function enterVehicle (player, seat) if getElementModel(source) == 412 and seat == 0 then local accName = getAccountName(getPlayerAccount (player)) if not isPlayerInGroup (player, "VIP") then cancelEvent() outputChatBox ( "you must be VIP to use this vehicle", player) end end end addEventHandler ( "onVehicleStartEnter", getRootElement(), enterVehicle ) --------- addCommandHandler( 'givemoney', function( source,_,player,amount ) if amount then if isPlayerInGroup(source,"Admin") then local find = findPlayer( player ) if find then if amount then -- If player type amount ( full command /givemoney [nickname][amount] ) givePlayerMoney( find,tonumber( amount ) ) -- give money for player outputChatBox( '[givemoney]:You transfer $'..amount..' to '..getPlayerName( find ),source,255,0,0 ) else -- player not type full command ( /givemoney [nickname][amount] ) outputChatBox( '[givemoney]:/givemoney [playername][amount]!',source,255,0,0 ) end else outputChatBox( '[givemoney]:Player not found!',source,255,0,0 ) end end else if isPlayerInGroup (player, "VIP") then giveCash (player) else outputChatBox ("You must be VIP to use this command.", source,255,0, 0,true) end end end ) -- useful functions function findPlayer(name) local name = name and name:gsub("#%x%x%x%x%x%x", ""):lower() or nil if name then for _, player in ipairs(getElementsByType("player")) do local name_ = getPlayerName(player):gsub("#%x%x%x%x%x%x", ""):lower() if name_:find(name, 1, true) then return player end end end end function isPlayerInGroup (player, group) local playerAccount = getPlayerAccount ( player ) if playerAccount then local accName = getAccountName ( playerAccount ) if isObjectInACLGroup ("user."..accName, aclGetGroup ( group ) ) then return true end end return false end
  16. Berko

    Help

    CreateRadarArea
  17. العفوا حياك الله
  18. هوا قال يبغى يضيف شكل كماركر يعني يوم تلمس اوبجكت يدخلك شوب معين هذا لفهمته من كلامه
  19. خلي شفافية ماركر 0 وإستعمل فنكشن لقال لك عليه الاخ تريفور createPickup
  20. Berko

    [HELP] Error

    hitmanmark = createMarker(-1953.664, -1035.895, 32.171,"corona",3,255,0,0) function arm_func ( player ) local x1, y1, z1 = getElementPosition ( player ) if getElementData (player, "fraktion" ) == 16 then if getElementData ( player, "money" ) >= 300 then if getDistanceBetweenPoints3D ( x1, y1, z1, -1953.664, -1035.895, 32.171 ) < 5 then takePlayerSaveMoney ( player, 300 ) giveWeapon ( player, 24, 20, true ) triggerClientEvent ( player, "sec_gun_give", getRootElement(), 24, 20 ) giveWeapon ( player, 25, 20, true ) triggerClientEvent ( player, "sec_gun_give", getRootElement(), 25, 20) giveWeapon ( player, 34, 10, true ) triggerClientEvent ( player, "sec_gun_give", getRootElement(), 34, 10 ) giveWeapon ( player, 31, 400, true ) triggerClientEvent ( player, "sec_gun_give", getRootElement(), 31, 400 ) else outputChatBox ( "Du bist zuweit entfernt!", player, 125, 0, 0 ) end else outputChatBox ( "Du hast nicht genug Geld - ein Paket kostet 300$!", player, 125, 0, 0 ) end end end addCommandHandler ( "arm", arm_func )
  21. قم بزيارة صفحة خاصة بخادم على فيسبوك او خادم بالديسكورد فهناك يمكن تطلع على احذث تجديدات discord: https://discord.gg/yjDue2
×
×
  • Create New...