Important Pluton for Experimental Branch

Status
Not open for further replies.

Skully

Plugin Developer
Plugin Developer
Sep 8, 2014
91
7
8
Ok... little help please...
I have
Python:
cmd.User.Teleport(ini.GetSetting("MapPosition", cmd.User.SteamID))
Why can't it teleport player? Help please...
 

balu92

Retired Staff
Retired Staff
Trusted Member
Jul 11, 2014
338
75
28
34
Ok... little help please...
I have
Python:
cmd.User.Teleport(ini.GetSetting("MapPosition", cmd.User.SteamID))
Why can't it teleport player? Help please...
ini.GetSetting won't give you a Vector3
 

Skully

Plugin Developer
Plugin Developer
Sep 8, 2014
91
7
8
ini.GetSetting won't give you a Vector3
In ini it looks like this: 765611988888888=(205.5, 2.9, 979.8)
Why can't it just take it from ini and use it?
Then how to make it to work or save it right?
 

balu92

Retired Staff
Retired Staff
Trusted Member
Jul 11, 2014
338
75
28
34
In ini it looks like this: 765611988888888=(205.5, 2.9, 979.8)
Why can't it just take it from ini and use it?
Then how to make it to work or save it right?
It don't know's if that's a vector3 or a simple string or what...
DataStore should be able to serialize and deserialize Vector3s

DataStore.Add("MapPosition", cmd.User.GameID, v3)
location = DataStore.Get("MapPosition", cmd.User.GameID)
 

Skully

Plugin Developer
Plugin Developer
Sep 8, 2014
91
7
8
It don't know's if that's a vector3 or a simple string or what...
DataStore should be able to serialize and deserialize Vector3s

DataStore.Add("MapPosition", cmd.User.GameID, v3)
location = DataStore.Get("MapPosition", cmd.User.GameID)
Ok... Thanks.. will try something!
 

balu92

Retired Staff
Retired Staff
Trusted Member
Jul 11, 2014
338
75
28
34
This really worked... Will it save on server data for ever?
if someone breaks the DataStore with non-serializable data, it will be lost. Otherwise it will be there till you don't remove PlutonDatastore.ds
 

mikec

Master Of All That I Survey
Retired Staff
Trusted Member
Jul 12, 2014
296
152
28
Los Angeles, California, USA
In ini it looks like this: 765611988888888=(205.5, 2.9, 979.8)
Why can't it just take it from ini and use it?
Then how to make it to work or save it right?
That's what a Vector3.ToString() looks like. To convert the string back to a Vector3, strip the parentheses and commas, and parse each number to a float. Then use them as arguments to instance a new Vector3. This is exactly what DataStore does when someone saves a Vector3 to it, and recalls it later.
 

Skully

Plugin Developer
Plugin Developer
Sep 8, 2014
91
7
8
Is it possible to make plugin to submit command to console like "status"?
 

Skully

Plugin Developer
Plugin Developer
Sep 8, 2014
91
7
8
Player.SendConsoleCommand("xyz") should work I guess.
But will this code submit it after timer with no "Player"...?
Looks like it needs a person what does it with admin powers...

Is there a code what does it without a person?
 

Skully

Plugin Developer
Plugin Developer
Sep 8, 2014
91
7
8
what does status do?
"status" was as example... It shows some info about players...
My question was how to submit command to console without players... Only simple command submit...
 
Status
Not open for further replies.