-
Posts
4,121 -
Joined
-
Last visited
-
Days Won
2
Everything posted by Kenix
-
Hi, i have problem with Russians letters, I already tryed with string.find but I had a problem with $ so I made a custom function with Citizen's help. Client: words = {"а","б","в","г","д","е","ё","ж","з","и","й","к","л","м","о","п","р","с","т","у","ф","х","ц","ч","щ","ь","ы","ъ","э","ю","я","!","@","#","$","%","^","&","*","(",")","№",";",":","?"} loginButton = {} loginEdit = {} loginEdit[0] = guiCreateEdit(0.475,0.4263,0.0812,0.0244,"",true) -- едит аккаунта guiSetAlpha(loginEdit[0],0.75) loginButton[2] = guiCreateButton(0.3858,0.8154,0.1917,0.0601,"Зарегистрироваться",true) addEventHandler("onClientGUIClick",loginButton[2], function() local accText = guiGetText(loginEdit[0]) if string.findtable(accText,words) then -- do some stuff end end) function string.findtable( text, theTable ) for j=1, string.len( text ) do local char = string.sub( tostring(text), j, j ) for k=1, #theTable do local character = theTable[k] --outputChatBox( "if "..tostring(char).." == "..tostring(character)..") then", 0, 200, 0 ) outputDebugString( "if "..tostring(char).." == "..tostring(character).." then") if char == character then outputChatBox( "found invalid character", 0, 255, 0 ) return true end end end outputChatBox( "not found invalid character", 255, 0, 0 ) return false end When I type the д in the edit, then in the clientscript.log, I see 'if Р == Рґ then' instead of 'if д == д then' I saw that there is some utf functions, but I don't know how to use it and if they can fix my problem. Thanks for helping me, kenix
-
[BUG] Проблемы с голосовым чатом [SOLVED]
Kenix replied to Kenix's topic in Помощь / Отчеты об ошибках
Итак поставил драва на DirectX,и на звуковую карту меня стало слышно это прогресс! Вот только всё равно я никого не слышу -
So not spawn player but errors not write.
-
output Key: 1 Value: 0
-
First you must insert something in table. Use executeSQLInsert when creating account. So i create it it work adding data. but Debug says on login: [2011-08-24 11:29:54] WARNING: save_system\account_s.lua:26: Bad argument @ 'setElementHealth' [2011-08-24 11:29:54] WARNING: save_system\account_s.lua:27: Bad argument @ 'setPedArmor' [2011-08-24 11:29:54] WARNING: save_system\account_s.lua:28: Bad argument @ 'setPlayerMoney' [2011-08-24 11:29:54] WARNING: save_system\account_s.lua:29: Bad argument @ 'setElementPosition' [2011-08-24 11:29:54] WARNING: save_system\account_s.lua:30: Bad argument @ 'setPlayerWantedLevel' [2011-08-24 11:29:54] WARNING: save_system\account_s.lua:31: Bad argument @ 'setElementModel' [2011-08-24 11:29:54] WARNING: save_system\account_s.lua:32: Bad argument @ 'setElementDimension' [2011-08-24 11:29:54] WARNING: save_system\account_s.lua:33: Bad argument @ 'setElementInterior' [2011-08-24 11:29:54] WARNING: save_system\account_s.lua:34: Bad argument @ 'setPlayerNametagColor'
-
not working i check database not adding data
-
function create_tables() executeSQLCreateTable ( "users", "user STRING, health INT, armor FLOAT, money INT, x FLOAT, y FLOAT, z FLOAT, wanted INT, skin INT, dim INT, int INT, r INT, g INT, b INT, jailtime INT" ) end addEventHandler("onResourceStart",resourceRoot,create_tables) function save_general() local health = getElementHealth(source) local Armor = getPedArmor(source) local money = getPlayerMoney(source) local x,y,z = getElementPosition(source) local wanted = getPlayerWantedLevel(source) local skin = getElementModel(source) local dim = getElementDimension (source) local int = getElementInterior (source) local r, g, b = getPlayerNametagColor ( source ) local playername = getPlayerName ( source ) local jailtime = getElementData(source,"jailtime") executeSQLUpdate( "users", "user = '" .. getAccountName( getPlayerAccount( source ) ) .. "', health = '" .. health .. "', armor = '" .. armor .. "', money = '" .. money .. "', x = '" .. x .. "', y = '"..y.."'z = '" .. z .."',wanted = '".. wanted .."',skin = '".. skin .."',dim = '".. dim .. "',int = '".. int .."',r = '".. r .. "',g = '".. g .."',b = '".. b .. "',jailtime = '".. jailtime .."'") end addEventHandler("onPlayerQuit",root,save_general) function save_setData() local userTable = executeSQLSelect ( "users", "user","user = '" .. getAccountName( getPlayerAccount( source ) ) .. "'", "health", "armor", "money", "x", "y", "z", "wanted","skin","dim","int","r","g","b","jailtime" ) setElementHealth(source,userTable[3]) setPedArmor(source,userTable[4]) setPlayerMoney(source,userTable[5]) setElementPosition( source, userTable[6], userTable[7], userTable[8] ) setPlayerWantedLevel(source,userTable[9]) setElementModel(source,userTable[10]) setElementDimension (source,userTable[11]) setElementInterior (source,userTable[12]) setPlayerNametagColor ( source, userTable[13], userTable[14], userTable[15] ) setElementData(source,"jailtime",userTable[16) end addEventHandler( "onPlayerLogin", root, save_setData ) Debug says on login: [2011-08-24 11:29:54] WARNING: save_system\account_s.lua:26: Bad argument @ 'setElementHealth' [2011-08-24 11:29:54] WARNING: save_system\account_s.lua:27: Bad argument @ 'setPedArmor' [2011-08-24 11:29:54] WARNING: save_system\account_s.lua:28: Bad argument @ 'setPlayerMoney' [2011-08-24 11:29:54] WARNING: save_system\account_s.lua:29: Bad argument @ 'setElementPosition' [2011-08-24 11:29:54] WARNING: save_system\account_s.lua:30: Bad argument @ 'setPlayerWantedLevel' [2011-08-24 11:29:54] WARNING: save_system\account_s.lua:31: Bad argument @ 'setElementModel' [2011-08-24 11:29:54] WARNING: save_system\account_s.lua:32: Bad argument @ 'setElementDimension' [2011-08-24 11:29:54] WARNING: save_system\account_s.lua:33: Bad argument @ 'setElementInterior' [2011-08-24 11:29:54] WARNING: save_system\account_s.lua:34: Bad argument @ 'setPlayerNametagColor' thx in advance
-
[BUG] Проблемы с голосовым чатом [SOLVED]
Kenix replied to Kenix's topic in Помощь / Отчеты об ошибках
билд : 3046 ос : XP скрин настроек аудио из dxdiag: http://imageshost.ru/photo/1442978/id837367.html -
Перепробывал 2 микрафона и меня всегда не слышно , в звукозаписи микрафоны работают в мта нет . И ещё не слышно что другие говорят. В настройках voice выставлено на 100 % Кто знает в чём проблема? Кто сталкивался уже с этим?
-
Download Dumps new dump new dump2
-
Рано ещё релиз делать не все баги профиксены. /me ущёл выкладывать дампы
-
E-mail, read my upper post please.
-
Where is variable sw,sh this is not full code maybe show full code ? col = {} col.black = tocolor(0,0,0,200) col.npctitle = tocolor(142,196,131,255) newsMsg = { "آهلا بكم في سيرفر كلآن هآو", "سجل في السيرفر ليتم حفظ نقآطك", "BaseMode1.1" } text = newsMsg[1] local start = getTickCount() function drawInfoBox() local now = getTickCount() local time = now - start local scale = 0.6 local font = "bankgothic" local duration = 30000 local width = dxGetTextWidth(text, scale, font) dxDrawRectangle(0, sh-24, sw, sh, col.black) if time > duration then start = now text = newsMsg[math.random(1, table.getn(newsMsg))] end dxDrawText(text, math.mod(time, duration) / duration * (sw + width) - width, sh-20, sw, sh, col.npctitle, scale, font) end addEventHandler("onClientRender",root, drawInfoBox)
-
Show source code this function .p.s i use a mobile phone and i cant look resource and this function.
-
Better use setTimer on 50 ms for update position.
-
You need use relative = true in gui functions. Edit .Use this https://wiki.multitheftauto.com/wiki/CenterWindow edit 2 .for more better effect you need resize all buttons , images and etc .
-
Lol i use mobile phone and i write code not faster
-
You mean this ? g_R = getRootElement() messages = { "Hi", "How are u", "Whats up?" } serials = { "2F79CDD46FA67EB6006A1C1E24BD3583" } randm = messages[math.random(1,#messages)] function onJoin() serial = getPlayerSerial(source) if serial == serials then setElementData(source,"LP",true) end end addEventHandler("onPlayerJoin",g_R,onJoin) function chat(message,messageType) if getElementData(source,"LP") == true then cancelEvent() outputChatBox(getPlayerName(source).."#FFFFFF:"..randm ,source,0,0,0,true) end end addEventHandler("onPlayerChat",g_R,chat)
-
Show this function guiConvertToCustomBlip
-
Example function attachsoundtoplayer() sound = playSound3D("test.mp3",0,0,0) attachElements(sound,getLocalPlayer(),0,0,0) end setTimer(attachsoundtoplayer,100,1)
-
you need run customblips resource if resource for exports not run you cant exports any functions .