Jump to content

Problem giveWeapon to Peds.


capitanazop

Recommended Posts

defendPedPos = {
{2259.703125, 2257.517578125, 10.8203125, 107.84619140625,137}, --spot11
{2257.4775390625, 2253.1962890625, 10.8203125, 107.84619140625,134}, -- spot12
{2243.3662109375, 2252.1337890625, 10.8203125, 287.84893798828,200}, -- spot13
{2238.8154296875, 2261.0615234375, 10.8203125, 347.45617675781,213}, -- spot14
{2249.0517578125, 2271.3203125, 10.8203125, 67.569702148438,230}, -- spot15
{2371.046875, 1981.0537109375, 10.8203125, 165.81640625,238}, -- spot21
{2370.11328125, 1979.275390625, 10.8203125, 89.987640380859,237}, -- spot22
{2366.5205078125, 1980.3154296875, 10.8203125, 114.1139831543,243}, -- spot23
{2364.9931640625, 1983.5986328125, 10.828125, 98.760345458984,241}, -- spot24
{2367.0859375, 1985.16015625, 10.828125, 48.315856933594,242}, -- spot 25
{2516.7919921875, 2809.396484375, 10.8203125, 163.64660644531,247}, -- spot31
{2532.6630859375, 2810.353515625, 10.8203125, 166.12957763672,248}, -- spot32
{2503.6767578125, 2777.73046875, 10.8203125, 163.93225097656,254}, -- spot33
{2515.3583984375, 2822.62890625, 10.8203125, 184.30120849609,247}, -- spot34
{2525.0732421875, 2831.578125, 10.8203125, 179.91760253906,254} -- spot35
}
 
 
 
function onResourceStart()
for k, v in ipairs( defendPedPos ) do
local ped = createPed ( v[4], v[1], v[2], v[3] )
setTimer( setElementID,3000,1, ped, "defendPed" )
setTimer( createBlipAttachedTo, 1000, 1, ped, 1)
if k <= 5 then
setTimer( giveWeapon, 1000, 1, ped, 22, 99999, true )
setTimer( setPedWeaponSlot, 4000, 1, ped, 2)
elseif k > 5 and k <= 10 then
setTimer( giveWeapon, 1000, 1, ped, 28, 99999, true )
setTimer( setPedWeaponSlot, 3000, 1, ped, 4)
elseif k > 10 then
setTimer( giveWeapon, 1000, 1, ped, 27, 99999, false )
setTimer( setPedWeaponSlot, 3000, 1, ped, 3)
end
end
end

i tried with much timers and dont work, i dont get any error or warning :S what can be do?

Link to comment

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