Jump to content

giveWeapon problem


SoiiNoob

Recommended Posts

Posted

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)

Posted

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) 

Posted

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 :D

Posted

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)

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