Gamekiller Posted March 14, 2012 Share Posted March 14, 2012 Currently i'm using the Spawn Menu of 50P but i got one qeustion I've added A new collum on the Scoreboard but now i want to get it the Name not the Class name but the skin name they choosed but how would i do that? Link to comment
GanJaRuleZ Posted March 15, 2012 Share Posted March 15, 2012 What do you want to say ? Link to comment
Gamekiller Posted March 15, 2012 Author Share Posted March 15, 2012 The Collum needs to get the, Skin name theplayer choosed It has difrent name's in the Class so i want to let it get the Skin name.. Link to comment
Norhy Posted March 15, 2012 Share Posted March 15, 2012 You mean.. e.g: You have a Army class in the Spawn menu and a Collum in the Scoreboard which name's "Class". So, you want that the name of the class ("Army") appear in that collum?.. Link to comment
Gamekiller Posted March 15, 2012 Author Share Posted March 15, 2012 No Like If the menu Catagory's > San fiero Then the Class name > Goverment Then i want to get it of goverment the Skin name President Etc Link to comment
GanJaRuleZ Posted March 16, 2012 Share Posted March 16, 2012 Can you be more explicit ? Please. Link to comment
Gamekiller Posted March 16, 2012 Author Share Posted March 16, 2012 Ok so i'm using the Spawn menu of 50P So Exactly you have the Catagory ( Main showed) And you have the Class Name ( team name) After that you have the Chara's (Skin Name) I want it to get the Skin name like Catagory> Los Santos > Government > President Link to comment
Castillo Posted March 16, 2012 Share Posted March 16, 2012 He want's the character name he just spawned to be on the scoreboard column. Link to comment
tim260 Posted March 16, 2012 Share Posted March 16, 2012 He want's the character name he just spawned to be on the scoreboard column. If you could fix this would be nice ! Link to comment
Castillo Posted March 16, 2012 Share Posted March 16, 2012 There's nothing to fix, and it's not that hard to add it, so everyone with some Lua experience can do it. Link to comment
tim260 Posted March 16, 2012 Share Posted March 16, 2012 There's nothing to fix, and it's not that hard to add it, so everyone with some Lua experience can do it. Will you make it for me ? Link to comment
Gamekiller Posted March 16, 2012 Author Share Posted March 16, 2012 I already tryed Export function but that dint worked 100% Out Edit: # Found it... Now looking if works Link to comment
tim260 Posted March 16, 2012 Share Posted March 16, 2012 I already tryed Export function but that dint worked 100% OutEdit: # Found it... Now looking if works ifyou got it fixing can you send or iether help me ? Link to comment
Gamekiller Posted March 17, 2012 Author Share Posted March 17, 2012 Hmm.... I just have the function's but dont know how i would get running... Link to comment
50p Posted March 17, 2012 Share Posted March 17, 2012 You can create a column "Skin" and add this line to "spawn/s_main.lua" (line 43): setElementData( client, "Skin", skin.name ) Scoreboard resource should get the data "Skin" from the player, and the above line will set player's "Skin" data to the skin name, that's what you want. Link to comment
Gamekiller Posted March 18, 2012 Author Share Posted March 18, 2012 call(getResourceFromName("scoreboard"),"addScoreboardColumn","Money",root,90) call(getResourceFromName("scoreboard"),"addScoreboardColumn","Wanted",root,40) call(getResourceFromName("scoreboard"),"addScoreboardColumn","Skin",root,90) function update() for k, v in ipairs(getElementsByType('player')) do local money = getPlayerMoney(v) setElementData(v,"Money",money ) end for a, v in ipairs(getElementsByType('player')) do local wanted = getPlayerWantedLevel(v) setElementData(v,"Wanted",wanted ) end for k, v in ipairs(getElementsByType('player')) do local Skin = getElementData(v,"Skin.name") setElementData(v,"Skin",Skin.name ) end end setTimer(update, 10000, 0) Link to comment
TwiX! Posted March 18, 2012 Share Posted March 18, 2012 call(getResourceFromName("scoreboard"),"addScoreboardColumn","Money",root,90) call(getResourceFromName("scoreboard"),"addScoreboardColumn","Wanted",root,40) call(getResourceFromName("scoreboard"),"addScoreboardColumn","Skin",root,90) function update() for k, v in ipairs">ipairs(getElementsByType('player')) do local money = getPlayerMoney(v) local wanted = getPlayerWantedLevel(v) local Skin = getElementData(v,"Skin.name") setElementData(v,"Money",money ) setElementData(v,"Wanted",wanted ) setElementData(v,"Skin",Skin.name ) end setTimer(update, 10000, 0) --Edit wrong lua script in forum (for k, v in ipairs(getElementsByType('player')) do) problem is? Link to comment
Gamekiller Posted March 18, 2012 Author Share Posted March 18, 2012 I need to get the Skin name but it wont get it, Link to comment
tim260 Posted March 18, 2012 Share Posted March 18, 2012 I need to get the Skin name but it wont get it, add the collum and then in s_main.lua set this if spawned then setElementData( client, "team", class.name ) fadeCamera( client, true ); setCameraTarget( client, client ); setTimer( setCameraTarget, 200, 1, client, client ); setElementData ( client, "Yourcollumname", skin.name ) -- here you set the data for the scoreboard collum ! triggerClientEvent( client, "spawn_SpawnedSuccessfully", client ); Link to comment
Gamekiller Posted March 18, 2012 Author Share Posted March 18, 2012 And how should i do the Collum i made>? what to do with that? Link to comment
tim260 Posted March 18, 2012 Share Posted March 18, 2012 Thanks tim:) Thanks to castillo who helped me with this but i saw you werent getting it at all so i thought let me post it ;p Anyways your doing the same as i do when something doesnt work i post on the forums we shouldnt do that anymore an go to learn the wiki ! Link to comment
Gamekiller Posted March 18, 2012 Author Share Posted March 18, 2012 No I'm still learning:) At Wiki and from my brother but I dint get this 100% so i thought i will post it so other people can help me 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