Apo Posted November 20, 2016 Share Posted November 20, 2016 hi guys I can not move when Shooting or aiming Link to comment
LoPollo Posted November 20, 2016 Share Posted November 20, 2016 (edited) Provide more informations, we can't read in your mind. Tell us the errors/warnings if there are, tell us if the server is a default server and if there's a resource causing this. Also give a title that represents the issue, "help" is way too much generic Edited November 20, 2016 by LoPollo 1 Link to comment
Apo Posted November 20, 2016 Author Share Posted November 20, 2016 (edited) my warning line (setWeaponProperty( id , "std", "maximum_clip_ammo", ammo)) WARNING:weapon.lua:40: Expected number, got non-convertible string. This warning may be an error in future versions. WARNING: weapon.lua:40: Expected number, got non-convertible string. This warning may be an error in future versions. [DUP x6] function getAmmoPerClip(id) if id == 0 then return tostring(get( getResourceName( getThisResource( ) ).. '.fist' )) elseif id == 1 then return tostring(get( getResourceName( getThisResource( ) ).. '.brassknuckle' )) elseif id == 2 then return tostring(get( getResourceName( getThisResource( ) ).. '.golfclub' )) elseif id == 3 then return tostring(get( getResourceName( getThisResource( ) ).. '.nightstick' )) elseif id == 4 then return tostring(get( getResourceName( getThisResource( ) ).. '.knife' )) elseif id == 5 then return tostring(get( getResourceName( getThisResource( ) ).. '.bat' )) elseif id == 6 then return tostring(get( getResourceName( getThisResource( ) ).. '.shovel' )) elseif id == 7 then return tostring(get( getResourceName( getThisResource( ) ).. '.poolstick' )) elseif id == 8 then return tostring(get( getResourceName( getThisResource( ) ).. '.katana' )) elseif id == 9 then return tostring(get( getResourceName( getThisResource( ) ).. '.chainsaw' )) elseif id == 10 then return tostring(get( getResourceName( getThisResource( ) ).. '.dildo' )) elseif id == 11 then return tostring(get( getResourceName( getThisResource( ) ).. 'dildo2' )) elseif id == 12 then return tostring(get( getResourceName( getThisResource( ) ).. '.vibrator' )) elseif id == 13 then return tostring(get( getResourceName( getThisResource( ) ).. '.vibrator2' )) elseif id == 14 then return tostring(get( getResourceName( getThisResource( ) ).. '.flower' )) elseif id == 15 then return tostring(get( getResourceName( getThisResource( ) ).. '.cane' )) elseif id == 16 then return tostring(get( getResourceName( getThisResource( ) ).. '.grenade' )) elseif id == 17 then return tostring(get( getResourceName( getThisResource( ) ).. '.teargas' )) elseif id == 18 then return tostring(get( getResourceName( getThisResource( ) ).. '.molotov' )) elseif id == 22 then return tostring(get( getResourceName( getThisResource( ) ).. '.colt45' )) elseif id == 23 then return tostring(get( getResourceName( getThisResource( ) ).. '.silenced' )) elseif id == 24 then return tostring(get( getResourceName( getThisResource( ) ).. '.deagle' )) elseif id == 25 then return tostring(get( getResourceName( getThisResource( ) ).. '.shotgun' )) elseif id == 26 then return tostring(get( getResourceName( getThisResource( ) ).. '.sawed-off' )) elseif id == 27 then return tostring(get( getResourceName( getThisResource( ) ).. '.combatshotgun' )) elseif id == 28 then return tostring(get( getResourceName( getThisResource( ) ).. '.uzi' )) elseif id == 29 then return tostring(get( getResourceName( getThisResource( ) ).. '.mp5' )) elseif id == 30 then return tostring(get( getResourceName( getThisResource( ) ).. '.ak-47' )) elseif id == 31 then return tostring(get( getResourceName( getThisResource( ) ).. '.m4' )) elseif id == 32 then return tostring(get( getResourceName( getThisResource( ) ).. '.tec-9' )) elseif id == 33 then return tostring(get( getResourceName( getThisResource( ) ).. '.rifle' )) elseif id == 34 then return tostring(get( getResourceName( getThisResource( ) ).. '.sniper' )) elseif id == 35 then return tostring(get( getResourceName( getThisResource( ) ).. '.rocketlauncher' )) elseif id == 41 then return tostring(get( getResourceName( getThisResource( ) ).. '.spraycan' )) elseif id == 42 then return tostring(get( getResourceName( getThisResource( ) ).. '.fireextinguisher' )) elseif id == 43 then return tostring(get( getResourceName( getThisResource( ) ).. '.camera' )) elseif id == 44 then return tostring(get( getResourceName( getThisResource( ) ).. '.nightvision' )) elseif id == 45 then return tostring(get( getResourceName( getThisResource( ) ).. '.infrared' )) else return "disabled" end return "disabled" end function weaponpro() for id = 0, 45, 1 do if id ~= 19 and id ~= 20 and id ~=21 then local ammo = getAmmoPerClip(id) if ammo == "disable" then setWeaponProperty( id , "std", "maximum_clip_ammo", 0) else setWeaponProperty( id , "std", "maximum_clip_ammo", ammo) end end end end addEventHandler ( "onResourceStart", getRootElement(), weaponpro ) Edited November 20, 2016 by Apo Link to comment
LoPollo Posted November 20, 2016 Share Posted November 20, 2016 4 hours ago, Apo said: my warning line (setWeaponProperty( id , "std", "maximum_clip_ammo", ammo)) 4 hours ago, Apo said: WARNING:weapon.lua:40 Line 40: elseif id == 22 then i'm missing something... Link to comment
Apo Posted November 20, 2016 Author Share Posted November 20, 2016 no sry line 92 WARNING:weapon.lua:92: Expected number, got non-convertible string. This warning may be an error in future versions. WARNING: weapon.lua:92: Expected number, got non-convertible string. This warning may be an error in future versions. [DUP x6] setWeaponProperty( id , "std", "maximum_clip_ammo", ammo) Link to comment
Callum Posted November 20, 2016 Share Posted November 20, 2016 (edited) setWeaponProperty ( id, "std", "maximum_clip_ammo", tonumber(ammo) ) Should resolve the issue, though I've never come across a "non-convertible string". What does the value for 'ammo' look like at runtime? Edited November 20, 2016 by Callum Link to comment
Captain Cody Posted November 20, 2016 Share Posted November 20, 2016 We're going to need this function getAmmoPerClip . Link to comment
Apo Posted November 20, 2016 Author Share Posted November 20, 2016 i have warining only new version 1.5.3 and other version no warning Link to comment
Captain Cody Posted November 21, 2016 Share Posted November 21, 2016 Appears quite a few things broke in 1.5.3 1 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