Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 25/10/21 in all areas

  1. Heya all, Are you looking for a freeroam server that has tons of custom mods and features, but don't want too many rules and restrictions? Then JohnFlower's Freeroam boredom just might be the right server for you! We have options like mapping and attaching for creative players, command line based so you actually can learn from it. We also have a lot of car mods and drifting opportunities to race yourself towards the finish! Not knowing what to do and got some spare time left? We got you covered with our in-game cinema and skins to start off an RPG. JohnFlower started the server in 2010, in collaboration with Cave Johnson. Since then the player base grew rapidly and the community became larger and larger. We basically have one rule when you are online and that's not to be a cu*t. We assume you know yourself what's okay and what not. Our staff members will act tho when things start to escalate. So, that's only a part of what our server can offer you, and if you are interested to check it out please copy the following link in your MTA: Server IP: mtasa://37.187.79.138:22003 Links: Join our Discord server: https://discord.gg/sC2DNRV Join our Steam group: https://steamcommunity.com/groups/JohnFlowers_Freeroam_boredom# Join our forum site: https://ilypetals.net/forum/ Join our IRC channel: https://www.irccloud.com/invite?channel=%23Flower.mta&hostname=irc6.rizon.net&port=6697&ssl=1 (If you use a different nickname than you use ingame, or if you are not affiliated with JohnFlower's server at all, ping @n0rt0x on IRC) Join our Facebook community: https://www.facebook.com/groups/318236555248301/ Regards, n0rt0x
    1 point
  2. Asking for help with dubious things isn't allowed on the MTA forums. Your post doesn't make it clear if you want to get the backdoors to nab them (make yourself safe) or use them for malicious purposes/publish them. So as we can't always make sure of intentions, we will simply not allow most forms of backdoor talk, let alone help requests of this type. If you wanted to do something legitimate, you should've gone to SAMP discussion forums anyways as no, that resource (like 99% else on the MTA forums) didn't work with pawn/SAMP. @kerzaks
    1 point
  3. Daca nu ai nicio experienta in Lua iti recomand acest tutorial: succes! PS: Incearca altceva, RP e destul imo.
    1 point
  4. Glad to be of help to you! I admit that I wanted to get you to look at your own code instead of me solving it outright for you. In my opinion a really good way to learn is to self-reflect based on your own accomplishments. If you would have posted the code I could have given my solution of course. But this is not required anymore since you have solved the issue.
    1 point
  5. MTASA Typescript I am developing utility packages for transpiling TypeScript into an MTASA-compatible Lua code. I would like to share that project to receive some suggestions and, I believe, to help someone in resource writing. Why Lua is not so good Classes. Lua does not support classes (syntax) from scratch. If you want to write OOP code with your own classes, you have to use metatables to implement class objects behavior. That's make the source code more complicated, than it could be. Hints (from your IDE). Lua is dynamic typed language, therefore, it's hard to determine, what the variable is and, hence, IDE cannot hint you function declarations, object methods and etc. MTASA Lua is still 5.1 (it is not developing). Lua, like any programming language, is developing, however MTASA core strongly linked to Lua 5.1. Why TypeScript There is TypeScriptToLua project. My project is based on TypeScriptToLua (I use it as a dependency). General purpose of TypeScriptToLua: convert (transpile) typescript code into Lua code. Thus, you can use TypeScript without modifying MTASA core. You are available to not use types in some parts of code (you are not restricted to use types everywhere). The TypeScript is being developed by Microsoft and, I believe, that TypeScript will be alive for several years. When to not use TypeScript (where to use Lua instead of TypeScript) 1. If you are not familiar with Lua or with scripting in general. 2. if you are writing simple script. Introduction Video I have made the video, where I describe Lua disadvantages, explain, why I have chosen TypeScript (and language transpiling) and write an example. Few word about mtasa-lua-types I have created this package to provide MTASA declarations in TypeScript. If you would like to create a resource, you haven't to install it manually, just use the boilerplate. Quick Start I have provided the tutorial here: https://github.com/mtasa-typescript/resource-boilerplate. So, you have to install NodeJS and download my boilerplate. And,... you are ready to code. If you have any ideas, issues or suggestions -- post them below, or in youtube comments, or in github issues ? Example code (from youtube video) import { Player } from 'mtasa-lua-types/types/mtasa/server/oop/Player'; import { mtasa } from 'mtasa-lua-types/types/mtasa/server'; interface GithubCommitApiResponse { commit: { message: string; } } mtasa.addCommandHandler('getcommit', function(player: Player, cmd: string) { mtasa.fetchRemote( 'https://api.github.com/repos/mtasa-typescript/mtasa-lua-types/commits?per_page=1', (data: string) => { const json = mtasa.fromJSON(data) as GithubCommitApiResponse mtasa.outputConsole(`The last commit message: ${json.commit.message}`) } ) }) Future plans - Github bot, that will crawl mtasa wiki and update mtasa-lua-types continuously - Add better hinting for `addEventHandler` function Links WebSite: https://mtasa-typescript.github.io/ GitHub MTASA TypeScript Projects: https://github.com/mtasa-typescript Resource Boilerplate: https://github.com/mtasa-typescript/resource-boilerplate Resource Example: https://github.com/mtasa-typescript/resource-example
    1 point
  6. That is because of screen ratio difference. This is how it works: 1920px | 1080px = 16:9 ratio 1920 / 16 = 120 120 * 9 = 1080! 2560px | 1080px = 21:9 ratio 2560 / 21 = 121,9047619047619‬.... 121,9047619047619‬.... * 9 = 1080 So if you apply your ratio to to a 1920x1080 resolution: 2560 / 16 = 160‬ 160‬ * 9 = 1440!!!!! You will be stretching the thing you want to scale. So in order to fix that problem. You want to go for the smallest dimensions which is the Y axis! 1920 x 1080 2560 x 1080 1080 x 1080 is a square which fits in both screens. The scale will be 1 for both resolutions. Squares have the ratio 1, which is a good normalizer. If the resolution was: 1280 × 720 720 / 1080 = 0,666666 scale The scale will go down because there are less pixels needed to cover up the same area. How does that looks like in the code: local sx_, sy_ = guiGetScreenSize() local sx, sy = sx_/2560, sy_/1080 local scale = sy -- I have defined this variable with the value of sy, so you do not confuse them later on. function teszt() dxDrawRectangle(140*sx, 200*sy, 700 * scale, 700 * scale,tocolor(0,0,0,165)) end addEventHandler("onClientRender",root,teszt) Golden rules (for keeping things in proportion? Position: X position = sx Y position = sy Scaling: X scaling = sy Y scaling = sy Offset from position: X offset = sy Y offset = sy Note: Sometimes for responsive layout you do not want to keep things in proportion. Like making the UI bigger for wider screens and show more elements, which you otherwise had to scroll to.
    1 point
  7. Salutări și bun venit pe comunitatea MTA! Ți-am mutat postarea în secțiunea dedicată românilor deoarece secțiunea în care ai postat inițial este destinată comunității internaționale, iar postările trebuie scrise în limba engleză. O bună bază de început pentru orice începător sunt următoarele: https://wiki.multitheftauto.com/wiki/Scripting_Introduction https://forum.multitheftauto.com/forum/123-tutorials/ https://forum.multitheftauto.com/topic/128089-sfaturi-tutoriale-etc-pentru-începător-lua/
    1 point
  8. I used to enter in that server in 2012-2013. But i don't know what happened, but the staff banned some countries including venezuela, and i remember in those years, watch a lot of players from latinamerica, that server used to have 30/40 players every day, but after banning some countries i think that server is a little bit dead. I enter for nostalgic because i remember some friends of my, like winter and mike. I like this sv and i enter every day.
    1 point
  9. resolvido, muito obrigado a todos script final function Pegar_Emprego (playerSource) local accName = getAccountName ( getPlayerAccount ( playerSource ) ) -- get his account name local Emprego = getElementData ( playerSource, "Emprego" ) if Emprego == "Uber" then aclGroupAddObject (aclGetGroup("UBER"), "user."..accName) outputChatBox ("Parabéns! Agora você está trabalhando de UBER!", playerSource, 0, 255, 0,true) end end addEvent("DNL:Pegar_Emprego", true) addEventHandler("DNL:Pegar_Emprego", root, Pegar_Emprego) function Sair_ACL (playerSource) local accName = getAccountName ( getPlayerAccount ( playerSource ) ) -- get his account name if isObjectInACLGroup ("user."..accName, aclGetGroup ( "UBER" ) ) then -- Does he have access to Admin functions? aclGroupRemoveObject (aclGetGroup("UBER"), "user."..accName) outputChatBox ("Você não está trabalhando de UBER!", playerSource, 0, 255, 0,true) end end addEvent("DNL:Pedir_Demissao", true) addEventHandler("DNL:Pedir_Demissao", root, Sair_ACL)
    1 point
  10. Isso é normal quando você coloca muitos objetos próximos (sobrecarrega o client) e também quando você remove muitos objetos originais do mapa próximos (objetos removidos também sobrecarregam) Talvez isso resolva: setOcclusionsEnabled(false)
    1 point
×
×
  • Create New...