Jump to content

Mr.Mostafa

Members
  • Posts

    1,377
  • Joined

  • Last visited

  • Days Won

    3

Everything posted by Mr.Mostafa

  1. سلام عليكم ابي اسوي مود افك لو ضغطت علي اي زر بالكيبورد يحطلي داتا ولو ما ضغطت لفترة يحطلي داتا تانية كيف؟
  2. 'طيب انا سويت التايمر - لكن ابي تصحيح بس
  3. تمام شكرا + طيب طلب الـ التايمر؟
  4. + ابي ان الاعب الي باخد منه الفلوس ما يكون انا محاولتي: if ( name ) and not == source then
  5. تسلم + جاري تجربته طيب شوف مثلا لو ابي اسوي لما اكتب الامر ينتظر 5 ثواني عشان ينفذ ويبلع الي باخد منه فلوس - انه يهرب عشان ما اخد منه فلوس واذا المساحة بعدت او هرب مني الامر ينلغي وما اقدر اخد الفلوس ويقولي فشلت محاولتي: addCommandHandler ("steal", function ( source, cmd, name ) if ( name ) then local wantedPlayer = getPlayerFromPartialName ( name ) if ( wantedPlayer ) then local amount = tonumber ( amount ) local px,py,pz = getElementPosition ( source ) local pint = getElementInterior ( source ) local pdim = getElementDimension ( source ) local wx,wy,wz = getElementPosition ( wantedPlayer ) local wint = getElementInterior ( wantedPlayer ) local wdim = getElementDimension ( wantedPlayer ) local amount = math.random(1000,15000) if ( pint == wint and pdim == wdim ) then local dis = getDistanceBetweenPoints3D ( px, py, pz, wx, wy, wz ) if ( dis <= distance ) then outputChatBox ("* Player "..getPlayerName(source).." tried to take money from you !!",wantedPlayer,255,0,0,true) setTimer(function() if ( dis <= distance ) then takePlayerMoney ( wantedPlayer, amount ) givePlayerMoney ( source, amount ) outputChatBox ("Player "..getPlayerName(source).." Steal "..amount.." from "..getPlayerName(wantedPlayer).."",root,255,0,0,true) end end, 1000*5, 1 ) else outputChatBox("لايوجد لاعب قريب منك", source) end else outputChatBox("اللاعب بعالم اخر", source) end else outputChatBox("هنالك خطأ بايجاد اللاعب", source) end else outputChatBox("/"..cmd.." player", source) end end )
  6. ابي اسوي لو انا قريب جداااااااا من الاعب الي بكتب اسمه اخد منه الفلوس الي بحدددها /take player amount !
  7. عدلت اليوزفل فكشن حطيت for _,v in pairs(getElementsByType("player")) do طيب بس كودك انت مسويه انه ياخد فلوس من اقرب لاعب جمبي انا ابي احدد الاعب
  8. المشكلة مب بالاند والكلام دا - انا مسوي كود علي السريع لكن اليوزفل فكشن ابي احد يظبطه لي
  9. سلام عليكم ابي اسوي لو انا جمب لاعب اقدر اخد منه فلوس عادي لكن المشكلة لو بعيد عنه باخد برضوا **( getNearestVehicle مستخدم يوزفل فكشن )** addCommandHandler ("takeM", function (source,cmd,name,amount) local playerStealFromHimMoney = getPlayerFromPartialName (name) local gplayer = getNearestVehicle ( playerStealFromHimMoney , 1 ) if gplayer then takePlayerMoney ( playerStealFromHimMoney, tonumber(amount) ) givePlayerMoney ( source, tonumber(amount) ) else outputChatBox ("* Error :#ffffff يجب ان تقترب من الاعب لاخد منه فلوس !",source,255,0,0,true) end ) function getNearestVehicle(player,distance) local tempTable = {} local lastMinDis = distance-0.0001 local nearestVeh = false local px,py,pz = getElementPosition(player) local pint = getElementInterior(player) local pdim = getElementDimension(player) for _,v in pairs(getElementsByType("player")) do local vint,vdim = getElementInterior(v),getElementDimension(v) if vint == pint and vdim == pdim then local vx,vy,vz = getElementPosition(v) local dis = getDistanceBetweenPoints3D(px,py,pz,vx,vy,vz) if dis < distance then if dis < lastMinDis then lastMinDis = dis nearestVeh = v end end end end return nearestVeh end
  10. local RespawnPositions = { {-3487.27246+math.random(1,5), -3020.19141+math.random(1,5), 4.96875, }, {-3487.65552+math.random(1,5), -3038.20850+math.random(1,5), 4.96875, }, } addEventHandler( 'onPlayerWasted', root, function() local x, y, z = unpack(RespawnPositions[math.random(#RespawnPositions)]) spawnPlayer ( source,x, y, z,180, 46, 0, 0) end )
  11. صارلي مشكلة صار لو دمي نقص واحد بس يرسبني وش دا؟
  12. شكرا + جاري التجربة
  13. ممكن تصحيح local RespawnPositions = { [ 383.83469, 1912.90173, 17.64063 ] = true, [ 319.83218, 1906.50525, 17.64063 ] = true, } addEventHandler( 'onPlayerWasted', root, function() spawnPlayer ( source, RespawnPositions[math.random (#RespawnPositions) 180, 46, 0, 0) end )
  14. طيب كيف اخليه يرسبن في اماكن مختلفة ؟ ب math.ranom ?
  15. يب بس كيف اتحقق ان الاعب مات؟ onPlayerWasted خلاص ض1
  16. سلام عليكم ابي اكواد لما الاعب يموت يرسبن في مكان معين
  17. يا شباب هو يبي يسوي مثل سرفر وناسة تايم عبارة عن تايمر فوق علي اليمين لما يخلص التايمر يشغل مهمة الديربي مثلا ....
  18. function chatbox(text, msgtype) chatSpaming = {} if get("*chat/blockRepeatMessages2") == "true" and chatSpaming[source] and chatSpaming[source] == text then outputChatBox( " [ Spam ]#ff0000 لا تكرر " , source,225,170,90, true) playSoundFrontEnd( source, 45 ) return else chatSpaming[source] = text end if isObjectInACLGroup("user." .. account, aclGetGroup("Admin")) then outputChatBox("ADMIN :" .. name .. ":"..color.." " .. text, root, 255, 255, 255, true) elseif isObjectInACLGroup("user." .. account, aclGetGroup("King.Time")) then outputChatBox("#ff0033✱【⊰ #339933King Of Time #ff0033⊱】✱#FFFFFF" .. name .. ":"..color.." " .. text, root, 255, 255, 255, true) elseif isObjectInACLGroup("user." .. account, aclGetGroup("Everyone")) then outputChatBox("#73dbff✱#ffffff【#ff96e7» #ffffffالــعــرب #ff96e7طــارات #7bdfff زائــر #ff96e7«#ffffff】#73dbff✱#ffffff" .. name .. ":"..color.." " .. text, root, 255, 255, 255, true) end end end addEventHandler("onPlayerChat", root, chatbox)
  19. if isObjectInACLGroup("user." .. account, aclGetGroup("Admin")) then outputChatBox("ADMIN :" .. name .. ":"..color.." " .. text, root, 255, 255, 255, true) elseif isObjectInACLGroup("user." .. account, aclGetGroup("King.Time")) then outputChatBox("#ff0033✱【⊰ #339933King Of Time #ff0033⊱】✱#FFFFFF" .. name .. ":"..color.." " .. text, root, 255, 255, 255, true) elseif isObjectInACLGroup("user." .. account, aclGetGroup("Everyone")) then outputChatBox("#73dbff✱#ffffff【#ff96e7» #ffffffالــعــرب #ff96e7طــارات #7bdfff زائــر #ff96e7«#ffffff】#73dbff✱#ffffff" .. name .. ":"..color.." " .. text, root, 255, 255, 255, true) end end end addEventHandler("onPlayerChat", root, chatbox)
×
×
  • Create New...