capitanazop Posted December 1, 2009 Share Posted December 1, 2009 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 what can be do? Link to comment
robhol Posted December 1, 2009 Share Posted December 1, 2009 (edited) Move along fellas, nothing to see here. Edited December 1, 2009 by Guest Link to comment
capitanazop Posted December 1, 2009 Author Share Posted December 1, 2009 1 comment, Read All. Link to comment
CallumD Posted December 1, 2009 Share Posted December 1, 2009 The function isn't triggered. Try adding this to the bottom of the script: addEventHandler ( "onResourceStart", getResourceRootElement(getThisResource()), onResourceStart ) Link to comment
eAi Posted December 1, 2009 Share Posted December 1, 2009 Don't define positions in scripts, use map files, that's the point of them. Link to comment
50p Posted December 1, 2009 Share Posted December 1, 2009 Don't define positions in scripts, use map files, that's the point of them. =================================================================== Besides, your ped model ID is located at index 5 not 4. Link to comment
capitanazop Posted December 1, 2009 Author Share Posted December 1, 2009 sorry for dont post it becouse are comented. addEventHandler ( "onResourceStart", getResourceRootElement(getThisResource()), onResourceStart ) EDIT: Thanks 50p i fix it local ped = createPed ( v[5], v[1], v[2], v[3] ) 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