Jump to content

Qeustion


Gamekiller

Recommended Posts

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

Link to comment

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