E-mail Posted September 3, 2011 Share Posted September 3, 2011 Hi all iam makeing Glith script for BaseMode Players! i have error in script [ClientSide] function xxx ( thePlayer, commandName ) giveWeapon ( thePlayer, 2, 200 ) setPedWeaponSlot ( thePlayer, math.random ( 2, 200) ) end addCommandHandler ( "giveweapons", givePlayerWeapons ) i want the Ped weapon Degal and 200 Amoo [serverSide] function resourceStart () setGlitchEnabled ( "quickreload", true ) setGlitchEnabled ( "fastmove", true ) setGlitchEnabled ( "fastfire", true ) setGlitchEnabled ( "crouchbug", true ) end addEventHandler ( "onResourceStart", getResourceRootElement ( ), resourceStart ) Link to comment
Castillo Posted September 3, 2011 Share Posted September 3, 2011 giveWeapon is only server side so, server side: function xxx ( thePlayer, commandName ) giveWeapon ( thePlayer, 2, 200 ) setPedWeaponSlot ( thePlayer, math.random ( 2, 200) ) end addCommandHandler ( "giveweapons", givePlayerWeapons ) function resourceStart () setGlitchEnabled ( "quickreload", true ) setGlitchEnabled ( "fastmove", true ) setGlitchEnabled ( "fastfire", true ) setGlitchEnabled ( "crouchbug", true ) end addEventHandler ( "onResourceStart", getResourceRootElement ( ), resourceStart ) Link to comment
E-mail Posted September 3, 2011 Author Share Posted September 3, 2011 Help ! error in script see Please Fix Bad argument @ ,addCommandHandler ,[Expected function at argument 2 , got nill] Link to comment
JR10 Posted September 3, 2011 Share Posted September 3, 2011 function givePlayerWeapons ( thePlayer, commandName ) giveWeapon ( thePlayer, 2, 200 ) setPedWeaponSlot ( thePlayer, math.random ( 2, 200) ) end addCommandHandler ( "giveweapons", givePlayerWeapons ) function resourceStart () setGlitchEnabled ( "quickreload", true ) setGlitchEnabled ( "fastmove", true ) setGlitchEnabled ( "fastfire", true ) setGlitchEnabled ( "crouchbug", true ) end addEventHandler ( "onResourceStart", getResourceRootElement ( ), resourceStart ) Link to comment
E-mail Posted September 3, 2011 Author Share Posted September 3, 2011 Thx For Help me JR10 see the bug lua :14:')expected near , Link to comment
SDK Posted September 3, 2011 Share Posted September 3, 2011 Are you sure you copy-pasted it correctly? Cause it should be correct, check the last line in the file. (And why math.random(2,200) in setPedWeaponSlot?) Link to comment
E-mail Posted September 3, 2011 Author Share Posted September 3, 2011 see function givePlayerWeapons ( thePlayer, commandName ) giveWeapon ( thePlayer, 2, 200 ) setPedWeaponSlot ( thePlayer, math.random ( 2, 200) ) end addCommandHandler ( "giveweapons", givePlayerWeapons ) function resourceStart () setGlitchEnabled ( "quickreload", true ) setGlitchEnabled ( "fastmove", true ) setGlitchEnabled ( "fastfire", true ) setGlitchEnabled ( "crouchbug", true ) end addEventHandler ( "onResourceStart", getResourceRootElement ( ), resourceStart ? Link to comment
SDK Posted September 3, 2011 Share Posted September 3, 2011 Last line is missing a ")" Link to comment
JR10 Posted September 3, 2011 Share Posted September 3, 2011 The ) at the end of file. Also WTH is setPedWeaponSlot ( thePlayer, math.random ( 2, 200) ) function givePlayerWeapons ( thePlayer, commandName ) giveWeapon ( thePlayer, 2, 200 ) end addCommandHandler ( "giveweapons", givePlayerWeapons ) function resourceStart () setGlitchEnabled ( "quickreload", true ) setGlitchEnabled ( "fastmove", true ) setGlitchEnabled ( "fastfire", true ) setGlitchEnabled ( "crouchbug", true ) end addEventHandler ( "onResourceStart", getResourceRootElement ( ), resourceStart ) Link to comment
E-mail Posted September 3, 2011 Author Share Posted September 3, 2011 JR10 i need the Bullets auto reload Like this video https://www.youtube.com/watch?v=ECS0OdyZ ... re=related Link to comment
JR10 Posted September 4, 2011 Share Posted September 4, 2011 The code you got, should do that, "quickreload", if I'm correct. 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