Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 25/09/18 in all areas

  1. hello there i created useful function that maybe help people a lot it should be a main mta sa function it's used with dxDrawText that function help you to get numbers of lines of text if u was used the wordbreak argument and set it to true in dxDrawText function source code: function getTextNumbersOfLines(text,borderheight,borderwidth,scale,font) if dxGetTextWidth(text,scale,font)>borderwidth then---if it's in new line then local totalHeight=borderheight/dxGetFontHeight(scale,font)----get number of lines that the box can contain it local percent=(borderwidth/dxGetTextWidth(text,scale,font)) *100---calculate some math :D get the percentage from the all width to the width of 1 line local heightoftext=(percent*totalHeight)/100 local result=math.floor(dxGetFontHeight(scale,font)/heightoftext) return result end return 1---else end syntax: getTextNumbersOfLines(string text,float borderheight,float borderwidth,float scale,string/fontelement font) arguments: text: the text that you want to get the numbers of line of it borderheight: the height of the border borderwidth: the width of the border scale: the scale of the text font : can be an font element that created by dxcreating font functions or it can be one of this: "default": Tahoma "default-bold": Tahoma Bold "clear": Verdana "arial": Arial "sans": Microsoft Sans Serif "pricedown": Pricedown (GTA's theme text) "bankgothic": Bank Gothic Medium "diploma": Diploma Regular "beckett": Beckett Regular how to use: example-- addEventHandler('onClientRender',root,function() dxDrawText ( 'hello world this is just test text to check word warp calculate function ', 200,200, 300, 400, tocolor(255,255,255,255),1, "default", "left", "top", true,true, false) end) addCommandHandler('testheight',function() print(getTextNumbersOfLines('hello world this is just test text to check word warp calculate function ',200,100,1,'default')) print(dxGetFontHeight(1,'default')) end) what is the special about this function we all know we can create our word break mechanism without using the word break argument but with this function you can use the wordbreak argument and don't care about the mechanism hope u like it enjoy
    2 points
  2. Hello guys! I've created a Docker container for MTA 0.5r2, so starting a server is easier than ever! You can check it out here on Docker hub: https://hub.docker.com/r/andrasszell/mta05-server/ Feel free to give me feedback!
    1 point
  3. I've started two MTA 0.5r2 servers in EU (Frankfurt), feel free to join! 18.185.151.64:2003 - Deathmatch 18.185.151.64:2004 - Stunt
    1 point
  4. Underground Gaming Network UGN:RPG New RPG/CnR Server Developed by some Experienced Scripters / mappers : For More infos about News Visite Us on our Discord Channel : https://discord.gg/cfDHqN Thank You
    1 point
  5. E as minhas perguntas, consegue responder?
    1 point
  6. Provavelmente você já manja de Lógica de Programação, então sugiro que baixe alguns resources básicos da comunidade MTA e estude a documentação das funções na Wiki MTA.
    1 point
  7. Mandáme un PM. Saludos.
    1 point
  8. Unsafe Unnecessary, only eats up extra resources for no reason. What you should care most about is how to transfer the password safely to the server without running the risk of it being sniffed out by a man-in-the-middle attack. Luckily for you triggerServerEvent already encrypts the data being send, so you don't need to apply your own encryption. On the server you can then hash the password (using sha256, sha512 is overkill) together with a salt (that you store together with the password). I don't generally recommend hashing client-side as that may compromise the salt. You can also use the passwordHash and passwordVerify functions which is the most recommended solution (using "bcrypt" as the hashing algorithm). These functions automatically handle the salt for you and prevent so called 'timing attacks'.
    1 point
  9. and better to use double hash not only one like this hash('sha',tostring(hash('md5',pass))) you got it?
    1 point
  10. you should allow to connect from outside to ur database by setting connection allow for root user as %
    1 point
  11. تم اضافة قيم مود حصري الصور : مع حفظ البينات الخاصة بك ايقاف الاغنية تسجيل التلقائي وتم اضافة فري روم جديد الصور : وتسريع تحميل السيرفر وازالة اللاق نهائيا وتم اضافة سيارات جديده وحديثه وتطوير مستمر وشكرا لكم
    1 point
  12. You need to trigger from the server to the client not the other way around. local name = "bailes_fornite" local IFP = engineLoadIFP( "bailes.ifp", name) if not IFP then outputChatBox( "Fallo al cargar el archivo 'bailes.ifp'" ) end function setAnimation(animationName) setPedAnimation(source, name, animationName) end addEvent("onAnim", true) addEventHandler("onAnim", root, setAnimation) function animar(plr, _, animationName) triggerClientEvent("onAnim", plr, animationName) end addCommandHandler("anim", animar)
    1 point
  13. المود حلو بس سهل مرة يعني فكرته fetchRemote ورابط يمديك تجيبو من موقع اللعبة الاصلي ضض اقصد قصة التشفير (جوهرة المود ) ا شغل حلو
    1 point
  14. Hello guys, I know how hard it is today to create a working MTA 0.5 server in linux environments, so I've created a docker image, which is very easy to use. It is on docker hub: https://hub.docker.com/r/andrasszell/mta05-server/ I've also started a dedicated server in EU Frankfurt: 18.195.8.184:2003 I'm also planning to create a simple web-based server browser, stay tuned.
    1 point
×
×
  • Create New...