Jump to content

  • Log in with Facebook Log in with Twitter Log In with Google Log In with Steam Sign In
  • Create Account
Photo

Lua API Questions

- - - - - lua api scripting

  • Please log in to reply
65 replies to this topic

#61
OFFLINE   Dragonji

Dragonji

    Advanced Member

  • Members
  • PipPipPipPip
  • 514 posts
142
On the road to fame
  • LocationPoland

I'd like to ask if there's a way to check how long a player is playing in his current team on the current map?



#62
OFFLINE   Zelly

Zelly

    Regular Member

  • Coders
  • PipPipPip
  • 141 posts
73
Getting Better

You could easily keep track, I am not sure if there exists an entity field though.



#63
OFFLINE   Aciz

Aciz

    Member

  • Members
  • PipPip
  • 38 posts
7
A step in the right direction

I'd like to ask if there's a way to check how long a player is playing in his current team on the current map?


I'm interested, mind I'd I ask you what would you use this info for? :)

#64
OFFLINE   TheSilencerPL

TheSilencerPL

    Advanced Member

  • Management
  • PipPipPipPip
  • 3098 posts
216
On the road to fame
  • LocationPoland

I don't know if there is such thing in the LUA (rather not), but we added a server cvar to show the real play time of the player, maybe this would help you.

http://mygamingtalk....#g_realPlayTime

 

EDIT1:

But you could write a lua plugin to track players time in each team, that is possible for sure.



#65
OFFLINE   Dragonji

Dragonji

    Advanced Member

  • Members
  • PipPipPipPip
  • 514 posts
142
On the road to fame
  • LocationPoland

I'm interested, mind I'd I ask you what would you use this info for? :)

I'd like to give extra XP bonus for every player of a winning team. Of course, to avoid jumping between teams at last seconds of the map just to get XP I'd like to check how long every player was a member of the team.



#66
OFFLINE   Zelly

Zelly

    Regular Member

  • Coders
  • PipPipPip
  • 141 posts
73
Getting Better

you may want to use this as reference: https://github.com/Z...aster/ZInfo.lua

The script it self isn't done, It is kind of on hold atm, probably some errors.

There I keep track of players team time, however I add it to their total , not just the maptime.







Also tagged with one or more of these keywords: lua, api, scripting

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users