[FilterScript] Tune System
#21

It would be great if you could call OnVehiclePaintjob and OnVehicleMod callbacks. Some vehicles system using those callbacks to update vehicle's variables, in that case your modding won't pass through their vehicle system, I don't know if calling them will fix this case since your release is a filterscript but if it does it would be good to get added.

Great release tho.
Reply
#22

Quote:
Originally Posted by Konstantinos
Посмотреть сообщение
Few of the last updates:
  • SQLite version was added.
  • It includes a created .db file so it will be easier for use (SQLite version).
  • "Lamps" and "Front/Rear Bullbar" were renamed to "Lights" and "Front/Rear Bullbars" respectively.
  • Indexes were added to tables structure to both MySQL and SQLite .sql files.
---

I'm planning to add two more versions that will basically be the initial version with an extra feature:
  1. neon
  2. prices (suitable for RP servers)
The next update will take a bit longer since University starts this week and there are more files to update for both MySQL and SQLite versions (plus the .sql files).
Well Konstantinos,

I know its thread is not for that porpose but i want ask and suggest something to you.

Create an anti cheat for mod hack, you could include on this the anti cheat.

And for the "punishment" of the player using it just remove the "bad/hack mod" from the car.

I know my english is not good and i sorry for that i hope you understand what i want.

Hugs.
Reply
#23

Quote:
Originally Posted by PT
Посмотреть сообщение
Well Konstantinos,

I know its thread is not for that porpose but i want ask and suggest something to you.

Create an anti cheat for mod hack, you could include on this the anti cheat.

And for the "punishment" of the player using it just remove the "bad/hack mod" from the car.

I know my english is not good and i sorry for that i hope you understand what i want.

Hugs.
Invalid mod exploit has been fixed on samp latest version (0.3.7)
Reply
#24

Quote:
Originally Posted by SecretBoss
Посмотреть сообщение
Invalid mod exploit has been fixed on samp latest version (0.3.7)
Is not for crash players but yes to simple apply mods on cars..
Reply
#25

Quote:
Originally Posted by SecretBoss
Посмотреть сообщение
It would be great if you could call OnVehiclePaintjob and OnVehicleMod callbacks. Some vehicles system using those callbacks to update vehicle's variables, in that case your modding won't pass through their vehicle system, I don't know if calling them will fix this case since your release is a filterscript but if it does it would be good to get added.

Great release tho.
I guess I could add a configuration that is disabled by default and enabling it would call these two callbacks.

If a player selects to remove the hydraulics they have installed to their vehicle, there won't be any way to know it in other scripts though. Those vehicle systems should have used a loop + GetVehicleComponentInSlot function.
Quote:
Originally Posted by PT
Посмотреть сообщение
Create an anti cheat for mod hack, you could include on this the anti cheat.

And for the "punishment" of the player using it just remove the "bad/hack mod" from the car.
OnVehicleMod callback is not called when AddVehicleComponent function is used. If the player's interior is 0, it is a cheat and you can return 0 to the callback to desync the mod.

When I'm going to add what SecretBoss said and if it will be enabled, the method described above won't work.
Reply
#26

Very nice work, Konstantinos! I might actually use this in my own server, since it's a very nice system and i have a bunch of other things to get done. T
Reply
#27

Great work! I love the fact that it's very well optimized (A lot might not care about that, but I appreciate it when I see it)

[I need to spread some reputation around before giving it to you...]
Reply
#28

Thanks Stinged, that's what I was aiming for!

A little update on the extra features I had mentioned by the way. There are few problems that cannot be solved unless people include certain things on their own.

- prices on components/paintjob: using server-side money will make it completely unaffected.
[CallRemoteFunction should be used for the scripts to "communicate" each other.]

- neon in cars: destroying a vehicle with neon installed in other scripts won't destroy the two objects.
[Hooking DestroyVehicle to call a callback such as OnVehicleDestroy would be the only solution.]
Reply
#29

Good job Man
Reply
#30

nice!
Reply
#31

+Rep
Reply
#32

Nice script, I'd be really grateful if you explain how do the bits from vehicle_model_parts work. I remember ****** or Slice mentioned it a long time ago, but I can't find the thread anymore.

I'm interested on the next query also:
PHP код:
mysql_format(g_SQLQuerysizeof Query,
"SELECT " \
"IF(parts & 1 <> 0,'Exhausts','')," \
"IF(parts & 2 <> 0,'Hood','')," \
"IF(parts & 4 <> 0,'Hydraulics','')," \
"IF(parts & 8 <> 0,'Lights','')," \
"IF(parts & 16 <> 0,'Roof','')," \
"IF(parts & 32 <> 0,'Side Skirts','')," \
"IF(parts & 64 <> 0,'Spoilers','')," \
"IF(parts & 128 <> 0,'Vents','')," \
"IF(parts & 256 <> 0,'Wheels','') " \
"FROM vehicle_model_parts WHERE modelid=%i"modelid); 
By the way, why mysql_tquery instead of mysql_pquery? Supposing two players access the menu at once I guess multithreading would be okay here.
Reply
#33

Using bitwise AND to parts and the special number (power of two) sets all bits to 0 except the one references to the special number. The result will be either the special number or 0 if it hasn't been set (no category). Each category represents a special number which I summed them (what is stored in parts) all up myself.

So basically if what returns is not 0 (<> means not equal) then the category exists. IF() function works like:
pawn Код:
IF(expression1,expression2,expression3)
If expression1 is TRUE then expression2 is returned, otherwise expression3. If it doesn't exist, it is empty which is skipped later when retrieving.

mysql_pquery is faster, yes but it can also be slower in certain cases. Another reason is: http://forum.sa-mp.com/showpost.php?...05&postcount=8
Reply
#34

Sweet! That's a smart way of doing it. Did you go in-game to see what categories supports each vehicle? That's crazy. This a very useful script, I'll try to edit it and get a clickable version with model previews.

I guess mysql_pquery would be better for INSERT/UPDATE queries then, as they don't have to deal with huge results...

Thanks a lot Konstantinos.
Reply
#35

Dope
Reply
#36

Quote:
Originally Posted by RIDE2DAY
Посмотреть сообщение
Sweet! That's a smart way of doing it. Did you go in-game to see what categories supports each vehicle? That's crazy. This a very useful script, I'll try to edit it and get a clickable version with model previews.

I guess mysql_pquery would be better for INSERT/UPDATE queries then, as they don't have to deal with huge results...

Thanks a lot Konstantinos.
Yeah, I spawned all vehicles and tried a component of each category to them (ignoring planes, boats, bikes, trailers etc). After getting my client crashed 7 times, I decided to install an anti-crash so I can finish it in 2-3 hours.

Model preview of each component? That'd be a great idea and I'd love to see it!

Quote:
Originally Posted by Eoussama
Посмотреть сообщение
Dope
Thanks.
Reply
#37

Great work!

I would be learning things the way you did from this script
I could implement this in my script too for VIP's

What's cool is that it's already one MySQL version r40+
Reply
#38

Good job man! Really it is very good.
Reply
#39

Quote:
Originally Posted by AroseKhanNiazi
Посмотреть сообщение
Great work!

I would be learning things the way you did from this script
I could implement this in my script too for VIP's

What's cool is that it's already one MySQL version r40+
Thank you and hopefully you do, it is nice to know that people actually want to use this!

There will always be two versions for the MySQL so everyone's happy.

Quote:
Originally Posted by FikShun
Посмотреть сообщение
Good job man! Really it is very good.
Thanks.

----

I've got two more versions in which I think a branch for each one of them would be a good idea (for the neon and prices). The only thing I need to do is find what vehicles shouldn't support neon (planes, aircrafts etc).

I will add what is needed to be included in other scripts so neon will be destroyed for vehicles that destroyed not in this script and about server-side money.
Reply
#40

Nice work
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)