Jump to content

Race user Panel Problem


\\Virus//

Recommended Posts

Hey! , sorry for wasting you time guys, but i'm having a problem with a mod that i downloaded for my DestructionDerby server, is a user panel, when i tested it i saw one issue, when a donator (in donator tab) choose a wheel, the other players can't see the wheel that the donator are using, even the normal ones from the game. i dont have a lot of knowledge in scripting (i only know the very basics) and i tryed to find the error by myself by 3 days, and nothing. i dont know what's happening, if you guys can help me, i will be os much gratefull. i will leave the link for download so you guys can test and see (u need another player to see the issue)

https://drive.google.com/file/d/1N26FW1hBZ1ErkiAoJSrxpMIYwnXTkRRU/view?usp=sharing

I Hope that you guys can help me out! ❤️

Link to comment
3 hours ago, \\Virus// said:

Hey! , sorry for wasting you time guys, but i'm having a problem with a mod that i downloaded for my DestructionDerby server, is a user panel, when i tested it i saw one issue, when a donator (in donator tab) choose a wheel, the other players can't see the wheel that the donator are using, even the normal ones from the game. i dont have a lot of knowledge in scripting (i only know the very basics) and i tryed to find the error by myself by 3 days, and nothing. i dont know what's happening, if you guys can help me, i will be os much gratefull. i will leave the link for download so you guys can test and see (u need another player to see the issue)

https://drive.google.com/file/d/1N26FW1hBZ1ErkiAoJSrxpMIYwnXTkRRU/view?usp=sharing

I Hope that you guys can help me out! ❤️

Hello \\Virus//,

I tried looking into your resource but the resource contains too many Lua files and that is making it too difficult. Are you sure that the issue is contained within that resource even? Have you tried contacting the author of the resource to check for this issue? Maybe this issue is supposed to be by-design?

Link to comment

Hey The_GTA, Thanks for The Help, And sorry for being Dumb, the .Lua files that manage the wheel change is  on the "donator" Folder

"Userpanel/files/data/donator"

and there have the Donator_c.Lua and the Donator_s.Lua

and in the Wheels folder    "Userpanel/files/data/donator/wheels",    there have the wheels_c.Lua and wheels_s.Lua

these .Lua files are the unique files that manage's wheel change. But i checked in another Userpanel(that is ugly as hell)  the script runs an admin command to change the wheels (i dont know if scripts can do that),  so everybody can see the modified wheels that is on the car, but i dont know, why the userpanel that i'm using can't do that. it change the wheels, but only for the person that is playing, the other players can't see it and i was hunting that issue by 3 days and i'm about to be Crazy by now XD

 

and i dont know if this issue is by "design" , i won't believe it is, this has to be a bug or a script fail i dont know, i'm calling help cuz i spend too much time chasing that issue and nothing ;-;

Edited by \\Virus//
forgot to say some things
Link to comment
40 minutes ago, \\Virus// said:

Hey The_GTA, Thanks for The Help, And sorry for being Dumb, the .Lua files that manage the wheel change is  on the "donator" Folder

"Userpanel/files/data/donator"

and there have the Donator_c.Lua and the Donator_s.Lua

and in the Wheels folder    "Userpanel/files/data/donator/wheels",    there have the wheels_c.Lua and wheels_s.Lua

these .Lua files are the unique files that manage's wheel change. But i checked in another Userpanel(that is ugly as hell)  the script runs an admin command to change the wheels (i dont know if scripts can do that),  so everybody can see the modified wheels that is on the car, but i dont know, why the userpanel that i'm using can't do that. it change the wheels, but only for the person that is playing, the other players can't see it and i was hunting that issue by 3 days and i'm about to be Crazy by now XD

 

and i dont know if this issue is by "design" , i won't believe it is, this has to be a bug or a script fail i dont know, i'm calling help cuz i spend too much time chasing that issue and nothing ;-;

I looked into your script and indeed there is no code to synchronize the wheels across game clients. This means that your script was created to display custom wheels only on your local client, not the whole game server. I am really sorry but this is fact.

In order to add wheel synchronization you have to perform big changes to the script. For starters you have to share the donation information across all game clients and with that the wheel picks of said donators. Then you can use the "loadWheel" function; for example it was used in line 257, file donator_c.Lua

loadWheel(wheels[wheelManager.id][2],wheels[wheelManager.id][3],wheels[wheelManager.id][4])

The functions that you are going to need are the MTA event functions, like triggerServerEvent, triggerClientEvent, addEvent, addEventHandler, etc.

Edited by The_GTA
Link to comment
1 minute ago, \\Virus// said:

thank you very much man ❤️ much love ❤️ ❤️

No problem! I hope that you get it sorted out. Hopefully you were not scammed by some guy who promised you a feature. ;) 

If you want scripting advice for implementing it yourself feel free to ask in this thread. Then I will guide you.

  • Like 1
Link to comment

man, now my head is broken ?, as i said in the start i only know the very basics like show a message in the screen , i will really need help in that. but, how can i share the donation information across clients, and trigger a server event?. for you can be easy to solve  but for me it is an alian language ?

 

i don't want to abuse of your generosity, so if u are busy or can't help i will understand and try to learn and solve myself, it will take a loooooong time but i think it will work i guess ? ?

  • Like 1
Link to comment
48 minutes ago, \\Virus// said:

but, how can i share the donation information across clients, and trigger a server event?

I have not looked into the script much but you have to know who is eligible for the special wheels and then store that in a table on the server. Then also store what wheels they picked. I mentioned the event functions before.

It really is not easy to get into, especially since that script is so huge and honestly not very well documented. I don't think that the difficulty is in the Lua language, but rather the questionable design of the code that you are dealing with.

  • Like 1
Link to comment

i will try to figure out how to do a new command to update in the server side, and try to share the information with the saving script that i have, Thank you so much by your help, God Bless you, and if i have any problem running the code i will notify here ❤️

  • Like 1
Link to comment


hey The_GTA, i decided to delete the userpanel mod, and make one by myself.  there was no chance that i would fix the problem, as i said i dont know a lot of scripting but i will search for tutorials and do it slowly, i found a program called Visual Studio Code that has a MTA SA Lua Code extension wich helps a lot XD, but thanks again man ❤️ i hope that u can help me with the scripts if i see any problem im the process ❤️

  • Like 1
Link to comment
4 hours ago, \\Virus// said:


hey The_GTA, i decided to delete the userpanel mod, and make one by myself.  there was no chance that i would fix the problem, as i said i dont know a lot of scripting but i will search for tutorials and do it slowly, i found a program called Visual Studio Code that has a MTA SA Lua Code extension wich helps a lot XD, but thanks again man ❤️ i hope that u can help me with the scripts if i see any problem im the process ❤️

Hey \\Virus//,

sure come to this forum with a new topic and I will answer all of your questions. :) 

Glad to hear that you are using Visual Studio Code. I have tried it once and it is a nice editor. But since it has a MTA SA Lua Code extension, that is even greater than my personal pick which is SciTE! Feel free to tell us about your experience with that editor ;) 

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...