Jump to content

Qeustion


Gamekiller

Recommended Posts

Posted

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?

Posted

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?..

Posted

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

Posted
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 ?

Posted
I already tryed Export function but that dint worked 100% Out

Edit: # Found it... Now looking if works

ifyou got it fixing can you send or iether help me ?

Posted

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.

Posted
  
  
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) 
  

Posted
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?

Posted
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 ); 

Posted
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 ! :D

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...