i actually need 1 for a respawning weapons right now so you can use this as a template
spawned = {}
spawn_delay = {}
timer_started = {}
spin_speed = 0
pressed = 0
function gun_init(e)
spawned[e] = -1
--time til weapon will appear (before and after being picked up), in seconds
spawn_delay[e] = 600
spawn_delay[e] = spawn_delay[e] * 1000
end
function gun_main(e)
if spawned[e] == -1 then
Hide(e)
CollisionOff(e)
StartTimer(e)
spawned[e] = 0
elseif spawned[e] == 0 then
if GetTimer(e) > spawn_delay[e] then
Show(e)
spawned[e] = 1
end
elseif spawned[e] == 1 then
RotateY(e,spin_speed)
if GetPlayerDistance(e) < 70 then
Prompt("Pick up?")
if g_KeyPressE == 1 and pressed == 0 then
pressed = 1
AddPlayerWeapon(e)
spawned[e] = -1
end
end
end
if g_KeyPressE == 0 then
pressed = 0
end
end
life\'s one big game
windows vista ultimate
i5 @3.3ghz, 4gb ram, AMD R9 200 series , directx 11