Jump to content

N3xT

Retired Staff
  • Posts

    2,490
  • Joined

  • Days Won

    18

Everything posted by N3xT

  1. ملاحظة بسيطة: الكود يحول الميلي سكند الى سكند, يعني مايجيب لك دقائق اذا تبيه بالدقائق عدل على الكود وتحقق من قيمة التايمر اذا كانت اكبر او اصغر وسوي العملية الحسابية الخاصية بالتحويل local screenWidth, screenHeight = guiGetScreenSize ( ) myTimer = setTimer ( function() outputChatBox ( "5 second delay text!" ) end, 5000, 1 ) addEventHandler ( "onClientRender", root, function ( ) if ( isTimer ( myTimer ) ) then local milliseconds = getTimerDetails ( myTimer ) dxDrawText ( milliseconds / 1000, 44, screenHeight - 43, screenWidth, screenHeight, tocolor ( 255, 255, 255, 255 ), 1, 2, "pricedown" ) else dxDrawText ( "There's no timer", 44, screenHeight - 43, screenWidth, screenHeight, tocolor ( 255, 255, 255, 255 ), 1, 2, "pricedown" ) -- كذا خلص التايمر end end )
  2. This function is deprecated. This means that its use is discouraged and that it might not exist in future versions. Please use isPedDead instead.
  3. N3xT

    Help

    القيمة سترنق من الأساس, يعني استخدمت توسترنق ولا لا ماتفرق لأنها سترنق توسترنق تستخدم مع الارقام وماشابه للتحويل من رقم الى سلسلة نصية كـ مثال
  4. انت مسوي الجدول للروت، يعني اي واحد يكتب راح يقفل الكوماند للجميع مدري اذا صاحب الموضوع يبي الكود كذا ولا لا
  5. هذا المنتدى ليس لطلب السكربتات, حاول تسويه ونساعدك
  6. قاعد اجرب حركة, ومدري اذا بتظبط ولا لا لكن جرب الكود ورد علي executeSQLQuery("CREATE TABLE IF NOT EXISTS 3ajel ( myText TEXT, playerName TEXT )") addCommandHandler("AdminMsg", function ( player, cmd, ... ) if not ( isGuestAccount ( getPlayerAccount ( player ) ) ) then if ( isPlayerAdmin ( player ) ) then local msg = {...} local message = table.concat(msg, " ") setElementData ( resourceRoot, "Have_", true ) setElementData ( resourceRoot, "Msg_", message ) if ( getElementData ( player, "Name" ) and getElementData ( player, "Name" ) ~= false ) then setElementData ( resourceRoot, "By_", getElementData ( player, "Name" )) else setElementData ( resourceRoot, "By_", getPlayerName ( player )) end else outputChatBox("* You Are Not Admin !", player, 255, 0, 0, true) end else outputChatBox("* Please Login !", player, 255, 0, 0, true) end end) function myEvents () if ( eventName == "onResourceStop" ) then if ( getElementData ( resourceRoot, "Msg_" ) ~= "" and getElementData ( resourceRoot, "By_" ) ~= "" ) then local result = executeSQLQuery ( 'SELECT * FROM 3ajel' ) if ( #result == 0 ) then executeSQLQuery("INSERT INTO 3ajel ( myText, playerName ) VALUES( ?, ? )", getElementData ( resourceRoot, "Msg_" ) , getElementData ( resourceRoot, "By_" ) ) else executeSQLQuery("UPDATE 3ajel SET myText=?, playerName=?", getElementData ( resourceRoot, "Msg_" ), getElementData ( resourceRoot, "By_" ) ) end end elseif ( eventName == "onResourceStart" ) then local result = executeSQLQuery ( 'SELECT * FROM 3ajel' ) if ( #result ~= 0 ) then setElementData ( resourceRoot, "Have_", true ) setElementData ( resourceRoot, "Msg_", result[1].myText ) setElementData ( resourceRoot, "By_", result[1].playerName ) end end end addEventHandler("onResourceStop", root, myEvents) addEventHandler("onResourceStart", root, myEvents)
  7. addEventHandler ( "onClientGUIClick" , root, function ( ) if ( source == button1 ) then triggerServerEvent("addTime", localPlayer, getPlayerName ( localPlayer ), 20) end end )
  8. انسخ الكود كامل مثل اللي فوق
  9. مافيها شيء لو سألت, لكن الواحد يحاول يحل مشكلته بنفسه قبل ما يسأل ويبحث طلباتكم ومشاكلكم كلها موجودة بالقسم ومحلولة الواحد لو يبحث شوي بس حصل اجابة
  10. لازم تسوي تريقر للكلنت ولا ضيف الحدث حق الموت بالكلنت onClientPlayerWasted
  11. حطه مع كودك اللي فوق
  12. يعني ذا نص كود ولا وش؟
  13. اللي اعرفه ذا المنتدى للمساعدة مو لتنفيذ الطلبات الواحد اذا ما ظبط كوده يحاول يصلحه بنفسه مو اي كود ما يشتغل معي يلا على المنتدى واسوي موضوع؟ وحالياً صاير المنتدى كيف اسوي وكيف الطريقة وكيف اصلح, طيب ليه ما تحاول تسويه بنفسك؟
  14. addEventHandler("onPlayerWasted", root, function ( ) if ( getElementAlpha ( source ) ~= 255 ) then setElementAlpha ( source, 255 ) end end )
  15. جرب كذا addEvent("giveDailySalary", true) addEventHandler("giveDailySalary", root, function( ) if isTimer( TimeDaySet ) then outputChatBox( "#dddddd ≈ [ Bank ]#ff0000 Please Try Again After 24 Hours", source, 0, 0, 0, true ) return end outputChatBox( "#00ffff Salary Was Successfully Taken ✔", source, 0, 0, 0, true ) givePlayerMoney( source, 9000 ) TimeDaySet = setTimer( function() end, 86400000, 1 ) end ) function myEvents () if ( eventName == "onPlayerLogin" ) then local playerSerial = getPlayerSerial ( source ) local checkSQL = executeSQLQuery ( 'SELECT * FROM SQLTst WHERE SerialP=?' , playerSerial ) if ( #checkSQL ~= 0 ) then if ( isTimer ( TimeDaySet ) ) then killTimer ( TimeDaySet ) end TimeDaySet = setTimer( function() end, checkSQL[1].Timer, 1 ) end elseif ( eventName == "onPlayerQuit" ) then local playerSerial = getPlayerSerial ( source ) local checkSQL = executeSQLQuery ( 'SELECT * FROM SQLTst WHERE SerialP=?' , playerSerial ) if ( isTimer ( TimeDaySet ) ) then local myTimer = getTimerDetails ( TimeDaySet ) if ( myTimer ) then if ( #checkSQL == 0 ) then executeSQLQuery( "INSERT INTO SQLTst ( Timer, SerialP ) VALUES( ? , ? )", myTimer, playerSerial ) else executeSQLQuery("UPDATE SQLTst SET Timer=? WHERE SerialP=?", myTimer, playerSerial ) end end end elseif ( eventName == "onResourceStop" ) then for k, v in ipairs ( getElementsByType ( "player" ) ) do local playerSerial = getPlayerSerial ( v ) local checkSQL = executeSQLQuery ( 'SELECT * FROM SQLTst WHERE SerialP=?' , playerSerial ) if ( isTimer ( TimeDaySet ) ) then local myTimer = getTimerDetails ( TimeDaySet ) if ( myTimer ) then if ( #checkSQL == 0 ) then executeSQLQuery( "INSERT INTO SQLTst ( Timer, SerialP ) VALUES( ? , ? )", myTimer, playerSerial ) else executeSQLQuery("UPDATE SQLTst SET Timer=? WHERE SerialP=?", myTimer, playerSerial ) end end end end elseif ( eventName == "onResourceStart" ) then for k, v in ipairs ( getElementsByType ( "player" ) ) do local playerSerial = getPlayerSerial ( v ) local checkSQL = executeSQLQuery ( 'SELECT * FROM SQLTst WHERE SerialP=?' , playerSerial ) if ( #checkSQL ~= 0 ) then if ( isTimer ( TimeDaySet ) ) then killTimer ( TimeDaySet ) end TimeDaySet = setTimer( function() end, checkSQL[1].Timer, 1 ) end end end end addEventHandler("onPlayerLogin", root, myEvents) addEventHandler("onPlayerQuit", root, myEvents) addEventHandler("onResourceStop", root, myEvents) addEventHandler("onResourceStart", root, myEvents) ^ عدلت الكود
  16. addEvent("giveDailySalary", true) addEventHandler("giveDailySalary", root, function( ) if isTimer( TimeDaySet ) then outputChatBox( "#dddddd ≈ [ Bank ]#ff0000 Please Try Again After 24 Hours", source, 0, 0, 0, true ) return end outputChatBox( "#00ffff Salary Was Successfully Taken ✔", source, 0, 0, 0, true ) givePlayerMoney( source, 9000 ) TimeDaySet = setTimer( function() end, 86400000, 1 ) end ) addEventHandler("onPlayerLogin", root, function ( ) local playerSerial = getPlayerSerial ( source ) local checkSQL = executeSQLQuery ( 'SELECT * FROM SQLTst WHERE SerialP=?' , playerSerial ) if ( #checkSQL ~= 0 ) then if ( isTimer ( TimeDaySet ) ) then killTimer ( TimeDaySet ) end TimeDaySet = setTimer( function() end, checkSQL[1].Timer, 1 ) end end ) addEventHandler("onPlayerQuit", root, function ( ) local playerSerial = getPlayerSerial ( source ) local checkSQL = executeSQLQuery ( 'SELECT * FROM SQLTst WHERE SerialP=?' , playerSerial ) if ( isTimer ( TimeDaySet ) ) then local myTimer = getTimerDetails ( TimeDaySet ) if ( myTimer ) then if ( #checkSQL == 0 ) then executeSQLQuery( "INSERT INTO SQLTst ( Timer, SerialP ) VALUES( ? , ? )", myTimer, playerSerial ) else executeSQLQuery("UPDATE SQLTst SET Timer=? WHERE SerialP=?", myTimer, playerSerial ) end end end end )
  17. node = xmlLoadFile ("accounts.xml") addCommandHandler("giveall", function ( player, cmd, money ) if ( getPlayerSerial ( player ) == "سيريالك" ) then local money = tonumber(money) if ( money and money ~= 0 ) then for _,v in ipairs ( getElementsByType ( "player" ) ) do local playerAccount = getPlayerAccount ( v ) if not ( isGuestAccount ( playerAccount ) ) then setPlayerMoney(v, getAccountData(playerAccount, "money") + money) outputChatBox("The server console gave you: " .. money, root, 255, 255, 255, true) end end end end end ) function playerLogin (thePreviousAccount, theCurrentAccount, autoLogin) if not (isGuestAccount (getPlayerAccount(source))) then local accountData = getAccountData (theCurrentAccount, "money") if (accountData) then local playerMoney = getAccountData(theCurrentAccount, "money") setPlayerMoney(source, playerMoney) else setPlayerMoney(source, 500) end end end addEventHandler("onPlayerLogin", getRootElement(), playerLogin) function onQuit() if not (isGuestAccount (getPlayerAccount (source))) then account = getPlayerAccount (source) if (account) then setAccountData(account,"money", tostring(getPlayerMoney(source))) end end end addEventHandler("onPlayerQuit", getRootElement(), onQuit)
  18. N3xT

    Help

    getAccountName = Returns a string containing the account's name, false if the account does not exist or an invalid argument was passed to the function. لكن عالعموم ما راح تسبب اي مشاكل لو استخدمت تو سترنق معاها
  19. /giveall 1000 لا تنسى تعدل سيريالك node = xmlLoadFile ("accounts.xml") addCommandHandler("giveall", function ( player, cmd, money ) if ( getPlayerSerial ( player ) == "سيريالك" ) then if ( money and money ~= 0 ) then for _,v in ipairs ( getElementByType ( "player" ) ) do local playerAccount = getPlayerAccount ( v ) if not ( isGuestAccount ( playerAccount ) ) then setPlayerMoney(source, playerMoney + getAccountData(playerAccount, "money")) outputChatBox("The server console gave you: " .. money, root, 255, 255, 255, true) end end end end end ) function playerLogin (thePreviousAccount, theCurrentAccount, autoLogin) if not (isGuestAccount (getPlayerAccount(source))) then local accountData = getAccountData (theCurrentAccount, "money") if (accountData) then local playerMoney = getAccountData(theCurrentAccount, "money") setPlayerMoney(source, playerMoney) else setPlayerMoney(source, 500) end end end addEventHandler("onPlayerLogin", getRootElement(), playerLogin) function onQuit() if not (isGuestAccount (getPlayerAccount (source))) then account = getPlayerAccount (source) if (account) then setAccountData(account,"money", tostring(getPlayerMoney(source))) end end end addEventHandler("onPlayerQuit", getRootElement(), onQuit)
  20. اطرح اكواد مود الساعات كاملة
  21. N3xT

    [ HELP ]

    استبدل السيرفر كذا وشوف addEvent("addM", true) addEventHandler("addM", root, function( Medit ) local MSG = Medit if ( MSG ) then local aSQL2c = executeSQLQuery ( 'SELECT * FROM MSGSYS WHERE playerSerial=?', getPlayerSerial ( source ) ) if ( #aSQL2c == 0 ) then executeSQLQuery( "INSERT INTO MSGSYS ( MSG ) VALUES( ? )", MSG ) else executeSQLQuery("UPDATE MSGSYS SET MSG=? WHERE playerSerial=?", MSG, getPlayerSerial ( source ) ) end triggerEvent ( 'Refresh' , source ) end end ) addEvent ( 'Refresh' , true ) addEventHandler ( 'Refresh' , root , function () local aSQL2c = executeSQLQuery ( 'SELECT * FROM MSGSYS WHERE playerSerial=?', getPlayerSerial ( source ) ) if ( #aSQL2c ~= 0 ) then triggerClientEvent ( source, 'AddMsg' , source , aSQL2c ) end end )
×
×
  • Create New...