Forum

> > CS2D > Scripts > player(id,"function")
Forums overviewCS2D overview Scripts overviewLog in to reply

English player(id,"function")

2 replies
To the start Previous 1 Next To the start

old player(id,"function")

Gaios
Reviewer Off Offline

Quote
What are the features you know the type: player(id,"name") or player(id,"weapon") ?

Please print all functions. Since each bit by bit.

old Re: player(id,"function")

MikuAuahDark
User Off Offline

Quote
cs2d lua cmd player has written
Returns a value of a player:
• exists: boolean, true if player with this ID exists, false otherwise
• name: name of the player
• ip: IP address of the player
• port: Port of the player
• usgn: Unreal Software Gaming Network / UnrealSoftware.de user ID
• ping: current ping (ms)
• idle: idle time (no movement) in seconds
• bot: boolean, true if player is a bot, false otherwise
• team: 0 for spec, 1 for t, 2 for ct, 3 for VIP (ct)
• look: player look (0-3) = selected skin
• x: current x position on map (in pixels)
• y: current y position on map (in pixels)
• rot: current rotation angle
• tilex: current x position on map (in tiles)
• tiley: current y position on map (in tiles)
• health: health value
• armor: armor value
• money: money value
• score: score (kills+mission goals)
• deaths: number of deaths
• teamkills: teammates killed
• hostagekills: hostages killed
• teambuildingkills: buildings of own team killed
• weapontype: type of current weapon
• nightvision: boolean, true if has a nightvision, false otherwise
• defusekit: boolean, true if has a defusekit, false otherwise
• gasmask: boolean, true if has a gasmask, false otherwise
• bomb: boolean, true if has bomb, false otherwise
• flag: boolean, true if has a flag, false otherwise
• reloading: boolean, true if is currently reloading, false otherwise
• process: current process (internal id for reloading/planting/defusing...)
• sprayname: name of spaylogo
• spraycolor: color of spraylogo
• votekick: current vote for kicking (player id or 0 for none)
• votemap: current vote for map change (or empty string for none)
• favteam: favorite team
• speedmod: speedmod value
• maxhealth: maximum health
• rcon: boolean, true if logged in with correct RCon password, false otherwise

Moreover there is:
• player(0,"table"): a Lua table with all player IDs
• player(0,"tableliving"): a Lua table with all living player IDs
• player(0,"team1"): a Lua table with all terrorist IDs
• player(0,"team2"): a Lua table with all counter-terrorist IDs
• player(0,"team1living"): a Lua table with all living terrorist IDs
• player(0,"team2living"): a Lua table with all living counter-terrorist IDs
To the start Previous 1 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview