redhot69
amongus
addHook("PlayerThink", function(p)
if not p.mo or p.mo.skin ~= "sonic" then return end
if p.shotCooldown == nil then
p.shotCooldown = 0
end
if p.shotCooldown == 0 and (p.cmd.buttons & BT_CUSTOM1) then
local x = p.mo.x
local y = p.mo.y
local z = p.mo.z + 20*FRACUNIT
local proj = P_SpawnMobj(x, y, z, MT_FIREBALL)
if proj then
proj.angle = p.mo.angle
proj.target = p.mo
P_InstaThrust(proj, proj.angle, 20*FRACUNIT)
proj.flags = $ & ~MF_BOUNCE
end
p.shotCooldown = 1
p.lastShotTime = leveltime
end
if p.shotCooldown > 0 and leveltime - p.lastShotTime >= 1 then
p.shotCooldown = 0
end
end)
im trying for a lot of time now and nothing works
if not p.mo or p.mo.skin ~= "sonic" then return end
if p.shotCooldown == nil then
p.shotCooldown = 0
end
if p.shotCooldown == 0 and (p.cmd.buttons & BT_CUSTOM1) then
local x = p.mo.x
local y = p.mo.y
local z = p.mo.z + 20*FRACUNIT
local proj = P_SpawnMobj(x, y, z, MT_FIREBALL)
if proj then
proj.angle = p.mo.angle
proj.target = p.mo
P_InstaThrust(proj, proj.angle, 20*FRACUNIT)
proj.flags = $ & ~MF_BOUNCE
end
p.shotCooldown = 1
p.lastShotTime = leveltime
end
if p.shotCooldown > 0 and leveltime - p.lastShotTime >= 1 then
p.shotCooldown = 0
end
end)
im trying for a lot of time now and nothing works