Player - DoktorSAS/IW6X-S1X-Scripting-Guide GitHub Wiki
Player function
Functions of an entity can be called using the variable representing the entity as a prefix. In fact, we can call functions directly addressed to the entity called as a prefix.
| Function Name | Function Call | Description |
|---|---|---|
| freezecontrols | player:freezecontrols( boolean ) |
This function can be used to block a player from moving |
| iclientprintlnbold | player:iclientprintlnbold( String ) |
This function can be used print on the center of the screen a message |
| takeallweapons | player:takeallweapons( ) |
This function can be used to remove all the weapons to a player |
Player data
The infomations of an entity are contained in the object itself. In fact through the variable that will represent the entity we can go back to various information.
| Data Name | Data Call | Description |
|---|---|---|
| name | player.name |
This data value contains the name of the player |
| score | player.score |
This data value contains the score of the player |
| kills | player.kills |
This data value contains the kills of the player |
| health | player.health |
This data value contains the health of the player |
| deaths | player.deaths |
This data value contains the deaths of the player |
| sessionstate | player.sessionstate |
This data value contains the sessionstate of the player |
| forcespectatorclient | player.forcespectatorclient |
This data value contains the forcespectatorclientof the player |
| team | player.team |
This data value contains the team of the player |
| assists | player.assists |
This data value contains the assists of the player |
| extrascore0 | player.extrascore0 |
This data value contains the extrascore0 of the player |
| extrascore1 | player.extrascore1 |
This data value contains the extrascore1 of the player |
| adrenaline | player.adrenaline |
This data value contains the adrenaline of the player |
| classname | player.classname |
This data value contains the classname of the player |
| code_classname | player.code_classname |
This data value contains the code_classname of the player |
| origin | player.origin |
This data value contains the origin of the player |
| angles | player.angles |
This data value contains the angles of the player |
| model | player.model |
This data value contains the model of the player |
| statusicon | player.statusicon |
This data value contains the statusicon of the player |
| headicon | player.headicon |
This data value contains the headicon of the player |
| headiconteam | player.headiconteam |
This data value contains the headiconteam of the player |
| hasradar | player.hasradar |
This data value contains the hasradar of the player |
| isradarblocked | player.isradarblocked |
This data value contains the isradarblocked of the player |
| radarstrength | player.radarstrength |
This data value contains the radarstrengthof the player |
| radarshowenemydirection | player.radarshowenemydirection |
This data value contains the radarshowenemydirection of the player |
| threatbias | player.threatbias |
This data value contains the threatbias of the player |
| ignoreme | player.ignoreme |
This data value contains the ignoreme of the player |
| ignoreall | player.ignoreall |
This data value contains the ignoreall of the player |
| ignorerandombulletdamage | player.ignorerandombulletdamage |
This data value contains the ignorerandombulletdamage of the player |
| maxvisibledist | player.maxvisibledist |
This data value contains the maxvisibledist of the player |
| surprisedbymedistsq | player.surprisedbymedistsq |
This data value contains the surprisedbymedistsq of the player |
| attackeraccuracy | player.attackeraccuracy |
This data value contains the attackeraccuracy of the player |
| dodamagetoall | player.dodamagetoall |
This data value contains the dodamagetoall of the player |
| turretinvulnerability | player.turretinvulnerability |
This data value contains the turretinvulnerability of the player |
| onlygoodnearestnodes | player.onlygoodnearestnodes |
This data value contains the onlygoodnearestnodes of the player |
local player = { name = nil,
score = nil,
kills = nil,
assists = nil,
deaths = nil,
health = nil,
maxhealth = nil,
sessionstate = nil,
forcespectatorclient = nil,
team = nil,
extrascore0 = nil,
extrascore1 = nil,
adrenaline = nil,
classname = nil,
code_classname = nil,
origin = nil,
angles = nil,
model = nil,
statusicon = nil,
headicon = nil,
headiconteam = nil,
hasradar = nil,
isradarblocked = nil,
radarstrength = nil,
radarshowenemydirection = nil,
threatbias = nil,
ignoreme = nil,
ignoreall = nil,
ignorerandombulletdamage = nil,
maxvisibledist = nil,
surprisedbymedistsq = nil,
attackeraccuracy = nil,
dodamagetoall = nil,
turretinvulnerability = nil,
onlygoodnearestnodes = nil
}