Author Topic: [Suggustion] GetPlayer/ObjectStat for Stance,Ground,Time (+more)  (Read 944 times)

0 Members and 1 Guest are viewing this topic.

Offline DorkeyDear

  • Veteran
  • *****
  • Posts: 1507
  • I also go by Curt or menturi
Functions:
I woke up this morning thinking about this one.
GetPlayerStat(#,'Stance'): byte;
When standing, result is 0; when crouching, result is 1; when proning (sp?), result is 2; or whatever you wish it to be if this is implemented.

GetObjectStat(#,'Ground'): boolean;
Pretty much the same as GetPlayerStat except this is getting if an object is on the ground or not.

GetObjectStat(#,'Time'): integer;
Probably not a high priority, but indefinitely could be used for something.

GetPlayerStat(#,'Time'): integer;
I suggest having it tell the time in seconds. I think showing this in seconds would be much more helpful to people than minutes. Same with the GetObjectStat for Time, if that is going to be implemented.

EDIT:
And also a few more suggestions:
Events:
OnPlayerConnect(ID: byte);
Called before a player chooses a team but called after the player requested the game and downloaded the map and right before going into the team choosing window.
I'm not sure when a player is given an ID, but I hope it is before he chooses a team. If not, then replaces the ID: byte with IP: string.

OnPlayerDisconnect(ID, Team: byte); (Or OnLeaveGame called when disconnect)
Same thing as OnLeaveGame but this includes when a player is disconnected. I only heard that OnLeaveGame isn't called when a player is disconnected, but I don't know that for sure. If that is true then I suggest having OnLeaveGame be called when a player disconnects and not having this procedure.

EDIT:
Global variable thingy muh-bobber
Pause...
0 = not paused
1 = paused
(i forgot that u can't have booleans in global things, (how strange), so i edit this)
« Last Edit: June 04, 2007, 11:32:16 am by DorkeyDear »

Offline spkka

  • Camper
  • ***
  • Posts: 469
Re: [Suggustion] GetPlayer/ObjectStat for Stance,Ground,Time
« Reply #1 on: June 02, 2007, 09:35:27 am »
hey dorkeydear check this its in the new version:

Changes from 2.6.0 -> 2.6.1

- Added BotChat function
  Make a BOT says the specified text. ONLY BOTS.
- Added CreateBullet function
  Have fun! Creates a bullet/projectile on both server/client.
- Added "Ground" stat to the GetPlayerStat function
  Boolean of wether or not the player is in air or on the ground.
- Added "Human" stat to the GetPlayerStat function
  Boolean of wether or not the player is a human or a bot. (True if human)
- Added GetObjectStat function
  Get some stats about a spawned/pre-created map object.

- Modified Command function now has a return varaible (For some commands only)
- Modified SetWeaponActive function can now use ID 0 to send to all players.
- Removed server no longer disables scripting upon Run-Time error.
- Fixed WriteLnFile & WriteFile commands causing an access violation.
- Fixed Script Encryption system
- Fixed weapons created with SpawnObject having weird ammo.
- Fixed ForceWeapon to work on bots
- Removed Split() function from the Scripting Core
  Why? Because the TStringArray causes problems with soldatserver<->scripting

Offline DorkeyDear

  • Veteran
  • *****
  • Posts: 1507
  • I also go by Curt or menturi
Re: [Suggustion] GetPlayer/ObjectStat for Stance,Ground,Time
« Reply #2 on: June 02, 2007, 11:21:25 am »
Yeah, I've looked at that before I posted this.