Scripting Posted March 20, 2012 Share Posted March 20, 2012 Hi People, I m making this comde for damage Ak-47 ,the problem the damage don t set to 30 in the player dead ,pls fix problem and thx server-side: addEventHandler ( "onClientPlayerWeaponFire",localPlayer,am) function am () setWeaponProperty(30, "pro", "damage", 999) end addEventHandler("onPlayerWasted", getRootElement(),re) function re () removeEventHandler("onClientPlayerWeaponFire", localPlayer,am) end Link to comment
Kenix Posted March 20, 2012 Share Posted March 20, 2012 (edited) setWeaponProperty is server side function. But you use in client side And also event onPlayerWasted is server side event, but you use in client side. Your code full wrong. Also you need attach handler to function at the bottom of the script. You need understand: Server side events ( onPlayerWasted, onPlayerSpawn, ... ) use only in server side. Client side events ( onClientPlayerWasted, onClientPlayerSpawn, ... ) use only in client side. Same thing with the functions ( There are exceptions, where you can use on the server and the client too ). https://wiki.multitheftauto.com/wiki/Scr ... troduction Edited March 20, 2012 by Guest Link to comment
TAPL Posted March 20, 2012 Share Posted March 20, 2012 the script is totally mess, and you are using (client + server side) events and function that won't work also you can't use setWeaponProperty for one player, it's for skill only Link to comment
Scripting Posted March 21, 2012 Author Share Posted March 21, 2012 how i can use setWeaponProperty for one player?? Link to comment
Absence2 Posted March 21, 2012 Share Posted March 21, 2012 function manUp () setWeaponProperty(30, "pro", "damage", 999) end addCommandHandler ( 'hitman', manUp ) Link to comment
Scripting Posted March 21, 2012 Author Share Posted March 21, 2012 This not my want,if i use this command all players have the weapon (31) damage 999, i want set just the player one command it have this Link to comment
GanJaRuleZ Posted March 21, 2012 Share Posted March 21, 2012 It's server side , you cannot do that. 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