murat66005 Posted May 25, 2013 Share Posted May 25, 2013 Help I was İnstalled Level Script And Not Show Scoreboard Help Me Please For Script Link ::: https://community.multitheftauto.com/ind ... ls&id=1253 Link to comment
manawydan Posted May 25, 2013 Share Posted May 25, 2013 create a script and export functions of resource "exp_system"! https://wiki.multitheftauto.com/wiki/Resource:Exp_system Link to comment
murat66005 Posted May 25, 2013 Author Share Posted May 25, 2013 Please Give Me Video Tell me Bro I dont Know English My English Easy Bad! Link to comment
Allentus Posted May 26, 2013 Share Posted May 26, 2013 It's impossible to script without english knowledge bud .. Link to comment
WASSIm. Posted May 26, 2013 Share Posted May 26, 2013 try this: exports [ "scoreboard" ]:addScoreboardColumn ( "EXP") exports [ "scoreboard" ]:addScoreboardColumn ( "LEVEL") function updatePlayersExp ( ) for index, player in ipairs ( getElementsByType "player" ) do setElementData ( player, "EXP", getElementData(player,"exp") ) end end setTimer ( updatePlayersExp, 2500, 0 ) function updatePlayersLevel ( ) for index, player in ipairs ( getElementsByType "player" ) do setElementData ( player, "LEVEL", getElementData(player,"level") ) end end setTimer ( updatePlayersLevel, 2500, 0 ) Link to comment
Castillo Posted May 26, 2013 Share Posted May 26, 2013 Updating is not requring, level and experience are saved as element data, so you can just use the data name of them which is: "exp" and "level". exports [ "scoreboard" ]:addScoreboardColumn ( "exp" ) exports [ "scoreboard" ]:addScoreboardColumn ( "level" ) Link to comment
murat66005 Posted May 26, 2013 Author Share Posted May 26, 2013 Not Give Exp And Level Help Me Please Link to comment
SuleymanM Posted May 26, 2013 Share Posted May 26, 2013 you added resource to the admin rights? Link to comment
murat66005 Posted May 26, 2013 Author Share Posted May 26, 2013 I will Give You teamwievever You Connect My Pc Please Or tell me about it Link to comment
WASSIm. Posted May 26, 2013 Share Posted May 26, 2013 try this: exports [ "scoreboard" ]:addScoreboardColumn ( "exp") exports [ "scoreboard" ]:addScoreboardColumn ( "level") function updatePlayersExp ( ) for index, player in ipairs ( getElementsByType "player" ) do setElementData ( player, "exp", getElementData(player,"exp") ) end end setTimer ( updatePlayersExp, 2500, 0 ) function updatePlayersLevel ( ) for index, player in ipairs ( getElementsByType "player" ) do setElementData ( player, "level", getElementData(player,"level") ) end end setTimer ( updatePlayersLevel, 2500, 0 ) Link to comment
murat66005 Posted May 26, 2013 Author Share Posted May 26, 2013 bro ı ghive you teamwiever 8 connect my pc and install the script please Link to comment
WASSIm. Posted May 26, 2013 Share Posted May 26, 2013 bro ı ghive you teamwiever 8 connect my pc and install the script please sry bro but i have problem with teamwiever show me meta Link to comment
murat66005 Posted May 26, 2013 Author Share Posted May 26, 2013 (edited) Meta.XML <meta> <info author="Castillo" type="script" name="exp/level system" description="exp/level system" version="3.2"/> <script src="client.lua" type="client"/> <script src="server.lua" type="server"/> <file src="level_up.mp3" type="client" /> <export function="getPlayerLevel" type="server" /> <!-- arguments: thePlayer --> <export function="setPlayerLevel" type="server" /> <!-- arguments: thePlayer, theLevel --> <export function="getPlayerEXP" type="server" /> <!-- arguments: thePlayer --> <export function="setPlayerEXP" type="server" /> <!-- arguments: thePlayer, theExperience --> <export function="addPlayerEXP" type="server" /> <!-- arguments: thePlayer, theExperience --> <export function="getAccountLevel" type="server" /> <!-- arguments: theAccount --> <export function="setAccountLevel" type="server" /> <!-- arguments: theAccount, theLevel --> <export function="getAccountEXP" type="server" /> <!-- arguments: theAccount --> <export function="setAccountEXP" type="server" /> <!-- arguments: theAccount, theExperience --> <export function="addAccountEXP" type="server" /> <!-- arguments: theAccount, theExperience --> <export function="getLevelData" type="server" /> <!-- arguments: theLevel --> <export function="loadLevelsFromXML" type="server" /> <!-- arguments: None --> </meta> server.lua exports [ "scoreboard" ]:addScoreboardColumn ( "EXP") exports [ "scoreboard" ]:addScoreboardColumn ( "LEVEL") function updatePlayersExp ( ) for index, player in ipairs ( getElementsByType "player" ) do setElementData ( player, "EXP", getElementData(player,"exp") ) end end setTimer ( updatePlayersExp, 2500, 0 ) function updatePlayersLevel ( ) for index, player in ipairs ( getElementsByType "player" ) do setElementData ( player, "LEVEL", getElementData(player,"level") ) end end setTimer ( updatePlayersLevel, 2500, 0 ) LEVELS.XML <levels> <level name = "Test 1" experienceRequired = "20" /> <level name = "Test 2" experienceRequired = "100" /> <level name = "Test 3" experienceRequired = "150" /> <level name = "Test 4" experienceRequired = "200" /> <level name = "Test 5" experienceRequired = "2000" /> </levels> Edited May 26, 2013 by Guest Link to comment
Castillo Posted May 26, 2013 Share Posted May 26, 2013 You haven't read my post or what? Updating is not requring, level and experience are saved as element data, so you can just use the data name of them which is: "exp" and "level". exports [ "scoreboard" ]:addScoreboardColumn ( "exp" ) exports [ "scoreboard" ]:addScoreboardColumn ( "level" ) Link to comment
murat66005 Posted May 26, 2013 Author Share Posted May 26, 2013 Yes I Was Changed server.lua Link to comment
WASSIm. Posted May 26, 2013 Share Posted May 26, 2013 redownload script and make script scoreboard exp,level alone Link to comment
Castillo Posted May 26, 2013 Share Posted May 26, 2013 That's a compiled script, you can't edit it. Make a new script file on the same resource, then add it to the meta.xml. Link to comment
murat66005 Posted May 26, 2013 Author Share Posted May 26, 2013 you will make new script.file and give me please Link to comment
Castillo Posted May 26, 2013 Share Posted May 26, 2013 Is that hard to create a new text document and copy what I gave you on it, save, then add to meta.xml like the other scripts? Link to comment
Castillo Posted May 26, 2013 Share Posted May 26, 2013 Send me the teamviewer details over PM, you obviously don't understand anything. Edit: You don't have any script to give exp at all, try with this one: addEvent ( "onPlayerDestructionDerbyWin", true ) addEventHandler ( "onPlayerDestructionDerbyWin", root, function ( winner ) local randomExp = math.random ( 10, 30 ) exports [ "Level" ]:addPlayerEXP ( winner, randomExp ) outputChatBox ( getPlayerName ( winner ) .." has won ".. randomExp .." experience for winning the map!", root, 0, 255, 0 ) end ) 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