Jump to content

Abdul KariM

Members
  • Posts

    2,711
  • Joined

  • Days Won

    42

Everything posted by Abdul KariM

  1. الحين كل المودات كذا ؟ ولا بس السكور بورد ؟
  2. ولو تفرمت السيرفر يحفظها ؟ اكيد لا يب لانها محفوظة على الاكونت داتا , والحسابات دائما محفوظة الا لافرمت السيرفر تطير كل البيانات , في حالة انك ماخذ نسخة مايروح شي بالتوفيق
  3. guieditor انت الحين يوم تسوي لوحة بسكربت وتسوي بوتون وتكتب فيه ويوم تحط له خط السالفة سهلة بعد ماتسوي الي تبيه حط الخط في الملف حق السكربت وعرفه بالميتا ورح اكوادك وغير اسم الخط وخلاص بالتوفيق
  4. ^ getElementsByType واضحه من الاسم , تجيب لك كل الالمنتات من التايب التايب : لاعب , اوبجكت , بيد , مركبات , الخ Key هذي المفتاح Value وهذي القيمة for تدور على كل شي بالسيرفر لو تجرب راح تفهم اكثر واكثر بالتوفيق ان شاء الله
  5. كودي شغال ومجربه اطرحه الميتا وياليت لو تقول لنا وش الي يطلع لك بالدي بوق ؟
  6. عليكم السلام المشكلة من الخط انت مركب سكربت يغير كل الخطوط بعض الخطوط ماتدعم اللغة العربية بالتوفييق
  7. بس سوال لو ساويته وساويت رسترات بتروح الفلوس ؟ ولا لا حتى لو طفى السيرفر لانه راح ينحفظ بقاعدة بيانات sql
  8. هذا افضلك لو تبي تسويه بالسريال ولاتنسى تركب السكربت ولاتغير اسمه وتقدر تسوي الفلوس والوقت واي شي تبيه انصحك فيه بالتوفيق ي غاالي ركبت المود https://community.multitheftauto.com/in ... ls&id=6313 مشكله < وشغلته اذا عطيت واحد فلوس وطلع من حسابه < بروح فلوسه ؟ why فاهم ردي غلط السكربت ذا انت تسويه يحفظ الي تبي تسويه على السريال وشوف رد محمد
  9. عليكم السلام لو توضح السطر الثاني والثالث مافهمت شي ....
  10. هذا افضلك لو تبي تسويه بالسريال ولاتنسى تركب السكربت ولاتغير اسمه وتقدر تسوي الفلوس والوقت واي شي تبيه انصحك فيه بالتوفيق
  11. onClientMouseEnter هذا الفنكشن يتحقق ان الماوس على الزر نفسه بدون ماتضغط عليه زي ماتقول دخل عليه onClientMouseLeave وهذا يتحقق ان الماوس خارج الزر نفسه وايضا بدون ماتضغط عليه يعني مادخلت عليه شوف هذي الامثلة شوف هذا المثال Button = guiCreateButton(...) addEventHandler("onClientMouseEnter",root, function( ) if ( source == Button ) then guiSetFont ( Button , "sa-gothic" ) end end ); addEventHandler("onClientMouseLeave",root, function( ) if ( source == Button ) then guiSetFont ( Button , "default-bold-small" ) end end ); Gui والسورس حق الفنكشنين ذولي هو المنت حق ال
  12. يحب انا م اتهمتك ف كوداتك انها عطلانه لاكن انت اتهمتني إني بسوي حفظ لسيارات بداتا لاتغير الموضوع انا توني فهمتك لاكن جرب اكوادي قبل لاترد
  13. ؟ هو الحين ب السكل ؟ شوف زين الله يهديك مادام م فهمت وش بسوي لا تحكم ع فكري كنت بسوي للصف داتا بإسم السيارة ويوم يشتريها يجيب داتا الصف وياخذ اسمها ويكمل ع الكود طيب شفت ردي ؟ جربت الاكواد ؟
  14. ؟ هو الحين ب السكل ؟ شوف زين الله يهديك
  15. عليكم السلام جرب كلينت local screenX, screenY = guiGetScreenSize() local width, height = 200, 200 local x = (screenX/2) - (width/2) local y = (screenY/2) - (height/2) local lp = getLocalPlayer() theWindow = guiCreateWindow(x,y,width,height,"Car Features",false) guiWindowSetSizable(theWindow,false) guiSetVisible (theWindow, false) spawnBut = guiCreateButton(0.0604,0.120,0.4,0.2,"Spawn",true,theWindow) engenieBut = guiCreateButton(0.0604,0.420,0.4,0.2,"Engenie",true,theWindow) lockBut = guiCreateButton(0.490,0.420,0.4,0.2,"Lock",true,theWindow) lightsBut = guiCreateButton(0.0604,0.720,0.4,0.2,"Lights",true,theWindow) destroyBut = guiCreateButton(0.490,0.120,0.4,0.2,"Destroy",true,theWindow) function resourceStart () bindKey ("F3", "down", menuShow) end addEventHandler ("onClientResourceStart", getResourceRootElement ( getThisResource () ), resourceStart) function menuShow () visableornot = guiGetVisible (theWindow) if (visableornot == true) then guiSetVisible (theWindow, false) showCursor (false) end if (visableornot == false) then guiSetVisible (theWindow, true) showCursor (true) end end addEvent ("carSpawn", true) addEvent ("carDestroy", true) function guiClick (button, state, absoluteX, absoluteY) if (source == spawnBut) then triggerServerEvent ("carSpawn", lp) elseif (source == destroyBut) then triggerServerEvent ("carDestroy", lp) elseif (source == engenieBut) then triggerServerEvent ("engenieSwitch", lp) elseif (source == lockBut) then triggerServerEvent ("lockSwitch", lp) elseif (source == lightsBut) then triggerServerEvent ("lightsSwitch", lp) end end addEventHandler ("onClientGUIClick", getRootElement(), guiClick) carshopWindow = guiCreateWindow(500,200,290,440,"Car Shop",false) guiSetVisible (carshopWindow, false) guiSetAlpha(carshopWindow,1) guiWindowSetSizable(carshopWindow,false) selectLabel = guiCreateLabel(0.0423,0.1009,0.8889,0.078,"Select your car",true,carshopWindow) guiSetAlpha(selectLabel,1) guiLabelSetColor(selectLabel,255,255,255) guiLabelSetVerticalAlign(selectLabel,"top") guiLabelSetHorizontalAlign(selectLabel,"left",false) guiSetFont(selectLabel,"default-bold-small") carGridList = guiCreateGridList(0.0476,0.1789,0.9048,0.6789,true,carshopWindow) guiGridListSetSelectionMode(carGridList,0) carColumn = guiGridListAddColumn(carGridList,"Car",0.5) costColumn = guiGridListAddColumn(carGridList,"$",0.3) costColumn = guiGridListAddColumn(carGridList,"ID",0.3) local cars = { { 579,60000,"Camry" }, { 400,60000,"Elentra" }, } for i,v in ipairs (cars) do local row = guiGridListAddRow (carGridList) guiGridListSetItemText (carGridList, row, 1, tostring(v[3]), false, true) guiGridListSetItemText (carGridList, row, 2, tostring(v[2]), false, true) guiGridListSetItemText (carGridList, row, 3, tostring(v[1]), false, true) end guiSetAlpha(carGridList,1) buyButton = guiCreateButton(0.0476,0.8624,0.7778,0.0963,"Buy it!",true,carshopWindow) guiSetAlpha(buyButton,1) closeButton = guiCreateButton(0.8571,0.8624,0.0899,0.1009,"x",true,carshopWindow) addEvent ("viewGUI", true) function viewGUI () if (getLocalPlayer() == source) then guiSetVisible (carshopWindow, true) showCursor (true) end end addEventHandler ("viewGUI", getRootElement(), viewGUI) function onClientGUIClick (button, state, absoluteX, absoluteYe) if (source == buyButton) then guiSetVisible (carshopWindow, false) showCursor (false) if (guiGridListGetSelectedItem (carGridList)) then local carName = guiGridListGetItemText ( carGridList, guiGridListGetSelectedItem ( carGridList ), 1 ) local carCost = guiGridListGetItemText ( carGridList, guiGridListGetSelectedItem ( carGridList ), 2 ) local ID = guiGridListGetItemText ( carGridList, guiGridListGetSelectedItem ( carGridList ), 3 ) triggerServerEvent ("carShopCarBuy", getLocalPlayer(),ID , carCost , carName ) end elseif (source == closeButton) then guiSetVisible (carshopWindow, false) showCursor (false) end end addEventHandler ("onClientGUIClick", getRootElement(), onClientGUIClick) سيرفر carShopMarker = createMarker (2133.59,-1149.29, 23.3, "cylinder", 3, 255, 0, 0, 127) carShopMarker2 = createMarker (562, -1270, 16, "cylinder", 2, 255, 0, 0, 127) carShopMarker3 = createMarker (-1954,299,34,"cylinder",2,255,0,0,127) carShopMarker4 = createMarker (-1663,1208,6,"cylinder",2,255,0,0,127) carShopMarker5 = createMarker (1946,2068,10,"cylinder",2,255,0,0,127) createBlipAttachedTo(carShopMarker,55,2,0,255,0,0,0,200) createBlipAttachedTo(carShopMarker2,55,2,0,255,0,0,0,200) createBlipAttachedTo(carShopMarker3,55,2,0,255,0,0,0,200) createBlipAttachedTo(carShopMarker4,55,2,0,255,0,0,0,200) createBlipAttachedTo(carShopMarker5,55,2,0,255,0,0,0,200) addEvent ("viewGUI", true) function markerHit (hitPlayer, matchingDimension) if (source == carShopMarker) or (source == carShopMarker2) or (source == carShopMarker3) or (source == carShopMarker4) or (source == carShopMarker5) then triggerClientEvent ("viewGUI", hitPlayer) end end addEventHandler ("onMarkerHit", getRootElement(), markerHit) addEvent ("carShopCarBuy", true) addEventHandler ("carShopCarBuy", getRootElement(), function(id, cost, name) if (getPlayerMoney (source) >= tonumber(cost)) then outputChatBox ("Bought a " .. name, source, 255, 0, 0, false) outputChatBox ("ID: " .. id, source, 255, 0, 0, false) outputChatBox ("Cost: " .. cost, source, 255, 0, 0, false) takePlayerMoney (source, tonumber (cost)) setAccountData (getPlayerAccount (source), "funmodev2-car", tonumber(id)) setAccountData (getPlayerAccount (source), "funmodev2-paintjob", 3) setAccountData (getPlayerAccount (source), "funmodev2-carupg", 0) else outputChatBox ("You are too poor!", source, 255, 0, 0, false) end end) addEvent ("carSpawn", true) addEvent ("carDestroy", true) function carSpawn () if not (isGuestAccount (getPlayerAccount (source))) and not (isPedInVehicle(source)) then if (getElementData (source, "hisCar")) and (getElementData (source, "hisCar") ~= nil) and (getElementType(getElementData (source, "hisCar")) == "vehicle") then setElementVelocity (getElementData (source, "hisCar"), 0,0,0) local x,y,z = getElementPosition (source) setVehicleRotation (getElementData (source, "hisCar"), 0, 0, 0) setElementPosition (getElementData (source, "hisCar"), x+2,y,z +1) outputChatBox ("Car spawned.", source, 255, 0, 0) elseif not (getElementData (source, "hisCar")) then local accountData = getAccountData (getPlayerAccount (source), "funmodev2-car") if (accountData) then carID = getAccountData (getPlayerAccount (source), "funmodev2-car") x,y,z = getElementPosition (source) vehicle = createVehicle (carID, x +2, y, z +1) setElementID (vehicle, getAccountName (getPlayerAccount(source))) setElementData (source, "hisCar", vehicle) outputChatBox ("Car spawned.", source, 255, 0, 0) if (getAccountData (getPlayerAccount(source), "funmodev2-carupg")) then local upgrades = nil local upgrades = {} local upgrades = getAccountData (getPlayerAccount(source), "funmodev2-carupg") for i,v in ipairs (upgrades) do addVehicleUpgrade (vehicle, v) end end if (getAccountData (getPlayerAccount(source), "funmodev2-paintjob")) then local paintjob = getAccountData (getPlayerAccount(source), "funmodev2-paintjob") setVehiclePaintjob (vehicle, paintjob) end if (getAccountData (getPlayerAccount(source), "funmodev2-carcolor1")) and (getAccountData (getPlayerAccount(source), "funmodev2-carcolor2")) then local c1 = getAccountData (getPlayerAccount(source), "funmodev2-carcolor1") local c2 = getAccountData (getPlayerAccount(source), "funmodev2-carcolor2") setVehicleColor (vehicle, c1,c2,0,0) end else outputChatBox ("You haven't got a car.", source, 255, 0, 0) end else outputChatBox ("You're already in a car!", source, 255, 0, 0) end end end addEventHandler ("carSpawn", getRootElement(), carSpawn) function carDestroy () if not (isGuestAccount (getPlayerAccount (source))) then if (isPedInVehicle (source)) then if (getElementID(getPedOccupiedVehicle(source)) == getAccountName (getPlayerAccount(source))) then setElementHealth (getElementData (source, "hisCar"), 0) destroyElement (getPedOccupiedVehicle (source)) removeElementData (source, "hisCar") outputChatBox ("Car Destroyed.", source, 255, 0, 0) else outputChatBox ("This not your car!", source, 255, 0, 0) end elseif (not (isPedInVehicle (source))) and (getElementData (source, "hisCar")) and (getElementData (source, "hisCar") ~= nil) then car=getElementData(source, "hisCar") destroyElement(car) outputChatBox ("Car Destroyed.", source, 255, 0, 0) removeElementData (source, "hisCar") end end end addEventHandler ("carDestroy", getRootElement(), carDestroy) function engineSwitch () if (isPedInVehicle (source)) then local veh = getPedOccupiedVehicle (source) if (getVehicleEngineState (veh) == true) then setVehicleEngineState (veh, false) outputChatBox ("Vehicle shutted down.", source, 255, 0, 0) elseif (getVehicleEngineState (veh) == false) then setVehicleEngineState (veh, true) outputChatBox ("Vehicle started.", source, 255, 0, 0) end else outputChatBox ("You aren't in a vehicle!", source, 255, 0, 0) end end addEvent("engenieSwitch",true) addEventHandler("engenieSwitch",getRootElement(),engineSwitch) function lightsSwitch () if (isPedInVehicle (source)) then local veh = getPedOccupiedVehicle (source) if (getVehicleOverrideLights(veh) ~= 2) then setVehicleOverrideLights(veh, 2) outputChatBox ("Vehicle lights turned on.", source, 255, 0, 0) elseif (getVehicleOverrideLights(veh) ~= 1) then setVehicleOverrideLights(veh, 1) outputChatBox ("Vehicle lights turned off.", source, 255, 0, 0) end else outputChatBox ("You aren't in a vehicle!", source, 255, 0, 0) end end addEvent("lightsSwitch",true) addEventHandler("lightsSwitch",getRootElement(),lightsSwitch) function lockSwitch () if (isPedInVehicle (source)) then local veh = getPedOccupiedVehicle (source) if not (isVehicleLocked (veh)) then setVehicleLocked (veh, true) setVehicleDoorsUndamageable (veh, true) setVehicleDoorState (veh, 0, 0) setVehicleDoorState (veh, 1, 0) setVehicleDoorState (veh, 2, 0) setVehicleDoorState (veh, 3, 0) outputChatBox ("Vehicle locked.", source, 255, 0, 0) elseif (isVehicleLocked (veh)) then setVehicleLocked (veh, false) setVehicleDoorsUndamageable (veh, false) outputChatBox ("Vehicle unlocked.", source, 255, 0, 0) end else outputChatBox ("You aren't in a vehicle!", source, 255, 0, 0) end end addEvent("lockSwitch",true) addEventHandler("lockSwitch",getRootElement(),lockSwitch ) addEventHandler ("onVehicleStartEnter", getRootElement(), function(player, seat, jacked, door) if (isVehicleLocked (source) == true) then local mannetjeNaam = getAccountName (getPlayerAccount (player)) local autoNaam = getElementID (source) if (mannetjeNaam == autoNaam) then setVehicleLocked (source, false) outputChatBox ("Vehicle unlocked!", player, 255, 0, 0, false) end end end) addEventHandler ("onVehicleExplode", getRootElement(), function() local theOwner = getAccountName (getPlayerAccount(getPlayerFromName (getElementID (source)))) if (theOwner) then removeElementData (theOwner, "hisCar") end end) addEventHandler ("onPlayerQuit", getRootElement(), function(quitType, reason, responsibleElement) if (getElementData (source, "hisCar")) then blowVehicle (getElementData (source, "hisCar")) removeElementData (source, "hisCar") end end) addEventHandler( "onResourceStop", getResourceRootElement( getThisResource() ), function () for i,v in ipairs (getElementsByType ("player")) do if (getElementData (v, "hisCar")) then setElementHealth (getElementData (v, "hisCar"), 0) removeElementData (v, "hisCar") end end end ) function destroyOnExplode () setTimer (destroyElement, 2500, 1, source) end addEventHandler ("onVehicleExplode", getRootElement(), destroyOnExplode) جرب وردلي خبر
  16. عليكم السلام سطر 26 بدله بذا triggerClientEvent ( player,"getwind",player )
  17. ^ حط هذا الكود من فوق بملف الكلينت local sm = {} sm.moov = 0 sm.object1,sm.object2 = nil,nil local function removeCamHandler() if(sm.moov == 1)then sm.moov = 0 end end local function camRender() if (sm.moov == 1) then local x1,y1,z1 = getElementPosition(sm.object1) local x2,y2,z2 = getElementPosition(sm.object2) setCameraMatrix(x1,y1,z1,x2,y2,z2) end end addEventHandler("onClientPreRender",root,camRender) function smoothMoveCamera(x1,y1,z1,x1t,y1t,z1t,x2,y2,z2,x2t,y2t,z2t,time) if(sm.moov == 1)then return false end sm.object1 = createObject(1337,x1,y1,z1) sm.object2 = createObject(1337,x1t,y1t,z1t) setElementAlpha(sm.object1,0) setElementAlpha(sm.object2,0) setObjectScale(sm.object1,0.01) setObjectScale(sm.object2,0.01) moveObject(sm.object1,time,x2,y2,z2,0,0,0,"InOutQuad") moveObject(sm.object2,time,x2t,y2t,z2t,0,0,0,"InOutQuad") sm.moov = 1 setTimer(removeCamHandler,time,1) setTimer(destroyElement,time,1,sm.object1) setTimer(destroyElement,time,1,sm.object2) return true end سوي ريستارت للسكربت حقك وجرب ’ لو ماشتغل افتح الديبوق واطرح لنا المشاكل
  18. https://wiki.multitheftauto.com/wiki/SmoothMoveCamera طب الحين الكاميرا اتحركت لو ابيها ترجع للمكان الي تحركت منه ثم ترجع تاني للمكان الي اتحركت له وهيك استخدمه مع التايمر setTimer
  19. https://wiki.multitheftauto.com/wiki/SmoothMoveCamera
  20. https://forum.multitheftauto.com/viewtopic.php?f=160&t=59241
  21. ليش لازم اسوي ترايقر ؟؟ ؟؟ لان فنكشن playSound كلينت فقط
  22. onClientGUIClick -- Event triggerServerEvent addEvent addEventHandler getElementsByType -- for triggerClientEvent -- ^ addEvent addEventHandler isElement destroyElement playSound
×
×
  • Create New...