E-mail Posted September 3, 2011 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 )
Castillo Posted September 3, 2011 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 ) San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
E-mail Posted September 3, 2011 Author Posted September 3, 2011 Help ! error in script see Please Fix Bad argument @ ,addCommandHandler ,[Expected function at argument 2 , got nill]
JR10 Posted September 3, 2011 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 ) Business System viewtopic.php?f=108&t=35797 Notepad++ Syntax Highlighting & Auto Completion viewtopic.php?f=91&t=76726 SQLite Tutorial viewtopic.php?f=148&t=38203
E-mail Posted September 3, 2011 Author Posted September 3, 2011 Thx For Help me JR10 see the bug lua :14:')expected near ,
SDK Posted September 3, 2011 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?) Learn Lua - Learn to script - GUI scripting Scripter tools - Find/fix errors yourself(!) Don't pm me for scripting help, keep it for the Scripting subforum!
E-mail Posted September 3, 2011 Author 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 ?
SDK Posted September 3, 2011 Posted September 3, 2011 Last line is missing a ")" Learn Lua - Learn to script - GUI scripting Scripter tools - Find/fix errors yourself(!) Don't pm me for scripting help, keep it for the Scripting subforum!
JR10 Posted September 3, 2011 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 ) Business System viewtopic.php?f=108&t=35797 Notepad++ Syntax Highlighting & Auto Completion viewtopic.php?f=91&t=76726 SQLite Tutorial viewtopic.php?f=148&t=38203
E-mail Posted September 3, 2011 Author Posted September 3, 2011 JR10 i need the Bullets auto reload Like this video https://www.youtube.com/watch?v=ECS0OdyZ ... re=related
JR10 Posted September 4, 2011 Posted September 4, 2011 The code you got, should do that, "quickreload", if I'm correct. Business System viewtopic.php?f=108&t=35797 Notepad++ Syntax Highlighting & Auto Completion viewtopic.php?f=91&t=76726 SQLite Tutorial viewtopic.php?f=148&t=38203
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