Jump to content

Welcome to GTAPoliceMods

Welcome to GTAPoliceMods, like most online communities you must register to interact or post within our community, but don't worry this is a simple free process that requires minimal information for you to signup. Guests can NOT download files. This is to prevent bots and malicious users. If you wish to have these restrictions removed, you can create an account or signing in. By signing up you gain the ability to...

  • Download and upload unlimited files
  • Access to the Marketplace
  • Start new topics and reply to others
  • Upload Gallery Images
  • Subscribe to topics and forums to get email updates
  • Get your own profile page and make new friends
  • Send personal messages to other members.

Devin

December's Featured Creator - Christopher

Recommended Posts

CBNtolu.png

 

Every month we pick one featured creator and we interview them. We prefer variety in these articles and look to feature creators who are active within our community.  For the month of December we decided to pick a very dedicated and hardworking script creator @Christopher. He makes some amazing Fire & EMS FiveM scripts with the help of his team at Inferno Collections.

 

When did you first realize you wanted to be a content creator?

I suppose back in my ArmA 2 days; I played on a server called OurLifeRPG, it was an Island Life server where I spent all my time playing as EMS. What actually got me interested in Development had nothing to do with code, but instead the textures of the Ambulances. To cut a long story short, I spent a while learning how to use Photoshop, how to open ArmA 2 texture files, and in the end made a ton of new textures for the server, none of which were ever used, but it was a good learning experience for me.

 

https://www.youtube.com/watch?v=qX7ZVJP9sMc (Excuse the intro)

 

After that, I went on to join the Development team of another ArmA 2 server, called Tactical Combat Gaming, where I worked for them as a Texture Developer for a few months before the server closed.

 

https://www.youtube.com/watch?v=RxyueEV2uC0

 

Proceeding this, I purchased GTA V, got into FiveM, and started dabbling in scripting.

 

What would you say is the most interesting part of writing scripts?

Probably the learning experience and research that I get and have to do for new scripts. Each script brings a new challenge, and I learn something new every time I code. Because I don’t have any formal coding education, it can sometimes be a bit difficult to get by, but I manage, with the help of my IC Team Members, and good old’ Google. Another thing I tend to find is that by writing new scripts, I overcome problems in old scripts at the same time; 2 birds 1 stone kind of deal. For example. In the Pass Alarm resource, we had to find a way to play the turn off sound for the Pass Alarm, but we could not play the sound the same way we played the others, because the way other sounds worked, was that we played the sound though the NUI at 0% volume, then used a loop on the LUA Client script to set the volume based on the player’s distance from the sound. The problem with the off sound, was that the loop could not be used it in current state, as by playing the off sound, we also deleted the reference to the player’s Pass Alarm from the LUA Server script, as the player was finished with it. To overcome this, I implemented an Event Handler, which allowed us to play the sound in its entirety, then once it was finished playing, it would remove the reference from the LUA Server script, which meant the loop could be used. Discovering this method has allowed us to rewrite a proportion of the Fire Alarm script, as well as help us write some new code for it, which makes the script less reliant on NUI Messages from the Client LUA script, and instead does more of the work in the NUI file, which is faster and less intensive on the player.

 

What was it like when you first started getting into modding; Compared to now in today's age?

When I first started I had 0 idea what the difference between a Client and Server script was. Having a background in PHP (don’t bash me please) where everything is in the same script, it took me a while to understand that it was not a “one or the other” deal, you have to use both in order to achieve what you want, and while they have similarities, they are, and behave, very differently to each other. Once I got a handle on this, it opened a lot of doors for me, from a learning and understanding point of view. Nowadays, I spend a lot of time working on IC resources to make sure the load is spread between the players and the server, so the players get the smoothest experience possible.

 

What's the biggest change; What do you miss about starting off in modding?

Talking strictly about coding (i.e. ignoring the texture work), I think the biggest change for me is that I actually create resources these days, whereas when I first started I was more of a script kiddie, in that, I took other people’s resources and modified them to suit my own purposes. So back in the day if I wanted to create something, I would find a resource that sort of did what I wanted, then edited it, whereas nowadays, I just, you, write what I want and it does exactly what I want haha. I guess I miss the satisfaction of successfully changing part of someone else's script, because it use to take me a while to get a handle on what was going on, and understand how to make the required changes in the script to achieve what I wanted to achieve with the script.

 

What encourages and empowers your creative process and juices?

With new ideas for existing resources, things tend to just come to me randomly, and if I don’t write them down, I will forget them haha. As for new resources, I’m not too sure to be honest. The Pager and Fire Alarm resources where my own ideas, and I had them so long ago I could not tell you how I came up with them, however, IC’s more recent resources have all been suggestions from the community, which has been awesome. As for what encourages me to actually sit down and code, I have no idea. I’m either in the mood for it, and I can sit down and code for hours straight, or I’m not, and I will sit there and end up just procrastinating on YouTube.

 

If you couldn't create content? What would you personally do?

From experience I can tell you that I’d play a lot more games. Development is a time consuming process, if you converted that into playing hours instead, I’d be a very active gamer; however, I make the conscious decision to Develop instead, as it’s what I enjoy doing. Prior to taking time off from ArmA 2 to make textures, I played something unhealthy like 6 hours a day of it, I was very (arguable, too) active.

 

What's your favorite script that you've created or currently working on right now?

The Fire Alarm script on both accounts. The Fire Alarm script is very special to me because it combines over a year of my own work, and work from my IC Team Members, and it taught me a lot about FiveM and LUA in the process of creating it. It was also really well received in the community, which was the Cherry on top for me. We are currently working on a large update for the resource, which has been good fun to work on, you can see a sneak peek here:

 

https://streamable.com/dl28y

 

Do you have any suggestions to help anyone become a content creator? If so, what are they?

Just dive in. You’ll see a lot of adverts like “DO YOU WANT TO LEARN CODING??!! WATCH THIS VIDEO/READ THIS ARTICLE/CLICK THIS LINK/ETC.”, and to be honest with you, I never once sat down and watched any LUA tutorials, I just got my hands dirty and went from there. If you’re reading this saying something to yourself like “But I don’t understand it!”, honestly, just pick a simple resource off the FiveM forums, preferably one that is comment well, and just sit and read, you’ll be surprised to see that it’s just english; some of it is a little complex, and like in any language you don’t know you’ll need to look stuff up, but that’s called learning. Once you have a handle on what the script does, change it. Just mess with it and break it: see what you can do. Doesn’t matter if all you change is a couple of line, just play around with it.

 

What was one of the most surprising things you learned in writing your scripts? 

I’ll twist your question slightly and tell you the most annoying (and surprising) thing that I discovered while coding on one resource. So a little bit of back story, I had just started on the Pass Alarm script, and I was testing out a new (at the time) way of handling audio. In the past, we just spammed the NUI with NUI Messages telling it to play sounds over and over again, but I had an idea to manage the Audio from the LUA Server script, meaning instead of doing that, we ask the NUI to play the sound on a loop, then remove it when we don’t need it anymore. Simple idea in theory, and should have been a simple idea in practise, however, we ran into some issues, in a very unexpected place: the volume loop. The volume loop is a simple bit of code responsible for checking the distance between the player and the source of the Pass Alarm, and setting the volume relative to the player accordingly. At first glance when testing the resource alone, it appeared to be working, however, keep in-mind, I was the source of the sound, so the test was somewhat flawed. Once we got other testers involved though, we started seeing some really fucky behavour from the script that we just could not explain. Some people could not hear the Pass Alarm at all, some could hear it at full volume no matter where they were on the map, and it worked perfectly for some people. We were stumped for days, then, after some extensive (and painful) debugging, I discovered that the volume loop was not behaving in the same way on all clients, which at the time, made no sense whatsoever, as it was the same code, using the same data, on all the clients. After some further debugging, I discovered that the loop was not iterating through all the values correctly, and so I made the stupid mistake of assuming that the data must have been bad (as in, I assumed it was being malformed somewhere it should not have been), and assumed at this simple bit of code was working correctly. After several more days and no luck finding any issues with the data whatsoever, I did some research and was astonished: I’d found my issue. The operators I was using to find the length of the table (‘#’) was not the correct thing to use in that context. It turns out even though it is the fastest way to get the length of a table, it has some very strange behavior when working with key/value tables. If you want to know more about that, see here: http://lua-users.org/wiki/LengthsInLua. If you didn’t understand a word you just read, the basic idea is that it was not counting correctly, meaning it was not iterating correctly, meaning the volume was not being set correctly; mix that in with positive integer server IDs and I had discovered the reason the loop was broken. The sad part? One line was all that needed to be changed to fix the resource:

 

Not working:

if #PassAlarm.Alarms >= 1 then

 

Working:

local Count = 0

for _, _ in pairs(PassAlarm.Alarms) do

Count = Count + 1

end

 

if Count >= 1 then

 

So there you have it folks, one line of code had meant hours and hours of debugging and stress. Fun times.

 

We thank @Christopher and his team for all of his work and contribution to the community. You can tell by this article alone that he is a fun, outgoing guy and someone who's always willing to help others.

  • Like 3
  • Super Like 2

Staff Team - Community Affairs

Share this post


Link to post
Share on other sites

Great article! Great job on your amazing work @Christopher and good luck on your future mods for GTA 😄

  • Like 1

Kind regards,

Ray

 

The harder you work for something, the greater you'll feel when you achieve it.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...

Important Information

Please view the site: Terms of Use, Privacy Policy, and Guidelines. // IMPORTANT: We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.