Important Pluton for Experimental Branch

Status
Not open for further replies.
we didn't added the attacker, I was thinking about two different solutions for that and then I totally forgot about it... I'll find out something for that soon
 
we didn't added the attacker, I was thinking about two different solutions for that and then I totally forgot about it... I'll find out something for that soon

I did notice that the DeathEvent.cs has an attacker, maybe just duplicate that code since it gets the attacker from the same HitInfo as the other events:

public BaseEntity Attacker {
get {
return _info.Initiator;
}

I made is a Player type because I wasn't sure how to get Player from BaseEntity once I was in Python though :D
 
I did notice that the DeathEvent.cs has an attacker, maybe just duplicate that code since it gets the attacker from the same HitInfo as the other events:

public BaseEntity Attacker {
get {
return _info.Initiator;
}

I made is a Player type because I wasn't sure how to get Player from BaseEntity once I was in Python though :D
Python:
baseplayer = baseEntity.ToPlayer()
if basePlayer is not None:
    player = Server.FindPlayer(basePlayer.displayName)
 
Question 2:
I also made a pluggin to sethome/gohome by setting DataStore.Add("homelocation", Player.SteamID, ploc) (ploc = vector) which works great but when I "quit" and start the server again, the locations are gone.. do I have to save the locations or should Datastore save its arrays auto?

It should work but I made it to save in INI file... @mikec helped me
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.
It is safer to save locations on INI
 
Datastore is for saving bigger dbs. Like If i would convert KKMoney now, I would probably remove the inifile completely. Why? Since putting small ints to a bunch of Ids can even make the inifile full. Making a for cycle in the keys of the ini would be also slower. But, using inifile for like 20 locations and some configurations and any other things, is better than the ds.

Sent from my Samsung Galaxy S4
 
Could we get MySQL or even let us import MySQLdb if we have python installed on the server we are running pluton on.
 
Sometimes my datastore seems to delet but ini can be copyed!... And i didn't any problems yet...
 
that can happen if you store non-serializable data in the ds (like the player object)
 
At the moment i guess its impossible anyway to have plugins that acctualy works with no errors , experimental way .....u do they update so no... i wait for a stable rust with all the stuff :)
 
At the moment i guess its impossible anyway to have plugins that acctualy works with no errors , experimental way .....u do they update so no... i wait for a stable rust with all the stuff :)

I recommend this for most people :)
 
Last edited:
Status
Not open for further replies.