E-mail Posted September 11, 2011 Posted September 11, 2011 Hi all i have made a script Player Stats Please i need some Fix For My Script addEventHandler ( "onClientResourceStart", getRootElement(), function (resource) if resource == getThisResource() then exports.scoreboard:scoreboardAddColumn ( "State" ) setElementData( getLocalPlayer ( ), "State", "Waiting" ) end end ) function onPlayerDead( ammo, attacker, weapon, bodypart ) setElementData( source, "State", "Dead" ) end addEventHandler( "onClientPlayerWasted", getRootElement(), onPlayerDead )
JR10 Posted September 11, 2011 Posted September 11, 2011 Don't just ask for help, tell us what happens. server: exports.scoreboard:scoreboardAddColumn ( "State" ) client: addEventHandler ( "onClientResourceStart", resourceRoot, function () setElementData( getLocalPlayer ( ), "State", "Waiting" ) end ) function onPlayerDead( ammo, attacker, weapon, bodypart ) setElementData( source, "State", "Dead" ) end addEventHandler( "onClientPlayerWasted", getRootElement(), onPlayerDead ) Business System viewtopic.php?f=108&t=35797 Notepad++ Syntax Highlighting & Auto Completion viewtopic.php?f=91&t=76726 SQLite Tutorial viewtopic.php?f=148&t=38203
E-mail Posted September 11, 2011 Author Posted September 11, 2011 /debugscript say filed to call 'scorbord' addColumn' [string"?"]
JR10 Posted September 11, 2011 Posted September 11, 2011 The scoreboard resource isn't running. Business System viewtopic.php?f=108&t=35797 Notepad++ Syntax Highlighting & Auto Completion viewtopic.php?f=91&t=76726 SQLite Tutorial viewtopic.php?f=148&t=38203
E-mail Posted September 12, 2011 Author Posted September 12, 2011 JR10 i start the script there is a bug the State after respawn still Dead Not alive did i use setupdateTimer?
JR10 Posted September 12, 2011 Posted September 12, 2011 Do you know what you are doing, the script won't do things itself. As you can see you only added Waiting on resource start, and Dead when he dies. You didn't add on spawn change to alive. Add this: function onPlayerSpawn() setElementData( source, "State", "Alive" ) end addEventHandler( "onClientPlayerSpawn", getRootElement(), onPlayerSpawn) Business System viewtopic.php?f=108&t=35797 Notepad++ Syntax Highlighting & Auto Completion viewtopic.php?f=91&t=76726 SQLite Tutorial viewtopic.php?f=148&t=38203
E-mail Posted September 12, 2011 Author Posted September 12, 2011 THX JR10 swear to God you are the best assistant in the Forum
Castillo Posted September 12, 2011 Posted September 12, 2011 Maybe you say that because he gives you the code? San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
JR10 Posted September 12, 2011 Posted September 12, 2011 Just like MOJRM, talked bad in a post, and when you helped him, GOD!. You welcome anyway. Business System viewtopic.php?f=108&t=35797 Notepad++ Syntax Highlighting & Auto Completion viewtopic.php?f=91&t=76726 SQLite Tutorial viewtopic.php?f=148&t=38203
E-mail Posted September 12, 2011 Author Posted September 12, 2011 No JR10 iam not Like MoJrm he is noob in script iam not i just forget some function i know it onClinetPlayrSpawn but any way Thx For you help
JR10 Posted September 12, 2011 Posted September 12, 2011 You welcome. Business System viewtopic.php?f=108&t=35797 Notepad++ Syntax Highlighting & Auto Completion viewtopic.php?f=91&t=76726 SQLite Tutorial viewtopic.php?f=148&t=38203
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