Is this a good way to store vehicles mods?
#1

Hi. So I'm working on updating my vehicle system. I decided to a few things better this time. One of those is to change the way I store mods. I used the old fashion method of using 'mod1', 'mod2'... etc. To store vehicle components. I've read Vince's post On storing Vehicle components, And I think it is a great way to do so. But I'm experimenting with something and need your opinion on it. Here is the code:

PHP код:
new string[69], mods[17][5], count1;
format(stringsizeof(string), "12345678912345678912345678912345678912345678912345678912345678912345");
print(string);
for(new 
isizeof(mods); i++) {
    
strmid(mods[i], stringcount1count1+4);
    
printf("mod%i: %s"i,mods[i]);
    
count1 count1+4;

And here is the output:



The string is just an example, Instead of 1234, It would be the component id of the vehicle mod. I plan to use this as a string it self and use strval(); in the script. The code work okay, But I wanted to know some things.

Is this a good idea? What are the pros and cons of using this method?

Thanks
Reply


Messages In This Thread
Is this a good way to store vehicles mods? - by DarkSkull - 17.04.2017, 12:48
Re: Is this a good way to store vehicles mods? - by DarkSkull - 19.04.2017, 15:58
Re: Is this a good way to store vehicles mods? - by Marricio - 19.04.2017, 16:08
Re: Is this a good way to store vehicles mods? - by [WSF]ThA_Devil - 19.04.2017, 16:08
Re: Is this a good way to store vehicles mods? - by DarkSkull - 19.04.2017, 16:59

Forum Jump:


Users browsing this thread: 1 Guest(s)