UnKnownGuy Posted October 20, 2016 Share Posted October 20, 2016 Hello Guys. I Got A small script from community named maxskills and i tried it and its working but. when you die/reconnect/disconnect your weapons [Tec-9/Uzi] back to 1 weapon again and this is the link i don't know how to fix it so pls help me link : https://community.multitheftauto.com/index.php?p=resources&s=details&id=5150 Link to comment
HeySlickThatsMe Posted October 20, 2016 Share Posted October 20, 2016 edit defaultstats resource and change every skill to 1000 Link to comment
UnKnownGuy Posted October 20, 2016 Author Share Posted October 20, 2016 1 hour ago, ThatsMe said: edit defaultstats resource and change every skill to 1000 nothing happend still not saving Link to comment
HeySlickThatsMe Posted October 20, 2016 Share Posted October 20, 2016 (edited) weird //edit did you turn off your resource and turn on defaultstats? Edited October 20, 2016 by ThatsMe Link to comment
UnKnownGuy Posted October 20, 2016 Author Share Posted October 20, 2016 Just now, ThatsMe said: weird //edit did you turn off your resource and turn on defaultstats? Shot i didn't nothing happend i restarted it and nothing happend this is the script: function pedSkills( ped, skill ) setPedStat( ped, 69, skill ) setPedStat( ped, 70, skill ) setPedStat( ped, 71, skill ) setPedStat( ped, 72, skill ) setPedStat( ped, 73, skill ) setPedStat( ped, 74, skill ) setPedStat( ped, 75, skill ) setPedStat( ped, 76, skill ) setPedStat( ped, 77, skill ) setPedStat( ped, 78, skill ) setPedStat( ped, 79, skill ) end function resourceStart( ) local players = getElementsByType( "player" ) for theKey, thePlayer in ipairs( players ) do pedSkills( thePlayer, 1000 ) end end function resourceStop( ) local players = getElementsByType( "player" ) for theKey, thePlayer in ipairs( players ) do pedSkills( thePlayer, 0 ) end end function playerJoin( ) pedSkills( source, 999 ) end addEventHandler( "onResourceStart", resourceRoot, resourceStart ) addEventHandler( "onResourceStop", resourceRoot, resourceStop ) addEventHandler( "onPlayerJoin", root, playerJoin ) Link to comment
HeySlickThatsMe Posted October 20, 2016 Share Posted October 20, 2016 ^ is this defaultstats code or the script that you posted? use this code local stats = { [69] = 1000, -- Pistol [70] = 1000, -- Silenced pistol [71] = 1000, -- Desert eagle [72] = 1000, -- Shotgun [73] = 1000, -- Sawnoff, 999 for duel wield [74] = 1000, -- Spas-12 [75] = 1000, -- Micro-uzi & Tec-9, 999 for duel wield [76] = 1000, -- MP5 [77] = 1000, -- AK-47 [78] = 1000, -- M4 [79] = 1000, -- Sniper rifle & country rifle } local function applyStatsForPlayer(player) for stat, value in pairs(stats) do player:setStat(stat, value) end end local function applyStatsForEveryone() for _, player in pairs(Element.getAllByType "player") do applyStatsForPlayer(player) end end addEventHandler("onResourceStart", resourceRoot, applyStatsForEveryone) addEventHandler("onGamemodeMapStart", root, applyStatsForEveryone) local function applyStatsForSource() applyStatsForPlayer(source) end addEventHandler("onPlayerJoin", root, applyStatsForSource) addEventHandler("onPlayerSpawn", root, applyStatsForSource) Link to comment
UnKnownGuy Posted October 21, 2016 Author Share Posted October 21, 2016 8 hours ago, ThatsMe said: ^ is this defaultstats code or the script that you posted? use this code local stats = { [69] = 1000, -- Pistol [70] = 1000, -- Silenced pistol [71] = 1000, -- Desert eagle [72] = 1000, -- Shotgun [73] = 1000, -- Sawnoff, 999 for duel wield [74] = 1000, -- Spas-12 [75] = 1000, -- Micro-uzi & Tec-9, 999 for duel wield [76] = 1000, -- MP5 [77] = 1000, -- AK-47 [78] = 1000, -- M4 [79] = 1000, -- Sniper rifle & country rifle } local function applyStatsForPlayer(player) for stat, value in pairs(stats) do player:setStat(stat, value) end end local function applyStatsForEveryone() for _, player in pairs(Element.getAllByType "player") do applyStatsForPlayer(player) end end addEventHandler("onResourceStart", resourceRoot, applyStatsForEveryone) addEventHandler("onGamemodeMapStart", root, applyStatsForEveryone) local function applyStatsForSource() applyStatsForPlayer(source) end addEventHandler("onPlayerJoin", root, applyStatsForSource) addEventHandler("onPlayerSpawn", root, applyStatsForSource) its not working yet please fix it and give it to me again i mean edit it and put it on community 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