Jump to content

ABoHussin

Members
  • Posts

    59
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

ABoHussin's Achievements

Snitch

Snitch (10/54)

4

Reputation

  1. Man, this code is full of problems ty .. What I do not understand is how to increase 1 on his DDscore
  2. اخي .. تستخدم اذا حصل عكس الشرط مثلا تتاكد من واحد هل عنده سكاير لولا ( if ) اذا تحقق الشرط وطلع عنده سكاير ف تجلده واذا ماعنده (else) ماتسوي له شيئ
  3. i mean whenever player wins the derby give him +1 point on his (DDscore ) I explain to you more :- when the first join player DDscore = 0 and if he wins in derby then +1 on his DDscore in sql to be ( 1 ) and if he wins again then +1 on his score to be ( 2 ) I hope you understand ..
  4. HI All i have made a code for save players dd score in sqllite the code :- DerbyDB = dbConnect("sqlite", "DD.db") dbExec(DerbyDB, "CREATE TABLE IF NOT EXISTS DerbyMission (DDname, DDserial, DDscore INT , DDban )") local check = dbQuery( DerbyDB, ' SELECT * FROM `DerbyMission` WHERE DDname = ? AND DDserial = ? ', getPlayerName( element ) , getPlayerSerial( element ) ) local results = dbPoll( check, -1 ) if ( type( results ) == 'table' and #results == 0 or not results ) then exports ["guimessages"] : outputServer (element, "* [ Derby ]: This is the first join" , 204, 51, 255) dbExec( DerbyDB, "INSERT INTO DerbyMission VALUES (?,?,?,?)", getPlayerName(element) , getPlayerSerial(element), 0 , 0 ) Everything is good so far . but i want code to select DDscore by get player sieral . and when the player does something I want Increase 1 on his DDscore any help ? Increase 1 Increase 1 He does something I want He does something I want an
  5. نعم اخوي . من الافضل اسويه بالسيريال حتى اذا غير اسمه ماتروح نقاطه .. الاكواد كلها اذا طرحتها مامنها فايدة .. بس انا طرحت الاجزاء الي تحتوي على القواعد على كل حال هذا الكود الاول :- وهذا الكود وقت يفوزلاعب function checkEnd() c = 0 for i,p in pairs(getElementsByType("player"))do if checkExistPlrOnDuel(p) then c = c+1 winner = p end end if tonumber(c) == 1 then givePlayerMoney(winner,tonumber(getElementData(resourceRoot,"winMoney"))) n = string.gsub(getPlayerName(winner), "#%x%x%x%x%x%x", "") local check = dbQuery( DerbyDB, ' SELECT DDscore FROM `DerbyMission` WHERE DDname = ?',getPlayerName(winner)) local results = dbPoll( check, -1 ) dbExec(DerbyDB, "UPDATE `DerbyMission` SET `DDscore`=? WHERE `DDname`=?",#results+2 , getPlayerName(winner) ) outputChatBox("* #ff0000≈[ #ff0000 " .. n .. " #FF9700 Won the Derby and hist total Score is "..#results+2,getRootElement(),255,255,0,true) setElementData(resourceRoot,"map","no") endDerby() _mytimer = setTimer(newDuel,60*1000*5,1) end end
  6. ----edit By:HITMAN ----16-8-2017 addEventHandler("onClientResourceStart", resourceRoot, function() win_vip = guiCreateWindow(274, 107, 670, 463, "Vip", false) guiWindowSetSizable(win_vip, false) guiSetVisible (win_vip , false) guiSetProperty(win_vip, "CaptionColour", "FFB525D9") btn_he = guiCreateButton(0.27, 0.20, 0.33, 0.25, "Health", true, win_vip) guiSetFont(btn_he, "sa-gothic") btn_mk4 = guiCreateButton(237, 248, 113, 79, "M4", false, win_vip) guiSetFont(btn_mk4, "sa-header") btn_de = guiCreateButton(198, 372, 212, 38, "الدرع", false, win_vip) btn_close = guiCreateButton(512, 30, 126, 35, "Close", false, win_vip) end ) local KEY = "F2" bindKey(KEY,'down', function ( ) guiSetVisible ( win_vip,not guiGetVisible ( win_vip ) ) showCursor ( guiGetVisible ( win_vip ) ) end ) addEventHandler ( "onClientGUIClick", root, function ( ) if (source == btn_he) then guiSetEnabled( btn_he,false) local _myTimer = setTimer(guiSetEnabled,60000*20,1, btn_he,true) triggerServerEvent("Healt",getLocalPlayer()) local remaining, executesRemaining, totalExecutes = getTimerDetails(_myTimer) local s = remaining/1000 local clock = string.format("%.2d:%.2d", s/60%60, s%60) guiSetText ( btn_he , clock ) elseif (source == btn_de) then guiSetEnabled( btn_de,false) _btn = setTimer(guiSetEnabled,60000*20,1, btn_de,true) triggerServerEvent("Armor",getLocalPlayer()) local _r, _e, _t = getTimerDetails(_btn) local _s = _r/1000 local _clock = string.format("%.2d:%.2d", _s/60%60, s%60) guiSetText ( btn_de , _clock ) elseif ( source == btn_mk4 ) then -- اذا الاعب ضغط على الزر Button guiSetEnabled( btn_mk4 ,false) _fainl = setTimer(guiSetEnabled,60000*20,1, btn_mk4 ,true) triggerServerEvent('M4', localPlayer) -- ارسال الطلب الى السيرفر باسم M4 local r, e, t = getTimerDetails(_fainl) local _ss = r/1000 local time = string.format("%.2d:%.2d", _ss/60%60, s%60) guiSetText ( btn_mk4 , time ) end -- اغلاق end -- اغلاق ) جرب ورد لي خبر
  7. السلام عليكم سويت كذا مود يحسب النقاط للاعبين اذا فازو بالديربي يعني كل ما يفوز لاعب بالديربي يزود 1 على سكوره حاولت اسويه بس النتيجة تطلع غلط local check = dbQuery( DerbyDB, ' SELECT * FROM `DerbyMission` WHERE DDname = ? AND DDserial = ? ', getPlayerName( element ) , getPlayerSerial( element ) ) local results = dbPoll( check, -1 ) if ( type( results ) == 'table' and #results == 0 or not results ) then exports ["guimessages"] : outputServer (element, "* [ Derby ]: هذا اول دخول لك للديربي" , 204, 51, 255) dbExec( DerbyDB, "INSERT INTO DerbyMission VALUES (?,?,?,?)", getPlayerName(element) , getPlayerSerial(element), 0 , 0 ) end هذا الكود يتاكد اول مايفوت للديربي .. اذا اول دخول راح يسوي بيانت جديدة واذا دخل من قبل مراح يسوي شي كله تمام للحين لكن لما اجي ازيد النقاط لم يفوز العب يزود غلط و يجيب القيمه غلط محاولتي local DDtop = dbQuery( DerbyDB, ' SELECT DDscore FROM `DerbyMission` WHERE DDname = ?',getPlayerName(winner)) local DDres = dbPoll( DDtop, -1 ) dbExec(DerbyDB, "UPDATE `DerbyMission` SET `DDscore`=? WHERE `DDname`=?",#DDres+2 , getPlayerName(winner) ) outputChatBox("* #ff0000≈[ #ff0000 " .. n .. " #FF9700 Won the Derby and hist total Score is "..#DDres+2,getRootElement(),255,255,0,true)
  8. ضيف الكود للميتا <settings> <setting name="*key" value="F10" /> </settings> الكلينت سايد bindKey( get("Key"), "down", function() if guiGetVisible( wnd ) then guiSetVisible( wnd, false ) showCursor( false ) else guiSetVisible( wnd, true ) showCursor( true ) end end )
  9. السلام عليكم اناسويت لوحة وفيها قريد ليست يجيب الاعب وقدامه سيريال حقه المشكلة انه يجيب اسماء الاعبين تمام . بس يكرر نفس السيريال .. يعني مايجيب السيريال المظبوط الكود : function putAllPlayersInList() guiGridListClear(grid) for i,v in ipairs(getElementsByType("player")) do local row = guiGridListAddRow(grid) guiGridListSetItemText(grid,row,1,getPlayerName(v),false,false) guiGridListSetItemText(grid,row,2,getPlayerSerial(v),false,false) end end
  10. Hi all .. i have a question about getTimerDetails I made a code to fetch the Timer information and turn it into minutes __________________________________ if _mytimer and isTimer(_mytimer) then _r,_e,_t = getTimerDetails(_mytimer) if _r and _e and _t then total = _r / 60 / 1000 outputChatBox("remain :: "..math.ceil(total)) end end ______________________ Everything is good . The code works successfully but I want it to bring minutes with seconds Like this remain : 3 m : 15 s 3 m : 14s any help ?
  11. السلام عليكم اخواني شلونكم ان شاء الله بخير الجميع انا سويت تايمر وسويت فكشن يجيب معلومات التايمر بالدقيقة _____________________________________________ _r,_e,_t = getTimerDetails(_mytimer) if _r and _e and _t then total = _r / 60 / 1000 _____________________________________________ طبعا النتيجة راح تجي فقط بالدقايق انا اريدها تجي بالدقايق والثواني يعني مثلا الحين تجي 3 دقايق اريدها بالظبط يعني 3 m : 15 s 3 m : 14 s وهاكذا
  12. وضح اكثر يعني تريده لم يضغط على زر يدخله عالم وهمي ويعطيه سلاح ؟؟
  13. guiGridListSetItemColor(gps_grid,row,2,math.random(0,100),math.random(0,255)) ذا وكمان جربت ذا ونفس الشي guiGridListSetItemColor(gps_grid,row,2,math.random(100,255)) الغلط مني ذ2 هذا الصح guiGridListSetItemColor(gps_grid,row,2,math.random(100,255),math.random(100,255),math.random(100,255))
×
×
  • Create New...