
#Rmad~>
Members-
Posts
251 -
Joined
-
Last visited
Everything posted by #Rmad~>
-
يازاحف مابعطيه شي مو متاكد منه 100% انت بس جربه واذا لقيت خطأ قلي شغال معي بسيرفري وقسم وبدون اخطأ خله ييجي يجربه صاحب الموضوع ونشوف @_@
-
مجربه *_* على اكثر من قيم معدل والاساسي جربه انت وردلي خبر
-
السلام عليكم عندي كود فيه خطأ وماعرفت اصلحه وبنفس الوقت ابغا اضيف عليه شي ماعرفت له الكود الي سويته يعطي الاعب فلوس اول مايسجل دخول ويحفظ الاعب بالسيريال حقه انا الي ابغا اسويه انه كل مايخش يجيه فلوس بس يكون يومي يعني اليوم مثلا الاربعاء خشيت وجاتني الفلوس الخميس اليوم الي بعده اخش حسابي يجيني فلوس وابيه يتاكد من السيريال بحيث انه حسابين لكل سريال addEventHandler('onResourceStart',resourceRoot, function ( ) local Sql = executeSQLQuery ('CREATE TABLE IF NOT EXISTS `Money` ( PlayerSerial) ') if ( Sql ) then outputDebugString('*Create [ Money ] Table done*') end end ) addEventHandler('onPlayerLogin',root, function ( ) local Result = executeSQLQuery("SELECT * FROM `Money` WHERE PlayerSerial =?",getPlayerSerial(source) ) if( Result )and( type( Result ) == 'table' )and( #Result > 0 )then return end oney = math.random(100000,1000000) givePlayerMoney(source, oney) executeSQLQuery ("INSERT INTO `Money`(PlayerSerial)VALUES(?)",getPlayerSerial(source)) outputChatBox("#808080 *Congratulations You Have A Good Luke You took today "..oney.."*",source,255, 255, 255,true) end ) addEventHandler('onPlayerQuit',root, function ( ) local Results = executeSQLQuery("SELECT * FROM `Money` WHERE PlayerSerial=?",getPlayerSerial(source)) if ( type ( Results ) == "table" and #Results == 0 or not Results ) then executeSQLQuery ( "INSERT INTO `Money` ( PlayerSerial) VALUES(?)",getPlayerSerial(source)) else executeSQLQuery("UPDATE `Money` SET PlayerSerial = ?,WHERE name=?",getPlayerSerial(source)) end end ) الاخطأ الي واجهتني Database query failed:table Money hs ni column named PlayerSerial Database query failed:no such column PlayerSerial
-
روح ملف الريس ثم ملف race_server.lua ثم ابحث عن الفنكشن الي اسمه function cacheMapOptions(map) ثم بدل الكود ذا بدال الي عندك function cacheMapOptions(map) g_MapOptions = {} g_MapOptions.duration = map.duration and tonumber(map.duration) > 0 and map.duration*1000 or g_GameOptions.defaultduration if g_MapOptions.duration > 86400000 then g_MapOptions.duration = 86400000 end g_MapOptions.respawn = 'none' if g_MapOptions.respawn ~= 'timelimit' and g_MapOptions.respawn ~= 'none' then g_MapOptions.respawn = 'none' end g_MapOptions.respawntime = g_MapOptions.respawn == 'timelimit' and (map.respawntime and map.respawntime*1000 or g_GameOptions.defaultrespawntime) g_MapOptions.time = map.time or '12:00' g_MapOptions.weather = map.weather or 0 انتبه انا مو معطيك الفنكشن كامل اعطيتك الي يخص تعديل التايم !
-
No you don't let's read again together: Here you said that it was taking your money when you press the CCar button (which is not true).and now you just said this: So you first said that your money was taken and then you say that your money is still the same .... And I'll repeat again, it's working for me so here is the problem (I knew it was a coming from your meta.xml): Use " instead of ': (and don't close the tag twice: type="client"/> cache="false"/>) <script src="shop.lua" type="client"/> <script src="server.lua" type="server" /> i now it's my bad i forgat to try your post ^ i im sorry for block your time
-
oh shit sorry dud i forget to try this post it's working now thx and i im sorry,
-
And on what are you clicking on ? the CCar button or the color picker ? You are not really helping me atm. Please tell me the steps you do and which one fails. i click the CCar button and he take money from my and open the color picker when i click ok in the color picker it's Should change the color but he is not changing -- no errors
-
sorry when i click nothing happened no errors no changing color nothing all.
-
أhi i have picker I want him to make the chosen color for a car player i make him but i have small problem addEvent ( "onColorPickerOK" ) CCar = guiCreateButton(206, 130, 127, 56, "Color", false, x2) setElementData ( CCar, "Color", "0, 0, 255" ) addEventHandler( "onClientGUIClick", resourceRoot, function() if ( source == CCar ) then exports.cpicker:openPicker ( "Car Color", "#0000FF", "Car Color color picker" ) end end ) addEventHandler ( "onColorPickerOK", root, function ( element, hex, r, g, b ) if ( element == "Car Color" ) then local r, g, b = unpack ( split ( getElementData ( CCar, "Color" ), ", " ) ) r, g, b = tonumber ( r ), tonumber ( g ), tonumber ( b ) hex = "FF" .. ( { hex:gsub ( "#", "" ) } ) [ 1 ] local color = r .. "," .. g .. "," .. b guiSetProperty ( CCar, "NormalTextColour", hex ) setElementData ( CCar, "r", color ) setElementData ( CCar, "g", color ) setElementData ( CCar, "b", color ) triggerServerEvent("onBuy", localPlayer,r, g, b) end end ) function Buy(r,g,b) if (getPlayerMoney(source) >= 100) then takePlayerMoney(source, 100) local vehicle = getPedOccupiedVehicle(source) setVehicleColor ( vehicle, r, g, b ) else outputChatBox ("You Don't have $100",source,255,0,0) end end addEvent("onBuy",true) addEventHandler("onBuy", root, Buy) function Quit() local account = getPlayerAccount( source ) if ( account and not isGuestAccount(account)) then local r = tonumber (getElementData(source,"r")) or 0 setAccountData(account,"r",r) local g = tonumber (getElementData(source,"g")) or 0 setAccountData(account,"g",g) local b = tonumber (getElementData(source,"b")) or 0 setAccountData(account,"b",b) end addEventHandler("onPlayerQuit", root, Quit) addEventHandler( "onPlayerLogin", root, function( _,acc) local r = getAccountData(acc,"r") local g = getAccountData(acc,"g") local b = getAccountData(acc,"b") if ( r and g and b ) then local vehicle = getPedOccupiedVehicle(source) setVehicleColor ( vehicle, r, g, b ) end end) function login () local account = getPlayerAccount( source ) if ( account and not isGuestAccount(account)) then local r = getAccountData( account,"r" ) local g = getAccountData( account,"g" ) local b = getAccountData( account,"b" ) local vehicle = getPedOccupiedVehicle(source) setVehicleColor ( vehicle, r, g, b ) end end end end addEventHandler ("onPlayerPickUpRacePickup", root, login) addEventHandler ("onPlayerVehicleEnter", root, login) the problems i have when i buy color it's buying so good but if i buy another time it's still same color not changing onPlayerPickUpRacePickup --bad argument got nil onPlayerVehicleEnter -- bad argument got nil the problems i have when i buy color it's buying so good but if i buy another time it's still same color not changing I have another request when I want to change the color sets the color of the car, such as a friendly freeroam
-
السلام عليكم ياشباب معي كود الكولور ابيه يخلي اللون المختار لون السياراة ولما سويته واجهتني مشاكل فيه addEvent ( "onColorPickerOK" ) CCar = guiCreateButton(206, 130, 127, 56, "Color", false, x2) setElementData ( CCar, "Color", "0, 0, 255" ) addEventHandler( "onClientGUIClick", resourceRoot, function() if ( source == CCar ) then exports.cpicker:openPicker ( "Car Color", "#0000FF", "Car Color color picker" ) end end ) addEventHandler ( "onColorPickerOK", root, function ( element, hex, r, g, b ) if ( element == "Car Color" ) then local r, g, b = unpack ( split ( getElementData ( CCar, "Color" ), ", " ) ) r, g, b = tonumber ( r ), tonumber ( g ), tonumber ( b ) hex = "FF" .. ( { hex:gsub ( "#", "" ) } ) [ 1 ] local color = r .. "," .. g .. "," .. b guiSetProperty ( CCar, "NormalTextColour", hex ) setElementData ( CCar, "r", color ) setElementData ( CCar, "g", color ) setElementData ( CCar, "b", color ) triggerServerEvent("onBuy", localPlayer,r, g, b) end end ) function Buy(r,g,b) if (getPlayerMoney(source) >= 100) then takePlayerMoney(source, 100) local vehicle = getPedOccupiedVehicle(source) setVehicleColor ( vehicle, r, g, b ) else outputChatBox ("You Don't have $100",source,255,0,0) end end addEvent("onBuy",true) addEventHandler("onBuy", root, Buy) function Quit() local account = getPlayerAccount( source ) if ( account and not isGuestAccount(account)) then local r = tonumber (getElementData(source,"r")) or 0 setAccountData(account,"r",r) local g = tonumber (getElementData(source,"g")) or 0 setAccountData(account,"g",g) local b = tonumber (getElementData(source,"b")) or 0 setAccountData(account,"b",b) end addEventHandler("onPlayerQuit", root, Quit) addEventHandler( "onPlayerLogin", root, function( _,acc) local r = getAccountData(acc,"r") local g = getAccountData(acc,"g") local b = getAccountData(acc,"b") if ( r and g and b ) then local vehicle = getPedOccupiedVehicle(source) setVehicleColor ( vehicle, r, g, b ) end end) function login () local account = getPlayerAccount( source ) if ( account and not isGuestAccount(account)) then local r = getAccountData( account,"r" ) local g = getAccountData( account,"g" ) local b = getAccountData( account,"b" ) local vehicle = getPedOccupiedVehicle(source) setVehicleColor ( vehicle, r, g, b ) end end end end addEventHandler ("onPlayerPickUpRacePickup", root, login) addEventHandler ("onPlayerVehicleEnter", root, login) المشاكل الي واجهتني انه يشتري تمام بس مشكلته لاشريت مره وحده وشريت مره ثانيه يبقا نفس اللون الاول onPlayerPickUpRacePickup --bad argument got nil onPlayerVehicleEnter -- bad argument got nil وعندي طلب لو سمحتم ابيه لاحدد منطقه بالالوان مثلا وقف عند الازرق تسير السياراة زرقه وااذا قعد يلعب بالماوس جوا الكولبر تتغير معه لون السياراة واذا ظغط اوك يشتري اللون
-
مثال على ايش الكود صح بس نسيت شي myFont = guiCreateFont( "segoeui.ttf", 20 ) guiSetFont( myLabel, myFont )
-
خلاص يعطيكم العافية شباب طلع عندي مشكلة باللعبة واعدة تثبيتها
-
يب متاكد هو يجي بالشات كلام انه تم الانشاء بس ماينشأ
-
السلام عليكم ياشباب انا يوم اسوي جروب جديد بالجروب سيستم حق احمد يجيني بالديبوغ server.luac:database query failed:so such column:gangName server.luac:database query failed:table gangs has no colmun named gangID ومايسوي القروب بس يجي الكلام بالشات انه سوا القرو ب وللمعلومية اني ماعدلت اي شي بالمود
-
addEventHandler("onPlayerWasted",root, function (killer) if not (getPedWeapon (killer) == 34) then return end if ( killer and killer ~= source ) then local Get = getElementData ( killer, "kor" ) or 0 setElementData(source,"kor", ( Get + 1 )) if Get >= 5 then triggerServerEvent("SetToGroupACL",localPlayer,Get) end end end ) addEventHandler( "onPlayerQuit" ,root, function() local accP = getPlayerAccount(source) if ( accP and not isGuestAccount(accP)) then local kor = tonumber(getElementData(source,"kor")) or 0 setAccountData(accP,"Points",kor) end end ) addEventHandler( "onPlayerLogin", root, function( _,acc) local kor = getAccountData(acc,"Points") if (kor) then setElementData(source,"kor",kor) end end ) Updete for Save In AccountData..
-
طيب ياشباب كيف مايسير انا شايفه باكثر من 5 سيرفرات ْْ
-
function Players() guiGridListClear(GridList) for i, player in ipairs (getElementsByType ("player")) do local row = guiGridListAddRow(GridList) local Player1 = getPlayerName(player) local r, g, b = getPlayerNametagColor(Player1) local Player2 = string.gsub(r,g,b,"#%x%x%x%x%x%x","") guiGridListSetItemText(GridList,row,1,Player2,false,false) end end addEventHandler("onClientResourceStart",resourceRoot,Players) gsup (string expected,got boolean)