Jump to content

setWeaponProperty


Raxzen

Recommended Posts

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

@RaxzenThe wiki says:

spacer.png

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:

spacer.png

... 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 by FernandoMTA
  • Like 1
Link to comment
On 13/6/2022 at 5:19, FernandoMTA said:

@RaxzenEl wiki dice:

espaciador.png

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:

espaciador.png

... 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

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...