Jump to content

^#Dream

Members
  • Posts

    236
  • Joined

  • Last visited

Everything posted by ^#Dream

  1. ^ ماصار شي يطلع نفس الخطاء بالديبق + الاكسبورت سويته كذا addEvent('hedit',true) addEventHandler('hedit',root, function(data) if ( isPedInVehicle(source) ) then Vehicle = getPedOccupiedVehicle(source) exports.hedit:importHandling(getPedOccupiedVehicle(localPlayer), allhedit, "SA") outputChatBox('* Done !',source,0,255,0,false) else outputChatBox('* Dont Have Vehicle',source,255,0,0,false) end end )
  2. جربت اكسبورت نفس المششكله
  3. عندي مشكلة بالسكربت ذا لاجيت سويت استخدام للوزنية يجني بالديبق hedit\Server.lua:6: attempt to call global 'importHandling' (a nil value) سيرفر addEvent('hedit',true) addEventHandler('hedit',root, function(data) if ( isPedInVehicle(source) ) then Vehicle = getPedOccupiedVehicle(source) importHandling(veh,data,'SA') outputChatBox('* Done !',source,0,255,0,false) else outputChatBox('* Dont Have Vehicle',source,255,0,0,false) end end )
  4. طيب التوب درفت مايشتغل يعني لو اهجول والدرفت يصير مثلا 10 الاف مايجي بالقريد لست
  5. ^ زبط بس المشكلة انه يسوي 3 تابات فاضية ماعليها اسم ويحط عليها القريد لست مايحطها بالتابات الي انا مسميها Money , PlayTime , Level
  6. اوكك -- 6ArH Servers --> "TopOnline" author="3NAD and M7mdAl7arthy" type="script" version="1.0" description="NONE." />
  7. مهي مزروفهه عاشق الشرق منزل السكربت بالكمونتي بعدين هو كان حاطها صور تضغط على الصوره يفتح لك القريد لست انا بدلتها حطيتها تاب
  8. السلام عليكم انا عدلت على سكربت عاشق الشرق حق توب 30 خليتها بدال صور بـتاب بانل بس المشكلة القريد لست ماتطلع function guiCreateWindow(x2, y2, width2, height2, titleBarText2, relative2) local mainBackground = guiCreateStaticImage ( x2, y2, width2, height2, "Images/img.png", relative2 ) local mainBackgroundLabel = guiCreateLabel ( 0, 0, 0, 0, " "..titleBarText2, false, mainBackground ) guiSetEnabled ( mainBackgroundLabel, false ) return mainBackground end function centerWindow(center_window) local screenW,screenH=guiGetScreenSize() local windowW,windowH=guiGetSize(center_window,false) local x,y = (screenW-windowW)/2,(screenH-windowH)/2 guiSetPosition(center_window,x,y,false) end _getPlayerName = getPlayerName function getPlayerName(player) return string.gsub(_getPlayerName(player), "#%x%x%x%x%x%x", "" ) end TopWindow = guiCreateWindow(188, 109, 476, 390, ":: [H.H] - Top Players ::", false) guiSetVisible(TopWindow, false) guiSetAlpha(TopWindow, 1.00) TabPanel = guiCreateTabPanel(9, 24, 457, 356, false, TopWindow) TopDrift = guiCreateTab("Level", TabPanel) TopTime = guiCreateTab("PlayTime", TabPanel) TopMoney = guiCreateTab("Money", TabPanel) guiSetAlpha ( TopDrift, 1.00 ) guiSetAlpha ( TopTime, 1.00 ) guiSetAlpha ( TopMoney, 1.00 ) centerWindow(TopWindow) font = guiCreateFont ( 'Fonts/Font.TTF', 10 ) DriftList = guiCreateGridList(5, 2, 446, 324, false, TopWindow) guiGridListSetSortingEnabled( DriftList, false ) RankColumn = guiGridListAddColumn(DriftList, "Rank", 0.1) NameColumn = guiGridListAddColumn(DriftList, "Player Name", 0.5) TotalColumn = guiGridListAddColumn(DriftList, "[H.H] Level", 0.3) guiSetProperty( DriftList, 'Disabled', 'True' ) guiSetAlpha( DriftList, 1 ) guiSetFont( DriftList, font ) guiSetVisible(DriftList, false) TimeList = guiCreateGridList(5, 3, 447, 323, false, TopWindow) guiGridListSetSortingEnabled( TimeList, false ) guiGridListAddColumn(TimeList, "Rank", 0.1) guiGridListAddColumn(TimeList, "Player Name", 0.5) guiGridListAddColumn(TimeList, "[H.H] Total Play Time", 0.3) guiSetProperty( TimeList, 'Disabled', 'True' ) guiSetAlpha( TimeList, 1 ) guiSetFont( TimeList, font ) guiSetVisible(TimeList, false) MoneyList = guiCreateGridList(4, 3, 449, 323, false, TopWindow) guiGridListSetSortingEnabled( MoneyList, false ) guiGridListAddColumn(MoneyList, "Rank", 0.1) guiGridListAddColumn(MoneyList, "Player Name", 0.5) guiGridListAddColumn(MoneyList, "[H.H] Total Money", 0.3) guiSetProperty( MoneyList, 'Disabled', 'True' ) guiSetAlpha( MoneyList, 1 ) guiSetFont( MoneyList, font ) guiSetVisible(MoneyList, false) addEventHandler ( "onClientMouseEnter", root, function ( ) if source == TopDrift then guiSetAlpha ( TopDrift, 1 ) playSoundFrontEnd ( 3 ) elseif source == TopTime then guiSetAlpha ( TopTime, 1 ) playSoundFrontEnd ( 3 ) elseif source == TopMoney then guiSetAlpha ( TopMoney, 1 ) playSoundFrontEnd ( 3 ) end end ) addEventHandler ( "onClientMouseLeave", root, function ( ) if source == TopDrift then if guiGetVisible ( DriftList ) == false then guiSetAlpha ( TopDrift, 0.3 ) end elseif source == TopTime then if guiGetVisible ( TimeList ) == false then guiSetAlpha ( TopTime, 0.3 ) end elseif source == TopMoney then if guiGetVisible ( MoneyList ) == false then guiSetAlpha ( TopMoney, 0.3 ) end end end ) addEventHandler ( "onClientGUIClick", root, function ( ) if source == TopDrift then guiSetAlpha ( TopDrift, 1 ) guiSetAlpha ( TopTime, 0.3 ) guiSetAlpha ( TopMoney, 0.3 ) playSoundFrontEnd ( 13 ) if guiGetVisible ( DriftList ) == false then guiSetVisible ( DriftList, true ) end if guiGetVisible ( TimeList ) then guiSetVisible ( TimeList, false ) end if guiGetVisible ( MoneyList ) then guiSetVisible ( MoneyList, false ) end elseif source == TopScore then guiSetAlpha ( TopDrift, 0.3 ) guiSetAlpha ( TopTime, 0.3 ) guiSetAlpha ( TopMoney, 0.3 ) playSoundFrontEnd ( 13 ) if guiGetVisible ( DriftList ) then guiSetVisible ( DriftList, false ) end if guiGetVisible ( TimeList ) then guiSetVisible ( TimeList, false ) end if guiGetVisible ( MoneyList ) then guiSetVisible ( MoneyList, false ) end elseif source == TopTime then guiSetAlpha ( TopDrift, 0.3 ) guiSetAlpha ( TopScore, 0.3 ) guiSetAlpha ( TopTime, 1 ) guiSetAlpha ( TopMoney, 0.3 ) playSoundFrontEnd ( 13 ) if guiGetVisible ( TimeList ) == false then guiSetVisible ( TimeList, true ) end if guiGetVisible ( DriftList ) then guiSetVisible ( DriftList, false ) end if guiGetVisible ( ScoreList ) then guiSetVisible ( ScoreList, false ) end if guiGetVisible ( MoneyList ) then guiSetVisible ( MoneyList, false ) end elseif source == TopMoney then guiSetAlpha ( TopDrift, 0.3 ) guiSetAlpha ( TopScore, 0.3 ) guiSetAlpha ( TopTime, 0.3 ) guiSetAlpha ( TopMoney, 1 ) playSoundFrontEnd ( 13 ) if guiGetVisible ( MoneyList ) == false then guiSetVisible ( MoneyList, true ) end if guiGetVisible ( DriftList ) then guiSetVisible ( DriftList, false ) end if guiGetVisible ( ScoreList ) then guiSetVisible ( ScoreList, false ) end if guiGetVisible ( TimeList ) then guiSetVisible ( TimeList, false ) end end end ) function convertNumber ( number ) local formatted = number while true do formatted, k = string.gsub(formatted, "^(-?%d+)(%d%d%d)", '%1,%2') if ( k==0 ) then break end end return formatted end function getPlayersSortByDrif( ) local Top = { } for _, aPlayer in next, getElementsByType 'player' do table.insert ( Top, { player = aPlayer, aDrif = getElementData ( aPlayer, 'Level' ) or 0 } ) end table.sort( Top, function( a, b ) return( tonumber( a.aDrif ) or 0 ) > ( tonumber( b.aDrif ) or 0 ) end ) return Top end function getPlayersSortByaScore( ) local TopScore = { } for _, aPlayer in next, getElementsByType 'player' do table.insert ( TopScore, { player = aPlayer, aScore = getElementData ( aPlayer, 'kills' ) or 0 } ) end table.sort( TopScore, function( a, b ) return( tonumber( a.aScore ) or 0 ) > ( tonumber( b.aScore ) or 0 ) end ) return TopScore end function getPlayersSortByaTime( ) local TopTimer = { } for _, aPlayer in next, getElementsByType 'player' do Time = getElementData ( aPlayer, 'Time' ) or "0:0:0" local h, m, s = unpack ( split ( Time, ":" ) ) table.insert ( TopTimer, { player = aPlayer, Time = Time, SortTime = ( tonumber ( h ) * 3600000 + tonumber ( m ) * 60000 + tonumber ( s ) * 1000 ) } ) end table.sort ( TopTimer, function ( a, b ) return ( tonumber ( a.SortTime ) or 0 ) > ( tonumber ( b.SortTime ) or 0 ) end ) return TopTimer end function getPlayersSortByaMoney( ) local TopMoney = { } for _, aPlayer in next, getElementsByType 'player' do table.insert ( TopMoney, { player = aPlayer, aMoney = getElementData( aPlayer, 'xTopsMoeny' ) or 0 } )
  9. Hello i don't know if this is the right fourm but i want to add a button next to the bookmarks called Arabic when i click it The GUI Turn Every thing to arabic and when i click it again it turns every thing to english + i want to add a Checkbox to the create vehicle window that When i spawn a car it warp's me into the vehicle
  10. ^ ذا محمله من قبل مايحفظ ذا بعد
  11. ياليت الي يعرف لـ executeSQLQuery يعدله لي انا حاولت مازبط
  12. فهاوهه شفت الششرح مافهمت شي منهه + تزوير كل الي احملها مششفرهه مالقيت الا ذا مو مشفر
  13. ياليت احد يساعدني executeSQLQuery ماعرفت لها
  14. سويت كذا مدري هو صح ولا لا local root = getRootElement() local thisResourceRoot = getResourceRootElement(getThisResource()) local drift_records = {} local drift_mejor = 0 local drift_nombre = "N/A" addEventHandler ( "onResourceStart", thisResourceRoot, function() call(getResourceFromName("scoreboard"), "addScoreboardColumn", "Best Drift") call(getResourceFromName("scoreboard"), "addScoreboardColumn", "Last Drift") call(getResourceFromName("scoreboard"), "addScoreboardColumn", "Total Drift") executeSQLQuery("CREATE TABLE IF NOT EXISTS("recordsDrift","pista TEXT, nombre TEXT, score INTEGER") addEvent("driftClienteListo", true) addEventHandler("driftClienteListo", root, function(player) triggerClientEvent(player, "driftActualizarRecord", root, drift_mejor, drift_nombre) if drift_mejor == 0 then outputChatBox("There's no record set on this map", player) else outputChatBox(string.format("The current record is %d points (%s)", drift_mejor, drift_nombre), player) end end) end ) addEventHandler ( "onResourceStop", thisResourceRoot, function() call(getResourceFromName("scoreboard"), "removeScoreboardColumn", "Best Drift") call(getResourceFromName("scoreboard"), "removeScoreboardColumn", "Last Drift") call(getResourceFromName("scoreboard"), "removeScoreboardColumn", "Total Drift") end ) addEventHandler ( "onGamemodeMapStart", root, function(mapResource) local mapname = getResourceInfo(mapResource, "name") or getResourceName(mapResource) local command = string.format("pista='%s'",mapname) local record = executeSQLQuery("SELECT * FROM "recordsDrift","nombre, score",command) if #record == 0 then executeSQLQuery("INSERT INTO "recordsDrift",string.format("'%s', 'N/A', 0",mapname)) drift_mejor = 0 drift_nombre = "N/A" else drift_mejor = record[1]["score"] drift_nombre = record[1]["nombre"] end triggerClientEvent(root, "driftActualizarRecord", root, drift_mejor, drift_nombre) triggerClientEvent(root, "driftResetAllScores", root) if drift_mejor == 0 then outputChatBox("There's no record set on this map") else outputChatBox(string.format("The current record is %d points (%s)", drift_mejor, drift_nombre)) end end) addEventHandler ( "onGamemodeMapStop", root, function(mapResource) local mapname = getResourceInfo(mapResource, "name") or getResourceName(mapResource) if not mapname then return end local command = string.format("pista='%s'",mapname) executeSQLQuery("UPDATE "recordsDrift",string.format("nombre = '%s', score = %d", drift_nombre, drift_mejor), command) addEventHandler("onVehicleDamage", root, function() thePlayer = getVehicleOccupant(source, 0) if thePlayer then triggerClientEvent(thePlayer, "driftCarCrashed", root, source) end end) addEvent("driftNuevoRecord", true) addEventHandler("driftNuevoRecord", root, function(score, name) if score > drift_mejor then outputChatBox(string.format("New drift record! (%d points) (%s)",score,name)) drift_mejor = score drift_nombre = name triggerClientEvent(root, "driftActualizarRecord", root, drift_mejor, drift_nombre) end end)
  15. السكربت شغال بس لو هجولت ووصلت مثلا الدرفت 500 مايجي تحت عند Best Drift
  16. ياليت تساعدوني
  17. بدلت executeSQLCreateTable بـ executeSQLQuery مانفع
  18. السلام عليكم انا عندي سكربت King Drift بس المشكلة انهه مايحفظ الدرفت يعني مايجي الدرفت تحت عند Best Drift كلنت --these are the banned vehicle ids where you cannot get drift points. local BannedIDs = { 432, 532 } local rootElem = getRootElement() local thisRoot = getResourceRootElement(getThisResource()) local player = getLocalPlayer() local vehicle local size = 1.2 local modo = 0.01 local score = 0 local screenScore = 0 local tick local idleTime local multTime local driftTime local Yellow = tocolor(31,69,252) local Red = tocolor(234,0,3) local TempCol = Yellow local mult = 1 local tablamult = {350,1400,4200,11200} local anterior = 0 local mejor = 0 local total = 0 local global_mejor = 0 local global_nombre = "N/A" local screenWidth, screenHeight = guiGetScreenSize() local x1,y1,x2,y2 = screenWidth*0.2,screenHeight*0.1,screenWidth*0.8,screenHeight*0.8 addEventHandler("onClientResourceStart", thisRoot, function() outputChatBox("* Best Drift Script Started" , 31,69,252, root, true) addEventHandler("onClientRender", rootElem, showText) triggerServerEvent("driftClienteListo", rootElem, player) end ) addEventHandler("onClientResourceStop", thisRoot, function() removeEventHandler("onClientRender", rootElem, showText) end ) function isValidVehicle() local temp = getPedOccupiedVehicle(player) if not temp or getVehicleOccupant(temp,0) ~= player or getVehicleType(temp) ~= "Automobile" then return false end local vehID = getElementModel(temp) for k,v in ipairs(BannedIDs) do if vehID == v then return false end end return temp end function showText() dxDrawText(string.format("[ H.H ] Best Drift : %s - %d",global_nombre,global_mejor),0, 571, 328, 600,Yellow,2.00,"default-bold") vehicle = isValidVehicle() if not vehicle then return end if size > 1.3 then modo = -0.01 elseif size < 1.2 then modo = 0.01 end size = size + modo tick = getTickCount() local angulo,velocidad = angle() local tempBool = tick - (idleTime or 0) < 750 if not tempBool and score ~= 0 then anterior = score setElementData(player, "Last Drift", anterior) total = total+anterior setElementData(player, "Total Drift", total) if score > mejor then mejor = score setElementData(player, "Best Drift", mejor) end triggerEvent("onVehicleDriftEnd", rootElem, tick-driftTime-750) score = 0 end if angulo ~= 0 then if score == 0 then triggerEvent("onVehicleDriftStart", rootElem) driftTime = tick end if tempBool then score = score + math.floor(angulo*velocidad)*mult else score = math.floor(angulo*velocidad)*mult end if TempCol == Red then TempCol = Yellow end screenScore = score idleTime = tick end if tick - (idleTime or 0) < 3000 then local temp = "الدرفت" if score >= 100000 then temp = "الدرفت\n\n " elseif score >= 50000 then temp = "الدرفت\n\n " elseif score >= 20000 then temp = "الدرفت\n\n " elseif score >= 15000 then temp = "الدرفت\n\n " elseif score >= 7000 then temp = "الدرفت\n\n " elseif score >= 3000 then temp = "الدرفت\n\n " elseif score >= 1000 then temp = "الدرفت\n\n كفوؤوؤ وآصل" end dxDrawText(temp, x1,y1,x2,y2, TempCol, 2.00, "default-bold","center","top", false,true,false) dxDrawText(string.format("\n%d",screenScore), x1,y1-15,x2,y2, TempCol, size, "pricedown","center","top", false,true,false) end end function angle() local vx,vy,vz = getElementVelocity(vehicle) local modV = math.sqrt(vx*vx + vy*vy) if not isVehicleOnGround(vehicle) then return 0,modV end local rx,ry,rz = getElementRotation(vehicle) local sn,cs = -math.sin(math.rad(rz)), math.cos(math.rad(rz)) local deltaT = tick - (multTime or 0) if mult~= 1 and modV <= 0.3 and deltaT > 750 then mult = mult-1 multTime = tick elseif deltaT > 1500 then local temp = 1 if score >= 11200 then temp = 5 elseif score >= 4200 then temp = 4 elseif score >= 1400 then temp = 3 elseif score >= 350 then temp = 2 end if temp>mult then mult = temp multTime = tick end end if modV <= 0.2 then return 0,modV end --speed over 40 km/h local cosX = (sn*vx + cs*vy)/modV if cosX > 0.966 or cosX < 0 then return 0,modV end --angle between 15 and 90 degrees return math.deg(math.acos(cosX))*0.5, modV end addEvent("driftCarCrashed", true) addEventHandler("driftCarCrashed", rootElem, function() if score ~= 0 then score = 0 mult = 1 TempCol = Red triggerEvent("onVehicleDriftEnd", rootElem, 0) end end ) addEvent("driftActualizarRecord", true) addEventHandler("driftActualizarRecord", rootElem, function(score, name) global_mejor = score global_nombre = name end ) function resetScore() anterior,mejor,total = 0,0,0 setElementData(player, "Last Drift", anterior) setElementData(player, "Total Drift", total) setElementData(player, "Best Drift", mejor) end addEvent("driftResetAllScores", true) addEventHandler("driftResetAllScores", rootElem, resetScore) addCommandHandler("resetdrift", resetScore) function checkPuntaje() if total > global_mejor then triggerServerEvent("driftNuevoRecord", rootElem, total, getPlayerName(player)) end end addEventHandler("onClientPlayerFinish", rootElem, checkPuntaje) addEventHandler("onClientPlayerOutOfTime", rootElem, checkPuntaje) سيرفر : local root = getRootElement() local thisResourceRoot = getResourceRootElement(getThisResource()) local drift_records = {} local drift_mejor = 0 local drift_nombre = "N/A" addEventHandler ( "onResourceStart", thisResourceRoot, function() call(getResourceFromName("scoreboard"), "addScoreboardColumn", "Best Drift") call(getResourceFromName("scoreboard"), "addScoreboardColumn", "Last Drift") call(getResourceFromName("scoreboard"), "addScoreboardColumn", "Total Drift") executeSQLCreateTable("recordsDrift","pista TEXT, nombre TEXT, score INTEGER") addEvent("driftClienteListo", true) addEventHandler("driftClienteListo", root, function(player) triggerClientEvent(player, "driftActualizarRecord", root, drift_mejor, drift_nombre) if drift_mejor == 0 then outputChatBox("There's no record set on this map", player) else outputChatBox(string.format("The current record is %d points (%s)", drift_mejor, drift_nombre), player) end end) end ) addEventHandler ( "onResourceStop", thisResourceRoot, function() call(getResourceFromName("scoreboard"), "removeScoreboardColumn", "Best Drift") call(getResourceFromName("scoreboard"), "removeScoreboardColumn", "Last Drift") call(getResourceFromName("scoreboard"), "removeScoreboardColumn", "Total Drift") end ) addEventHandler ( "onGamemodeMapStart", root, function(mapResource) local mapname = getResourceInfo(mapResource, "name") or getResourceName(mapResource) local command = string.format("pista='%s'",mapname) local record = executeSQLSelect("recordsDrift","nombre, score",command) if #record == 0 then executeSQLInsert("recordsDrift",string.format("'%s', 'N/A', 0",mapname)) drift_mejor = 0 drift_nombre = "N/A" else drift_mejor = record[1]["score"] drift_nombre = record[1]["nombre"] end triggerClientEvent(root, "driftActualizarRecord", root, drift_mejor, drift_nombre) triggerClientEvent(root, "driftResetAllScores", root) if drift_mejor == 0 then outputChatBox("There's no record set on this map") else outputChatBox(string.format("The current record is %d points (%s)", drift_mejor, drift_nombre)) end end) addEventHandler ( "onGamemodeMapStop", root, function(mapResource) local mapname = getResourceInfo(mapResource, "name") or getResourceName(mapResource) if not mapname then return end local command = string.format("pista='%s'",mapname) executeSQLUpdate("recordsDrift",string.format("nombre = '%s', score = %d", drift_nombre, drift_mejor), command) end) addEventHandler("onVehicleDamage", root, function() thePlayer = getVehicleOccupant(source, 0) if thePlayer then triggerClientEvent(thePlayer, "driftCarCrashed", root, source) end end) addEvent("driftNuevoRecord", true) addEventHandler("driftNuevoRecord", root, function(score, name) if score > drift_mejor then outputChatBox(string.format("New drift record! (%d points) (%s)",score,name)) drift_mejor = score drift_nombre = name triggerClientEvent(root, "driftActualizarRecord", root, drift_mejor, drift_nombre) end end) الديبق مايطلع شي #
  19. اوك الرجاء اغلاق الموضوع
  20. السلام عليكم انا عندي سكربت يرسل رسالة للايميل بس المشكلة ان فيه 3 edit box الموضوع الرسالة الايميل المرسل اليه اقدر ازيد عليها واخليها الاسم الموضوع الرسالة والايميل المرسل اليه ؟
  21. عدلتهه شكرا لكم
  22. الاولى هي صورة الزر العاديهه والثانية اذا مررت الماوس للزر يتغير صورة الزر وتصير button2
×
×
  • Create New...