Author Topic: New functionality - player's country in script  (Read 1072 times)

0 Members and 1 Guest are viewing this topic.

Offline Szaman

  • Soldier
  • **
  • Posts: 145
New functionality - player's country in script
« on: February 21, 2014, 04:46:08 pm »
I think that there should be possibility to check player's country in the script. If Soldat can show it in lobby then the script also should be able to check it.

GetPlayerStat(id, 'countrycode') -> PL, KR, TH, CL, ...
GetPlayerStat(id, 'country') -> Poland, Korea, Thailand, Chile...

What do you think about it?

Best regards,
Szaman.

Offline Falcon`

  • Flagrunner
  • ****
  • Posts: 792
  • A wanted lagger
Re: New functionality - player's country in script
« Reply #1 on: February 21, 2014, 05:30:16 pm »
AFAIK client gets server country info from lobby, which does not share any code with soldat. It's actually even written in another language.

As for checking country in scripts:
http://forums.soldat.pl/index.php?topic=39828.0
If you're not paying for something, you're not the customer; you're the product being sold.
- Andrew Lewis

Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live.

Offline Shoozza

  • Retired Soldat Developer
  • Veteran
  • ******
  • Posts: 1632
  • Soldat's Babysitter
    • Website
Re: New functionality - player's country in script
« Reply #2 on: February 21, 2014, 06:12:31 pm »
if you want to do that you could.
Country to ip databases exist.
Just get one and make the script take the player ip and look it up.

Any yeah the lobby is written in another language
Rules
Tools: ARSSE - SARS - SRB - chatMod