Jump to content

LiOneLMeSsIShoT

Members
  • Posts

    609
  • Joined

  • Last visited

Everything posted by LiOneLMeSsIShoT

  1. اها اعرف....جربت كتير بس بيجيب الرسالة بردة..
  2. اهاااااااااااااا تمام... فهمت function Pedser(thePlayer, command,_, Peds,_, VehicleModels) local x, y, z = getElementPosition (thePlayer) local x = x+5 Vehicle = createVehicle (tonumber(VehicleModels),x ,y ,z) Pedss = createPed (tonumber(Peds), 0, 0, 0) warpPedIntoVehicle (Pedss, Vehicle, 0) if Vehicle and Pedss then return outputChatBox ("you've spawned them already.", thePlayer, 255, 0, 0) end end addCommandHandler ("lol", Pedser) كدة؟ الكود شغال؟ لا انا عدلتة تانى function Pedser(thePlayer, command,_, Peds,_, VehicleModels) if (tonumber(Peds)) and (tonumber(VehicleModels)) then local x, y, z = getElementPosition (thePlayer) local x = x+5 Vehicle = createVehicle (VehicleModels,x ,y ,z) Pedss = createPed (Peds, 0, 0, 0) warpPedIntoVehicle (Pedss, Vehicle, 0) else return outputChatBox ("Please follow the right command, example /lol 9 5", thePlayer, 255, 0, 0) end end addCommandHandler ("lol", Pedser) انا جربتة الصراحة! بس مهما كنبت ارقم بيجيبلى الرسالة بتاعت outputCHatBox
  3. اهاااااااااااااا تمام... فهمت function Pedser(thePlayer, command,_, Peds,_, VehicleModels) local x, y, z = getElementPosition (thePlayer) local x = x+5 Vehicle = createVehicle (tonumber(VehicleModels),x ,y ,z) Pedss = createPed (tonumber(Peds), 0, 0, 0) warpPedIntoVehicle (Pedss, Vehicle, 0) if Vehicle and Pedss then return outputChatBox ("you've spawned them already.", thePlayer, 255, 0, 0) end end addCommandHandler ("lol", Pedser) كدة؟ الكود شغال؟
  4. اها فهمت بس ايه فائدة "_" هنا؟ function ( player,_,id ) ال هى _ ؟؟؟؟ وغير كدة ممكن تقولى ايه الغلط فى الكود بتاعى؟ وانا احاول اصلحة فى الكود بتاعى هتكتب /spawner 50 4 مثلااااا يعمل سيارة و شخصية... فاهمنى؟
  5. اها فهمت بس ايه فائدة "_" هنا؟ function ( player,_,id ) ال هى _ ؟؟؟؟ وغير كدة ممكن تقولى ايه الغلط فى الكود بتاعى؟ وانا احاول اصلحة
  6. طيب بص انا راح اعمل اسكريبت بسيط وتقولى هيشتغل ولا لا function Pedser(thePlayer, command, Peds, VehicleModels) command = "spawner" local x, y, z = getElementPosition (thePlayer) local x = x+5 Vehicle = createVehicle (tonumber(VehicleModels),x ,y ,z) x = x -2 --- اقصد هنا راح تنقص منها 2 بعد ما يعمل السيارة Pedss = createPed (tonumber(Peds), x, y, z) warpPedIntoVehicle (Pedss, Vehicle, 0) if Vehicle and Pedss then return outputChatBox ("you've spawned them already.", thePlayer, 255, 0, 0) end end addCommandHandler (command, Pedser) الوقتى دة بس سكريبت عملتة علشان افهم اكتر عن tonumber طيب؟ الوقتى حبيت اجرب الطريقة دى... يعنى اما اللاعب يكتب ال Command يجيبلة سيارة وراجل داخل السيارة
  7. طيب بص انا راح اعمل اسكريبت بسيط وتقولى هيشتغل ولا لا function Pedser(thePlayer, command, Peds, VehicleModels) command = "spawner" local x, y, z = getElementPosition (thePlayer) local x = x+5 Vehicle = createVehicle (tonumber(VehicleModels),x ,y ,z) x = x -2 --- اقصد هنا راح تنقص منها 2 بعد ما يعمل السيارة Pedss = createPed (tonumber(Peds), x, y, z) warpPedIntoVehicle (Pedss, Vehicle, 0) if Vehicle and Pedss then return outputChatBox ("you've spawned them already.", thePlayer, 255, 0, 0) end end addCommandHandler (command, Pedser)
  8. function createVehicleForPlayer(thePlayer, command, vehicleModel) local x,y,z = getElementPosition(thePlayer) -- get the position of the player x = x + 5 -- add 5 units to the x position local createdVehicle = createVehicle(tonumber(vehicleModel),x,y,z) -- check if the return value was ''false'' if (createdVehicle == false) then -- if so, output a message to the chatbox, but only to this player. outputChatBox("Failed to create vehicle.",thePlayer) end end addCommandHandler("createvehicle", createVehicleForPlayer) اول شئ هنا.....لو بدلنا "command" ب "vehicleModel" رايح تشتغل؟ اقصد اكثر! ازاى الاوامر دى هتشتغل وهى مو متعرفة فى متغيرات؟ function createVehicleForPlayer(thePlayer, command, vehicleModel) ثانى شئ ايه الغرض من كتابة tonumber هنا؟ ومع ذلك VehicleModel مو متعرفة فى متغير! اوالفنكشن ازاى يعرفها؟ يعنى الفنكشن ازاى يعرف ان دة موديل السيارة وراح يجيب اى موديل ؟ local createdVehicle = createVehicle(tonumber(vehicleModel),x,y,z)
  9. الله يعطيك العافية وما قصرت ولله!!! وفهمت منك بس لسة عندى مشكلة! فى فهم الكود الاول الوقتى احنا بنتحقق ب tonumber اذا كانت القيمة رقمينة ام لا... و tostring ان احنا نحول القيمة الى قيمة نصية يعنى نحط الكلمة بين علامتان تنصيص! "" صحيح؟! اذا ليه استعملنا حلو؟ طيب احنا ليه استعملنا tonumber فى السكريبت فوق؟؟؟ وممكن تدينى مثال عملى على tonumber.. و tostring? وايضا انا اعرف انه فيه سكريببتس كاملين ل Login panel بس انا عاوز اعمل واحدة بنفسى! اعرف اصمم بس مو عارف الاكواد ال راح استعملها! "يعطيك العافية اخى " اسف للتطويل فى الموضوع
  10. ممكن لينكات الشرح الخاص بال tonumber و ال tostring وايضا ممكن تقولى الاكواد المستعملة فى عمل Login PANEL
  11. ممكن شرح ل tostring بردة؟ لانى مش فاهمها بردة
  12. ال فهمتة من حضرتك ان فى اضافات وضروريات....لكن اقصد....متى استعمل الاضافات فى function... يعنى للتوضيح اكثر function sdsad(thePlayer, command, vehiclemodel) هنا! فى تأثير لو ما وضعت Command و vehicleModel ??? وليه اضعهم ؟! ومتى... وليه ما وضعت function (thePlayer, vehicleModel, command) بدلا من command اولا... وليه سميتها Command.. الموضوع ملخبط :( وبالنسبة لتسجيل الدخول انا عاوز اعرف الاكواد ال هأستعملها بس. .. لانى مش عارف الاكواد ال راح استعملها وبالنسبة ل tonumber ممكن تشرحهالى؟
  13. السلام عليكم شباب انا محتاج مساعدة النهاردة مع كيفية عمل سكريبت لتسجيل الدخول والتسجيل فى السيرفر...عاوز اعرف الاكواد ال هأستعملها...وعاوز اعمل كود ل Check Box بحيث انه يحفظ بيانات دخول المستخدم عند ضغطة Check box للدخول بدون كتابة البيانات مرة اخرى..فقد الضغط على Login ............ الشئ الثانى انا عاوز اعرف ما هو استعمال tonumber انا اعرف انه بيحول القيمة من ... احرف لارقام؟ تفريبا لكن مش واثق... function createVehicleForPlayer(thePlayer, command, vehicleModel) local x,y,z = getElementPosition(thePlayer) -- get the position of the player x = x + 5 -- add 5 units to the x position local createdVehicle = createVehicle(tonumber(vehicleModel),x,y,z) -- check if the return value was ''false'' if (createdVehicle == false) then -- if so, output a message to the chatbox, but only to this player. outputChatBox("Failed to create vehicle.",thePlayer) end end addCommandHandler("createvehicle", createVehicleForPlayer) هنا عاوز افهم بعض الاشياء! مثلا ليه كتبنا فى ال Function ( thePlayer, command, vehicleModel) يعنى اقصد ازاى السكريبت هيفهم من غير وضع معنى؟! يعنى... Command, vehicleModel مش ليهم معنى... لانى مش شايف مصدر ليهم ان مثلا دة متغير vehiclemodel = 541 او Command Command = "blahblah" لكن فى السكريبت ما فى متغير ل دول...ف VehicleModel Command دول مش متعرفين فى السكريبت... اقصد اكثر! ازاى الفنكشن بيعرفهم؟! .. طيب الوقتى لو بدلنا فى ال function (command,thePlayer,VM) هيشتغل؟! يعنى اقصد ازاى السكريبت يعرف ان دة مكان محدد لل Command.. مو لل VehicleModel
  14. They're not doing the action i want man i'm just trying to say in the script "when the zombie which the ped is attacking is away from him then the ped will follows him to make the distance about 10 and then starts to shot him" and actually the most of the script i can't understand because That guy helped me that he made the script more Complex and i'm actually need help to understand it too.
  15. what the hell is that dude? local stat = getPedStat ( source, 72 and 73 ) you can't use "72 and 73...it handle only 1 vairable and also why are you defining the stat every time you use it in function? Try this: --Shotgun----Shotgun-- local stat1 local stat2 addEventHandler ("onPlayerJoin", root, function () stat1 = getPedStat ( source, 72) stat2 = getPedStat ( source, 73) end ) function SLev1 () takePlayerMoney ( source, 5000 ) setPedStat(source,stat1, 200) setPedStat(source,stat2, 200) end addEvent ("SStats1", true) addEventHandler ( "SStats1", getRootElement(), SLev1 ) function SLev2 () takePlayerMoney ( source, 20000 ) setPedStat(source, stat1, stat+200) setPedStat(source, stat2, stat+200) end addEvent ("SStats2", true) addEventHandler ( "SStats2", getRootElement(), SLev2 ) function SLev3 () takePlayerMoney ( source, 40000 ) setPedStat(source, stat1, stat+200) setPedStat(source, stat2, stat+200) end addEvent ("SStats3", true) addEventHandler ( "SStats3", getRootElement(), SLev3 ) function SLev4 () takePlayerMoney ( source, 65000 ) setPedStat(source, stat1, stat+200) setPedStat(source, stat2, stat+200) end addEvent ("SStats4", true) addEventHandler ( "SStats4", getRootElement(), SLev4 ) function SLev5 () takePlayerMoney ( source, 95000 ) setPedStat(source, stat1, stat+200) setPedStat(source, stat2, stat+200) end addEvent ("SStats5", true) addEventHandler ( "SStats5", getRootElement(), SLev5 ) --Shotgun----Shotgun-- [/lua]
  16. And this Example is Good too. but changed " setGuiEnabled to guiSetEnabled
  17. And this Example is Good too.
  18. Loook i have made an example for you: function btn1 (button, state) if (button == "left" and state == "up") then if ( guiGetEnabled (PLeve11) == true and not getElementData (localPlayer, "Enabled1") ) then guiSetEnabled (PLeve11, false) setElementData (localPlayer, "Enabled1", true) guiSetEnabled (PLeve12, true) end end end addEventHandler ("onClientGUIClick", PLevel1, btn1, false)
  19. Yes i understand what do you want.. and it have some ways to do that and you can try: guiSetEnabled setElementData for me it's Easy way.
  20. guiSetEnabled setElementData
  21. You have Changed the addEvent TO Plev5 and ...Plev 4 ..etc.....IT and removed the functions from client side! so how do you thnk the triggers will work? Can you just Copy the script i posted and try it without changing the triggerServerEvent and addEvents?
  22. Try this: Server: function PLev1 () takePlayerMoney ( source, 5000 ) setPedStat(source, 69, 200) end addEvent ("Stats1", true) addEventHandler ( "Stats1", getRootElement(), PLev1 ) function PLev2 () local stat = getPedStat ( source, 69 ) takePlayerMoney ( source, 20000 ) setPedStat(source, 69, stat+200) end addEvent ("Stats2", true) addEventHandler ( "Stats2", getRootElement(), PLev2 ) function PLev3 () local stat = getPedStat ( source, 69 ) takePlayerMoney ( source, 40000 ) setPedStat(source, 69, stat+200) end addEvent ("Stats3", true) addEventHandler ( "Stats3", getRootElement(), PLev3 ) function PLev4 () local stat = getPedStat ( source, 69 ) takePlayerMoney ( source, 65000 ) setPedStat(source, 69, stat+200) end addEvent ("Stats4", true) addEventHandler ( "Stats4", getRootElement(), PLev4 ) function PLev5 () local stat = getPedStat ( source, 69 ) takePlayerMoney ( source, 95000 ) setPedStat(source, 69, stat+200) end addEvent ("Stats5", true) addEventHandler ( "Stats5", getRootElement(), PLev5 ) client: function status() SWindow = guiCreateWindow(448, 278, 687, 321, "Status", false) guiWindowSetSizable(SWindow, false) guiSetAlpha(SWindow, 0.60) PGrid = guiCreateGridList(10, 33, 667, 44, false, SWindow) PLabelSol = guiCreateLabel(11, 10, 91, 24, "Pistol", false, PGrid) guiSetFont(PLabelSol, "default-bold-small") guiLabelSetHorizontalAlign(PLabelSol, "center", false) guiLabelSetVerticalAlign(PLabelSol, "center") PLabelSag = guiCreateLabel(567, 10, 91, 24, "Pistol", false, PGrid) guiSetFont(PLabelSag, "default-bold-small") guiLabelSetHorizontalAlign(PLabelSag, "center", false) guiLabelSetVerticalAlign(PLabelSag, "center") PLevel1 = guiCreateButton(112, 11, 81, 23, "Level 1", false, PGrid) PLevel2 = guiCreateButton(203, 11, 81, 23, "Level 2", false, PGrid) PLevel3 = guiCreateButton(294, 11, 81, 23, "Level 3", false, PGrid) PLevel4 = guiCreateButton(385, 11, 81, 23, "Level 4", false, PGrid) PLevel5 = guiCreateButton(476, 11, 81, 23, "Level 5", false, PGrid) addEventHandler ( "onClientGUIClick", PLevel1, PLev1, false ) addEventHandler ( "onClientGUIClick", PLevel2, PLev2, false ) addEventHandler ( "onClientGUIClick", PLevel3, PLev3, false ) addEventHandler ( "onClientGUIClick", PLevel4, PLev4, false ) addEventHandler ( "onClientGUIClick", PLevel5, PLev5, false ) ---ClientToServerHandlers addEventHandler ("onClientGUIClick", PLevel1, PLev11, false) addEventHandler ("onClientGUIClick", PLevel2, PLev22, false) addEventHandler ("onClientGUIClick", PLevel3, PLev33, false) addEventHandler ("onClientGUIClick", PLevel4, PLev44, false) addEventHandler ("onClientGUIClick", PLevel5, PLev55, false) end addEventHandler( "onClientResourceStart", getResourceRootElement( getThisResource( ) ), status ) function statusop() if (guiGetVisible (SWindow) == true) then guiSetVisible(SWindow, false) showCursor(false) elseif (guiGetVisible (SWindow) == false) then guiSetVisible(SWindow, true) showCursor(true) end end bindKey ("F7", "down", statusop) function PLev11 () triggerServerEvent ("Stats1", localPlayer) end function PLev22 () triggerServerEvent ("Stats2", localPlayer) end function PLev33 () triggerServerEvent ("Stats3", localPlayer) end function PLev44 () triggerServerEvent ("Stats4", localPlayer) end function PLev55 () triggerServerEvent ("Stats5", localPlayer) end And this: addEventHandler ( "onClientGUIClick", PLevel1, PLev1, false ) addEventHandler ( "onClientGUIClick", PLevel2, PLev2, false ) addEventHandler ( "onClientGUIClick", PLevel3, PLev3, false ) addEventHandler ( "onClientGUIClick", PLevel4, PLev4, false ) addEventHandler ( "onClientGUIClick", PLevel5, PLev5, false ) Dosen't Give any sense...do you have functions for this event Handlers?
×
×
  • Create New...