Raxzen Posted June 13, 2022 Share Posted June 13, 2022 Hello everyone I have a question I'm practicing scripting and trying to do something "simple", which led to a lot of questions I saw the wiki, the setWeaponProperty function. How is it applied in client? I tried to do something simple with the SPAZ, but when I run the script locally the result is that "excpected weapon at argument [1, got number (27) Can someone be kind to explain to me how it works on client-side, thanks Link to comment
FernandoMTA Posted June 13, 2022 Share Posted June 13, 2022 (edited) @RaxzenThe wiki says: Custom weapons are weapons you create with https://wiki.multitheftauto.com/wiki/CreateWeapon that can't be held by a player/ped, and are in the world. What you would be looking for is a clientside version of this to set weapon ID properties for the client only, and not the whole server: ... but sadly it doesn't exist. There are some suggestions related to weapon properties, skill levels, etc in the Bug tracker here, which you can explore. I remember seeing a suggestion saying that setWeaponProperty should be able to take a player argument so it only applies to a certain player. I wish this was implemented already Edited June 13, 2022 by FernandoMTA 1 Link to comment
Raxzen Posted June 14, 2022 Author Share Posted June 14, 2022 On 13/6/2022 at 5:19, FernandoMTA said: @RaxzenEl wiki dice: Las armas personalizadas son armas que creas con https://wiki.multitheftauto.com/wiki/CreateWeapon que no pueden ser sujetadas por un jugador/ped, y están en el mundo. Lo que estaría buscando es una versión del lado del cliente de esto para establecer las propiedades de identificación del arma solo para el cliente, y no para todo el servidor: ... pero lamentablemente no existe. Hay algunas sugerencias relacionadas con las propiedades del arma, los niveles de habilidad, etc. en el rastreador de errores aquí , que puede explorar. Recuerdo haber visto una sugerencia que decía que setWeaponProperty debería poder tomar el argumento de un jugador para que solo se aplique a un jugador determinado. Ojalá esto ya se haya implementado Thank you, very interesting post I tried to do it in something simple, an "onClientMarkerHit", but I see that there are many variants to consider, anyway thanks for the help Link to comment
FernandoMTA Posted June 14, 2022 Share Posted June 14, 2022 No worries. You can always change the SPAZ properties serverside to improve the weapon Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now