Jump to content

hello its me again i have a problem something to do with cycle function


killbot5555678
 Share

Recommended Posts

something to do with this

 

 

this is line 33 ------> function Script:CycleWeapon(direction)

local n,weapon

local foundindex=false

local prevweapon

 

if direction==1 then

for n,weapon in pairs(self.weapons) do

if foundindex then

self:SelectWeapon(n)

return

end

if self.currentweaponindex==n then

foundindex=true

end

end

if foundindex then

for n,weapon in pairs(self.weapons) do

self:SelectWeapon(n)

return

end

end

else

for n,weapon in pairs(self.weapons) do

if prevweapon then

if self.currentweaponindex==n then

self:SelectWeapon(prevweapon)

return

end

end

prevweapon=n

end

if prevweapon then

self:SelectWeapon(prevweapon)

end

end

end

 

 

 

Line 33 mainly

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...