Jump to content

setElementData problem


arezu

Recommended Posts

I have a problem with settings element data server sided.

outputChatBox("set playing: "..tostring(setElementData(player, "race.playing", true))) 
outputChatBox("set ghostmode: "..tostring(setElementData(player, "race.ghostmode", true))) 

It says in chatbox:

set playing: true

set ghostmode: false

There is no error in debugscript, so i dont know what the problem is.

Also, race.ghostmode element data for vehicles work, but not for players.

Link to comment

You're using setElementData, the function sets the element data, not gets.

outputChatBox("set playing: "..tostring(getElementData(player, "race.playing"))) 
outputChatBox("set ghostmode: "..tostring(getElementData(player, "race.ghostmode"))) 

Link to comment
You're using setElementData, the function sets the element data, not gets.
outputChatBox("set playing: "..tostring(getElementData(player, "race.playing"))) 
outputChatBox("set ghostmode: "..tostring(getElementData(player, "race.ghostmode"))) 

Yes i know that, but i used outputChatBox to see if it was successfully set (setting element data doesn't work for some reason for the second one).

Link to comment

I'm afraid the wiki is wrong then, take a look:

Executing client-side command: outputChatBox("set playing: "..tostring(setElementData(localPlayer, "race.playing", true))) outputChatBox("set ghostmode: "..tostring(setElementData(localPlayer, "race.ghostmode", true)))

set playing: true

set ghostmode: true

Command executed!

Executing client-side command: outputChatBox("set playing: "..tostring(setElementData(localPlayer, "race.playing", true))) outputChatBox("set ghostmode: "..tostring(setElementData(localPlayer, "race.ghostmode", true)))

set playing: false

set ghostmode: false

Command executed!

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