ItsMods

Full Version: Using SetPlayerData to save server stats?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hey,
straight to the point I want to do this...
for example, when the player connects:
Code:
if(self GetPlayerData("example_played") == "true") {
    self iPrintln("Welcome back " + self.name + "!");
} else {
    self SetPlayerData("example_played","true");
    self iPrintln("Welcome, " + self.name + ". You appear to be new here. Please read the rules and enjoy your stay.");
}

however, the code above does not set the player's data. it is refreshed upon restarting the server. is this possible or do I need to use a plugin and save server side stats?

thanks
not sure if this works for mw2 (it's from cod4)

Code:
player setStat(666,"true");

if(player getStat(666) == "true") derp();

edit: or it was getData/setData meh I forgot
I know you can use
Code:
self SetPlayerData( "money","BLABLABLASTUFFHERE" );

but there are some other mods that use this aswell .. so it will be changed when he plays one of those mods
(01-05-2012, 17:45)iAegle Wrote: [ -> ]I know you can use
Code:
self SetPlayerData( "money","BLABLABLASTUFFHERE" );

but there are some other mods that use this aswell .. so it will be changed when he plays one of those mods
maps\mp\gametypes\_presistanse.gsc ( or i forgot name )
(01-05-2012, 20:33)Se7en Wrote: [ -> ]maps\mp\gametypes\_presistanse.gsc ( or i forgot name )
maps\mp\gametypes\_persistence.gsc