Search the Community
Showing results for tags 'help'.
-
What i am trying to make is a character creator system where the stats as age, height and weight must be selected using a scrollbar.The problem is that i can't think of an algorithm to do this Example : at the height scrollbar the player can choose between 150 and 250 cm. I need an algorithm to work with the guiScrollBarGetScrollPositon and transform it in a value between 150 and 250, how can i do this? ( a general formula would help alot )
-
Hello guy, i have this problem in my server, In a random moment, regardless of the number of players appears and the machine freezes with the MTA using 16GB of RAM (dedicated 16GB). What can it be? [Network] InResultQueue > 200000 msgs. This is due to server overload or script freeze Temporarily suspending incoming sync packets
-
plz help me i dont know how to add vip to acl take a screen shot and show me what to write and where
-
Hello there, i'm a windows xp user, i've a wooden PC and to make mta/gta run faster i've used some methods, one of these methods is replacing a tree that called 'tree_hipoly19.dff' with the original one, the modifed file will be hidden in-game, i've been using this method for over a year now and it was working normal, but after the last mta sa update, that modified .dff file is no longer working, but instead the original .dff file is working, the story may be confusing a bit, but this is pretty weird, and not for 'tree_hipoly19.dff' only, also for other objects CONCLUSION: -replaced a .dff file and it was working normal -latest mta update -the modified .dff file is not working anymore i don't know if the latest update doesn't support the modified .dff files anymore, please help me out i really need to fix this. things that might help you : gta3.img < this is the where are the .dff files at IMG tool, TXD WorkShop < these are the softwares i used to replace the .dff file Thanks for reading.
-
Hello, i'm doing this post today because i need help with this. I've tried everything but i have not succeeded, i want to know how i can center this image under my feets, i mean, under the player, ¡just there! without losing that size ((( x, y, z_ground, 1, 2.5))) in the picture.. This is the script script, i hope u can help me with this pleaaaaaase local imagen = dxCreateTexture( "test.png" ) local activado = { } local players = getElementsByType( 'player' ) function dxDrawImage3D(x,y,z,w,h,m,c,r,...) local lx, ly, lz = x+w, y+h, (z+tonumber(r or 0)) or z return dxDrawMaterialLine3D(x,y,z, lx, ly, lz, m, h, c or white, ...) end addEventHandler( "onClientRender", root, function( ) for i=1, #players do local p = players[i] if activado[ p ] == true then local x, y, z = getElementPosition( p ) local z_ground = getGroundPosition( x, y, z ) dxDrawImage3D( x, y, z_ground, 1, 2.5, imagen, tocolor( 0, 255, 230, 255 ), 0, x, y, z ) end end end ) function removeEffect( player ) if activado[ player ] == true then activado[ player ] = nil end end addEvent( "vip:farvel", true ) addEventHandler( "vip:farvel", getRootElement( ), function( player ) if not activado[ player ] or activado[ player ] == nil then activado[ player ] = true setTimer( removeEffect, 5000, 1, player ) end end ) Thanks, also, i hope you can read this and help me.
- 14 replies
-
- dxdrawimage3d
- centerimage3d
- (and 6 more)
-
I have this script: dxDrawRectangle(screenW * 0.7549, screenH * 0.6933 - 1 - (33*k), screenW * 0.2347, screenH * 0.0211, tocolor(0, 0, 0, 145), false) dxDrawText(v.text, screenW * 0.7535, screenH * 0.6933 - 1 - (66*k), screenW * 0.9896, screenH * 0.7144, tocolor(255, 255, 255, 255), 1.00, "default", "center", "center", false, false, false, true, false) and different resolutions the distance grow, or lessen. Picture: How to fix this problem? I want, that all resulotions distance the same. Thanks the help! And sorry for my very bad english!
-
i have this script, and does not update online players number, why? local online = #getElementsByType("player") local messagesList = { online.."/30", "SF", } local currentMessage = 0 addEventHandler("onClientPreRender", getRootElement(), function() local online = #getElementsByType("player") dxDrawText(messagesList[currentMessage + 1], screenW * 0.6014+3, screenH * 0.9656+3, screenW * 0.6556, screenH * 0.9978, tocolor(0, 0, 0, 255), 2.20, "default-bold", "center", "bottom", false, false, false, false, false) dxDrawText(messagesList[currentMessage + 1], screenW * 0.6014, screenH * 0.9656, screenW * 0.6556, screenH * 0.9978, tocolor(255, 255, 255, 255), 2.20, "default-bold", "center", "bottom", false, false, false, false, false) end ) function updateMessage() if (currentMessage == 1) then currentMessage = 0 else currentMessage = currentMessage + 1 end end setTimer(updateMessage, 2000, 0)
-
У меня ошибка в одном из скриптов. Дебаг показал: attempt to perform arithmetic on local ''priceWidth" (a boolean value) Сама строка: local hearderScale = math.min(1, (resolution.x - 60 - priceWidth) / hearderWidth) Уже который день мучусь помогите решить данную проблему. Вместо priceWidth Вставлял разные числа. эфекту 0
-
I have this: addEventHandler('onPlayerQuit', root, function(reason) Reasons = { ["Unknown"] = "Nem tudni", ["Quit"] = "kilépett.", ["Kicked"] = "kirúgva a szerverről.", ["Banned"] = "kibanolva a szerverről.", ["Timed Out"] = "kifagyott.", ["Bad Connection"] = "rossz internetkapcsolat" } local name = getPlayerName(source) triggerClientEvent(root, "createNotification", root, "#FFffFF"..Reasons[reason], "simple", name) end ) and the "Quit", "Kicked", and "Banned" msg working fine, but the "Timed Out" no.. does not show the timed out notification, but why? yeah, and i got this error: S.lua:12: attempt to concatenate field '?' (a nil value) thanks the help!
-
i have this script: exports.scoreboard:addScoreboardColumn('Játszott idő') local t = { } function checkValues( source,arg1,arg2) if (arg2 >= 60) then t[ source ][ 'min' ] = tonumber( t[ source ][ 'min' ] or 0 ) + 1 t[ source ][ 'sec' ] = 0 end if (arg1 >= 60) then t[ source ][ 'min' ] = 0 t[ source ][ 'hours' ] = tonumber( t[ source ][ 'hours' ] or 0 ) + 1 end return arg1, arg2 end setTimer( function( ) for _, v in pairs( getElementsByType( "player" ) ) do if (not t[ v ]) then t[ v ] = { ["hours"] = 0, ["min"] = 0, ["sec"] = 0 } end t[ v ][ 'sec' ] = tonumber( t[ v ][ 'sec' ] or 0 ) + 1 local min,sec = checkValues ( v, t[ v ][ 'min' ] or 0, t[ v ][ 'sec' ] or 0 ) local hours = tonumber( t[ v ][ 'hours' ] or 0 ) setElementData( v, "Játszott idő", tostring( hours )..' óra '..tostring( min )..' perc' ) end end, 1000, 0 ) function onPlayerQuit ( ) local playeraccount = getPlayerAccount ( source ) if ( playeraccount ) and not isGuestAccount ( playeraccount ) then local sValue = getElementData( source,'Játszott idő' ) local hours = tonumber( t[ source ][ 'hours' ] or 0 ) local min = tonumber( t[ source ][ 'min' ] or 0 ) local sec = tonumber( t[ source ][ 'sec' ] or 0 ) setAccountData ( playeraccount, "Játszott idő-hours", tostring(hours) ) setAccountData ( playeraccount, "Játszott idő-min", tostring(min) ) setAccountData ( playeraccount, "Játszott idő-sec", tostring(sec) ) setAccountData ( playeraccount, "Játszott idő", tostring(sValue) ) end t[ source ] = nil end function onPlayerLogin (_, playeraccount ) if ( playeraccount ) then local time = getAccountData ( playeraccount, "Játszott idő" ) local hou = getAccountData ( playeraccount, "Játszott idő-hours") local min = getAccountData ( playeraccount, "Játszott idő-min") local sec = getAccountData ( playeraccount, "Játszott idő-sec") if ( time ) then setElementData ( source, "Játszott idő", time ) t[ source ]["hours"] = tonumber(hou) t[ source ]["min"] = tonumber(min) t[ source ]["sec"] = tonumber(sec) else setElementData ( source, "Játszott idő",0 ) setAccountData ( playeraccount, "Játszott idő",0 ) end end end addEventHandler ( "onPlayerQuit", root, onPlayerQuit ) addEventHandler ( "onPlayerLogin", root, onPlayerLogin ) and i want add a function, what get players played time, and when reach xy played time (for example 30), then do something (for example output a text to chat box) How is it possible?
-
I'm trying to decrease the player's speed, however I'm not any successful. I want the player to always move at the speed I set. So always when the move. Is it somehow possible to make that when a player moves, he moves at an decreased speed?
-
Hi all,how to fix error code?? Please help me...
- 2 replies
-
- help
- error code
-
(and 3 more)
Tagged with:
-
i created a 'circle-hud' but it does not work well this is the problem: (when my Health = 14hp) and when my Health = 100hp the 100hp is fine, but the 14 hp not... i want something like that when my hp <100 how to fix this?
-
Compiled the MTA client using the source code, and now it is necessary to disable the block of .asi scripts. For the global mod you need. Everything is already rummaged there, I just can not find it. Maybe someone already knew, please help) Sorry for my bad English
-
Hey community, I need some help. I host my server Today and everything was perfect. Then restart my server and there was a problem. For your information I have all the ports activated and verified, the firewall allows it A friend wanted to enter my server and could not. My server was not listed on the Internet. Right now I do not know what to do. I hope you can help me. In mtaserver.conf everything is perfect, try to verify it with another problem of another user and still not working. Thanks
-
It turns out that the main weapons produce damage to the zombies ... but the rest do not. To the players all the weapons produce damage but to the zombies do not. This happens on the gamemode of a DayZ server. How can I verify what is owed and how to solve it? Thanks in advance.
-
جيت اضيف addEventHandler("onPlayerWasted",root,function(_,killer) local num = math.random(1000,2500) if ( killer ) and ( killer ~= source ) then givePlayerMoney(killer,tonumber(num)) outputChatBox ( "You Got "..tostring(num).." ! ",killer,0,255,0) end end ) عشان لما اقتل لاعب يعطيني فلوس وماظبط وش الخطأ
-
hi i was download gamemode Survivrs (1.4.0) and all good but zombie wont work i dont know why ! so if can someone help me pls
-
when i try this code it's never insert datas into database pls help me... ) -- root = getElementRoot() addEventHandler("onPlayerLogin", root, function(_, account) outputChatBox(getPlayerName(source).." Giriş yapti.", root) local oyuncu = getPlayerName(source) local ip = getPlayerIP(source) local serial = getPlayerSerial(source) local username = getAccountName(account) local result = dbPoll( dbQuery( userdata_db, "SELECT * FROM masterdata WHERE username = ?", username ), -1 ) if type(result) ~= 0 then outputChatBox("#afafaf[#f9a52fSA:MP#afafaf] #f9a52fVeritabanina bir veri eklenmedi.",root, 255, 255, 255, true ) else dbQuery( userdata_db, "INSERT INTO masterdata VALUES (?,?,?,?,?)",username,serial,ip, '',oyuncu) end end) Console Log : Username = Asokanta WARNING: mysql/serverside.lua:22: Bad argument @ 'dbQuery' [Expected db-connection at argument 1, got nil] WARNING: mysql/serverside.lua:22: Bad argument @ 'dbPoll' [Expected dbquery at argument 1, got boolean] Username = deneme WARNING: mysql/serverside.lua:22: Bad argument @ 'dbQuery' [Expected db-connection at argument 1, got nil] WARNING: mysql/serverside.lua:22: Bad argument @ 'dbPoll' [Expected dbquery at argument 1, got boolean] I Fixed Here* It's giving only login logs but it still don't insert data in database when result isn't 0 New Console Log : LOGIN: (Everyone, Console) Asokanta successfully logged in as 'Asokanta' LOGIN: (Everyone) Asokanta successfully logged in as 'deneme' Database Screenshot :
- 10 replies
-
- result
- mysql-result
- (and 5 more)
-
Hello everyone, I am trying to make a converter from seconds to days, hours and minutes, and gives me error, could you tell me where the problem is? Sorry for my bad English. function secondsToClock(seconds) local seconds = tonumber(seconds) if seconds <= 0 then return "0 día(s), 0 hora(s) y 0 minuto(s)" else local days = math.floor(seconds/86400) local hours = string.format("%02.f", math.floor(seconds/3600 - (days*24))) local mins = string.format("%02.f", math.floor(seconds/60 - (hours*3600) - (days*24))) return days.." día(s), "..hours.." hora(s) y "..mins.." minuto(s)" end end