SoiiNoob Posted March 7, 2012 Posted March 7, 2012 I want to set a weapon to a ped but don't work function pedLoad () s1 = createPed ( 33, 2348.8999023438, 2452.8000488281, 14.60000038147, 90) giveWeapon( s1, 31, 5, true ) setTimer( giveWeapon, 1000, 1, s1, 2) end addEventHandler('onClientResourceStart', getResourceRootElement(), pedLoad) ERROR: peds\peds.lua:52: attempt to call global 'giveWeapon' (a nil value)
Castillo Posted March 7, 2012 Posted March 7, 2012 Maybe because giveWeapon is a server side only function? function pedLoad () s1 = createPed ( 33, 2348.8999023438, 2452.8000488281, 14.60000038147, 90) setTimer( giveWeapon, 1000, 1, s1, 31, 5, true) end addEventHandler('onResourceStart', resourceRoot, pedLoad)
SoiiNoob Posted March 7, 2012 Author Posted March 7, 2012 <meta> <info name="peds" author=" " version="1.2" type="script"/> <script src="peds.lua" type="server" /> </meta>
Haze Posted March 7, 2012 Posted March 7, 2012 Solidsnake maybe he need to Call the giveweapon from Server side and Create ped on Client Side but it dose not make any sens to create both of Sids for 2 lien or 1
SoiiNoob Posted March 7, 2012 Author Posted March 7, 2012 maybe don't work bcuz this code in server-side I use setPedVoice setPedVoice(ped, "PED_TYPE_DISABLED") ERROR:peds\peds.lua:9: attemp to call global 'setPedVoice' (a nil value)
SoiiNoob Posted March 7, 2012 Author Posted March 7, 2012 I know but i want the peds with no voice, it can be possible?
Castillo Posted March 7, 2012 Posted March 7, 2012 You can trigger the ped to the client side and then set the voice?
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