Jump to content

ivor

Members
  • Posts

    575
  • Joined

  • Last visited

Everything posted by ivor

  1. -- اعدادات المياة . height = 40 -- ارتفاع المياه SizeVal = 2998 -- منسوب المياه او حجم المياه بالمنطقة الي بتحط احداثياتها -- southWest_X = -SizeVal southWest_Y = -SizeVal southEast_X = SizeVal southEast_Y = -SizeVal northWest_X = -SizeVal northWest_Y = SizeVal northEast_X = SizeVal northEast_Y = SizeVal -- OnClientResourceStart الفنكشن الي يصنع المياه . function thaResourceStarting( ) water = createWater ( southWest_X, southWest_Y, height, southEast_X, southEast_Y, height, northWest_X, northWest_Y, height, northEast_X, northEast_Y, height ) -- الاحداثيات الموجوده للمكان setWaterLevel ( height ) -- ارتفاع المياه الموجود end addEventHandler("onClientResourceStart", resourceRoot, thaResourceStarting) -- مثال رقم2 function thaResourceStarting( ) water = createWater ( 1866 "southWest_X" , -1444 "southWest_Y",10 "southWest_Z", 1968 "southEast_X", -1442 "southEast_Y", 10 "southEast_Z", 1866 "northWest_X", -1372 "northWest_Y", 10 "northWest_Z", 1968 "northEast_X", -1370 "northEast_Y", 10 "northEast_Z" ) setWaterLevel ( water, 20 ) -- ارتفاع منسوب المياة end addEventHandler("onClientResourceStart", getResourceRootElement(getThisResource()), thaResourceStarting) بس عشان لاتخطأ واسهل لك مثال رقم 2 الاشياء الي بالاقواس بعد الارقام هذه للشرح فقط لا اكثر يعني لاتضيفها وانت تبرمج بس حط الاحداثيات بالظبط وخلاص وهذا كود حق الاخ ريان طالب عليه تعديل وسويته له , اعتقد بتفهم من الكود هذا اكثر x1, y1 = 3059, 1063 x2, y2 = 3016, 1063 x3, y3 = 3016, 1092 x4, y4 = 3059, 1092 height = 40 -- ارتفاع المياه function thaResourceStarting( ) water = createWater ( x1,y1,height,x2,y2,height,x3,y3,height,x4,y4,height ) createBlipAttachedTo ( water, 52 ) setWaterLevel ( height ) if water then print("ssssssssssssssssssssssssssss") else print("s") end end addEventHandler("onClientResourceStart", getResourceRootElement(getThisResource()), thaResourceStarting) وإتمنى اكون افدتك .
  2. x1, y1 = 3059, 1063 x2, y2 = 3016, 1063 x3, y3 = 3016, 1092 x4, y4 = 3059, 1092 height = 40 -- ارتفاع المياه function thaResourceStarting( ) water = createWater ( x1,y1,height,x2,y2,height,x3,y3,height,x4,y4,height ) createBlipAttachedTo ( water, 52 ) setWaterLevel ( height ) if water then print("ssssssssssssssssssssssssssss") else print("s") end end addEventHandler("onClientResourceStart", getResourceRootElement(getThisResource()), thaResourceStarting) جرب هذا .
  3. يب طلعت بالكلينت , وشكرآ لمجهودك الرجاء الاغلاق - تم الحل
  4. مايطلع شي بالشات ولا يعطي فلوس الا لو حطيت قيمة الاكس بي يعطي اكس بي ويطلع بالشات فقط بس لما ما احط قيمة اكس بي يطلع هيك بالدي بق Error: GivePrizes\server.lua:17: attempt to compare nil with number ومايطلع شي بالشات
  5. تم اعطاء اللاعب ivor الجائزة ولكن ماياخذ الفلوس بس ياخذ الاكس بي
  6. مافي اخطاء تطلع بالدي بق .
  7. مايعطي فلوس يوم اضغط ع زر تسليم الجائزة ,
  8. سلام عليكم , الحين انا مسوي هذا الكود يعطي لاعب فلوس عن طريق اسم الحساب ومسويها ع الاكس بي وشغاله انما الفلوس لا .. " بنفس الاكواد "َ هذا الكود + الدي بق مايقول انه في خطأ addEvent("SendGiftMoney", true) addEventHandler("SendGiftMoney", getRootElement(), function(acc, moneyPlayer) local Account = getAccount(acc) local thePlayer = getAccountPlayer (Account) if isElement(thePlayer) then if Account then setElementData(acc, "Money", (getElementData(acc, "Money")) + tonumber(moneyPlayer)) outputChatBox( "["..getPlayerName(thePlayer).."] تم إرسال الجائزة الي اللاعب",source, 100, 255, 100, true) else outputChatBox("* Account did not exist !", source, 255, 0, 0) end end end )
  9. سلام عليكم . . عندي استفسار وهو هل فيه كود يجعل صورة موجوده في لوحة gui تلف 45 درجة عند ضغط الزر ؟
  10. وين الخطأ الي هنا ؟ , اشغل المود ويشتغل والدي بق مايطلع اي اخطاء ! function gmcommand () if getElementData(localPlayer,"HUD",true) then setElementData(localPlayer,"HUD",false) end elseif getElementData(localPlayer,"HUD",false) then setElementData(localPlayer,"HUD",true) end end addCommandHandler ( "showgm", gmcommand ) للتوضيح : - هذا امر اذا يكتبه اللاعب يخفي له الجيو مسج واذا يكتبه ثاني يظهر له الجيو مسج .
  11. سلام عليكم .. ابي استفسر منكم في كم كود مسويهم لمود اذا اشتري لاعب شي من مثلا محل الاسلحه والفلوس الي تروح لمحل الاسلحه تروح للاعب ولكن في مثلا البنك استخدم هذه الاكواد؟ onClientGUIClick getElementData setPlayerMoney
  12. سلام عليكم , الحين انا مسوي جريد ليست وفيها 14 سيارة فيه مثلا سياره منهم ابي اللاعب اذا اخذها مره مايقدر ياخذها الا بعد 4 ساعات حتي لو سوي ريكونكت للعبه او الجهاز انا حاولت اسوويها بس مانفعت
  13. استخدم ذول -------------ServerSide---------------- OnPlayerClick ------------Shared Function----------- setGameSpeed
  14. ivor

    سؤال .

    سلام عليكم كيف اسوي لما اضغط زر من السيرفر يرسل الامر ل executeSQLQuery عشان يطبقها فورا؟ وسؤال ثاني executeSQLQuery وش ابسط شرح لها ؟ وهل ينفع احط فيها اي شي ولا فقط اشياء معينه
  15. هذا الكود اذا انا كاتب فيه من المود نفسه مب من السيرفر , انا ابي لما اكتب من السيرفر يروح للكود مثل كذا
  16. ده كله موجود هذا جزء من المود اذا كتب اللاعب شي فالشات , يجاوب عليه البوت تلقائي انا اقصد مثلا فيه Editbox1 هذا حق السؤال Editbox2 هذا حق الجواب putAnswer هذا حق اضافة السؤال والجواب ولما اضغط putAnswer يحط السؤال بالمود واذا احد كتب السؤال الي حطيته يجاوب عليه if guiGetVisible(botChat.window) == true then if guiGetText(botChat.edit ~= "" or guiGetText(botChat.edit) ~= " " then if guiGetText(botChat.edit) == getElementData(localPlayer, "botChat:LastMsg") then setTimer(function () guiSetText(botChat.memo, guiGetText(botChat.memo).."["..math.floor(hour)..":"..minute..":"..second.." "..tostring(x).." | "..day.."/"..month.."/"..year.."] You : "..guiGetText(botChat.edit).." \n["..math.floor(hour)..":"..minute..":"..second.." "..tostring(x).." | "..day.."/"..month.."/"..year.."] botChat : من فضلك لا تكرر \n") end, 500,1); setTimer(guiSetText,550,1,botChat.edit, ""); else if string.find(guiGetText(botChat.edit), "هلا") then setTimer(function () guiSetText(botChat.memo, guiGetText(botChat.memo).."["..math.floor(hour)..":"..minute..":"..second.." "..tostring(x).." | "..day.."/"..month.."/"..year.."] You : "..guiGetText(botChat.edit).." \n["..math.floor(hour)..":"..minute..":"..second.." "..tostring(x).." | "..day.."/"..month.."/"..year.."] botChat : هلا بيك \n") end, 500,1); setTimer(guiSetText,550,1,botChat.edit, ""); setTimer( function() Bot=false end,550,1) Bot = true end * هذا بملف كلينت
  17. سلام عليكم.. الحين انا مسوي لوحة شات البوت، ومسوي زر اضافة جمله ابي اذا اكتب الجمله واضغط اضافة تروح للبوت واذا كتبتها باللوحه يجاوب عليها يعني مثلا كتبت الجمله كيفك.. اجابة البوت تكون بخير ومشكورين جدا
  18. هل يوجد كود.. يسوي تاج ويعطيه للاعي معين بدون مايدخل ع الاسل؟
  19. ivor

    طلب كود

    بوضحلك اكثر .. الحين انا مثلا مسوي 2 ايديت بوكس الاول احط فيه مثلا سؤال مثل كيف اجيب فلوس الثاني فيه الاجابه : - عن طريق قتل الاشخاص واضغط علي زر اضافة السؤال ينضاف للمود ولما اجي اسال بالمود كيف اجيب فلوس يجاوبني مثل ماحطيت الاجابه
  20. سلام عليكم , الحين انا مسوي لوحة شات ألى , وحاط زر خاص لي اضيف مثلا كلمة معينه واجابتها اذا احد كتب في هالشات ابي اذا اضيف هالكلمة تروح تتسجل في المود مباشرة واذا احد كتبها تظهرله بمعنى اصح مثل البوت
  21. سلام الله عليكم . ابي كود يثبت الماركر علي اوبجيكت متحرك وشكرآ , مثال ماركر سيارات علي سفينه
  22. كودك صح وتمام , بس فيه بق انه لما تفوت مده الفيب تبعه مايروح منه وهذا الي سويتها يقولي سطر 74 جانب 16 انا مب متأكد انه الكود صح او لا addEvent("Gift",true) addEventHandler("Gift",root, function(Type,Table) if Type == "Gift" and source then local Account = getPlayerAccount(source) if not (isGuestAccount(Account) ) then if not (doesPlayerTokeGift(source) ) then if Table[3] == "Group" then local Group = getElementData(source,"Group") if Group then triggerEvent(source,"addPointToGroup",source,Group,Table[2]) end elseif Table[3] == "Diamond" then local GC = (getElementData(source,"Diamond") or 0 ) setElementData(source,"Diamond",GC + Table[2]) elseif Table[3] == "Money" then givePlayerMoney(source,Table[2]) elseif Table[3] == "xp" then local xp = (getElementData(source,"xp") or 0 ) setElementData(source,"xp",xp + Table[2]) elseif Table[3] == "Weapon" then if string.find(Table[1],"Rocket") then giveWeapon(source,36,Table[2],true) elseif string.find(Table[1],"Grenade") then giveWeapon(source,16,Table[2],true) end elseif Table[3] == "Launcher" then local Launcher = (getElementData(source,"Launcher") or 0 ) setElementData(source,"Launcher",Launcher + Table[2]) elseif Table[3] == "VIP2" then local player = getRandomPlayer ( ) if isGuestAccount ( getPlayerAccount ( player ) ) then return end if not ( isObjectInACLGroup ( "user."..getAccountName ( getPlayerAccount ( player )), aclGetGroup ( "VIP2" ) ) ) then aclGroupAddObject(aclGetGroup("VIP2"), "user."..getAccountName ( getPlayerAccount ( player ) )) setElementData(player, "isPlayerVIP", source,Table[2],true) if ( isObjectInACLGroup ( "user."..getAccountName ( getPlayerAccount ( player ) ), aclGetGroup ( "VIP2" ) ) ) then setElementData(player, "isPlayerVIP", true) local player2 = getRandomPlayer ( ) == aclGroupListObjects(aclGetGroup( "VIP2" )) if isGuestAccount ( getPlayerAccount ( player2 ) ) then return end aclGroupRemoveObject(aclGetGroup("VIP2"), "user."..name,60*60) end exports["guimessages"]:outputServer(source,"#00ACCF[Daily Gift] #00ff00 You have won #ffff00 "..Table[1].." #00ff00, Congratulations .",255,255,255) outputChatBox("#00ACCF[Daily Gift] #ffff00 "..getPlayerName(source).." #00ff00 had won #ffff00"..Table[1].." #00ff00.",root,255,255,255,true) table.insert(Gifts,{getAccountName(Account),2*60*60}) triggerClientEvent(source,"Gift",source,"Refresh",2*60*60) else exports["guimessages"]:outputServer(source,"#00ACCF[Daily Gift] #ff0000 you already have won a gift before",255,255,255) end end end end end -- type end -- function ) 60*60 = مده تجريبيه انه بيروح مني او لا
  23. دي بق ERROR : Loading script failed : Gift/server.lua:69 ')' expected (to close '(' at line 16) near 'end' الكود كامل : - addEvent("Gift",true) addEventHandler("Gift",root, function(Type,Table) if Type == "Gift" and source then local Account = getPlayerAccount(source) if not (isGuestAccount(Account) ) then if not (doesPlayerTokeGift(source) ) then if Table[3] == "Group" then local Group = getElementData(source,"Group") if Group then triggerEvent(source,"addPointToGroup",source,Group,Table[2]) end elseif Table[3] == "Diamond" then local GC = (getElementData(source,"Diamond") or 0 ) setElementData(source,"Diamond",GC + Table[2]) elseif Table[3] == "Money" then givePlayerMoney(source,Table[2]) elseif Table[3] == "xp" then local xp = (getElementData(source,"xp") or 0 ) setElementData(source,"xp",xp + Table[2]) elseif Table[3] == "Weapon" then if string.find(Table[1],"Rocket") then giveWeapon(source,36,Table[2],true) elseif string.find(Table[1],"Grenade") then giveWeapon(source,16,Table[2],true) end elseif Table[3] == "Launcher" then local Launcher = (getElementData(source,"Launcher") or 0 ) setElementData(source,"Launcher",Launcher + Table[2]) elseif Table[3] == "VIP2" then local player = getRandomPlayer ( ) if isGuestAccount ( getPlayerAccount ( player ) ) then return end if not ( isObjectInACLGroup ( "user."..getAccountName ( getPlayerAccount ( player )), aclGetGroup ( "VIP2" ) ) ) then aclGroupAddObject(aclGetGroup("VIP2"), "user."..getAccountName ( getPlayerAccount ( player ) )) setElementData(player, "isPlayerVIP", source,Table[2],true) if ( isObjectInACLGroup ( "user."..getAccountName ( getPlayerAccount ( player ) ), aclGetGroup ( "VIP2" ) ) ) then setElementData(player, "isPlayerVIP", true) end exports["guimessages"]:outputServer(source,"#00ACCF[Daily Gift] #00ff00 You have won #ffff00 "..Table[1].." #00ff00, Congratulations .",255,255,255) outputChatBox("#00ACCF[Daily Gift] #ffff00 "..getPlayerName(source).." #00ff00 had won #ffff00"..Table[1].." #00ff00.",root,255,255,255,true) table.insert(Gifts,{getAccountName(Account),2*60*60}) triggerClientEvent(source,"Gift",source,"Refresh",2*60*60) else exports["guimessages"]:outputServer(source,"#00ACCF[Daily Gift] #ff0000 you already have won a gift before",255,255,255) end end end end end end end) حطيت اكثر من 3 end بالاخر وبرضه يطلع هالمشكلة
  24. حاطه عشان السكربت يشتغل بالكامل اذا اشيله يخرب سكربت الفيب ومايعطيه شي بس وهمي :[ وانا حاطه ' player ' مب 'players'
×
×
  • Create New...