Gamekiller Posted March 14, 2012 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?
Gamekiller Posted March 15, 2012 Author 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..
Norhy Posted March 15, 2012 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?..
Gamekiller Posted March 15, 2012 Author 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
Gamekiller Posted March 16, 2012 Author 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
Castillo Posted March 16, 2012 Posted March 16, 2012 He want's the character name he just spawned to be on the scoreboard column.
tim260 Posted March 16, 2012 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 !
Castillo Posted March 16, 2012 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.
tim260 Posted March 16, 2012 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 ?
Gamekiller Posted March 16, 2012 Author Posted March 16, 2012 I already tryed Export function but that dint worked 100% Out Edit: # Found it... Now looking if works
tim260 Posted March 16, 2012 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 ?
Gamekiller Posted March 17, 2012 Author Posted March 17, 2012 Hmm.... I just have the function's but dont know how i would get running...
50p Posted March 17, 2012 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.
Gamekiller Posted March 18, 2012 Author 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)
TwiX! Posted March 18, 2012 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?
Gamekiller Posted March 18, 2012 Author Posted March 18, 2012 I need to get the Skin name but it wont get it,
tim260 Posted March 18, 2012 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 );
Gamekiller Posted March 18, 2012 Author Posted March 18, 2012 And how should i do the Collum i made>? what to do with that?
tim260 Posted March 18, 2012 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 !
Gamekiller Posted March 18, 2012 Author 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
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