Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Using SetPlayerData to save server stats?
#1
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
Reply

#2
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
[Image: MaEIQ.png]
Reply

#3
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
(08-10-2011, 12:58)Pozzuh Wrote:
Se7en Wrote:Stealed, from cod4 mod ...
look who's talking

[Release] Old School Mod v2.2
[Release] Scroll menu

Reply

#4
(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 )
C++/Obj-Cdeveloper. Neko engine wip
Steam: Click
Reply

#5
(01-05-2012, 20:33)Se7en Wrote: maps\mp\gametypes\_presistanse.gsc ( or i forgot name )
maps\mp\gametypes\_persistence.gsc
[Image: lQDUjba.jpg]
Reply



Possibly Related Threads…
Thread Author Replies Views Last Post
  [Release] Windows 8.1 Fix for MW3 Server Addon master131 16 18,202 09-29-2014, 23:08
Last Post: SuperNovaAO
Brick [Release] MW3 Server Administration Addon iRoNinja 5 9,013 11-10-2013, 15:46
Last Post: Casper
Exclamation Help cmdlist, dvarlist server crash Nerus 17 11,919 11-09-2013, 23:54
Last Post: Nerus
  Our Level Fastfile is Different from the Server. CheeseToast 6 11,327 11-03-2013, 17:52
Last Post: CheeseToast
  Dedicated Server External (public) IP Nerus 3 5,903 11-02-2013, 14:16
Last Post: Casper
  MW3 Server Version superg1973 7 12,752 10-28-2013, 01:15
Last Post: kotyra972
  Help how to turn off map in dedicated server pero123 8 7,146 10-15-2013, 19:00
Last Post: Nekochan
  Issue with server addon and NAT dimitrifrom31 3 5,086 10-08-2013, 18:11
Last Post: iRoNinja
  GETTING SERVER ONLINE raym 6 5,723 09-28-2013, 22:42
Last Post: Nekochan
  advanced Server Config Poorya56 9 7,021 09-11-2013, 03:45
Last Post: trasto

Forum Jump:


Users browsing this thread:
1 Guest(s)

Forum Powered By MyBB, Theme by © 2002-2024 Melroy van den Berg.