{"name":"score","operator":null,"title":"score","type":"command","url":"https://community.bistudio.com/wiki/score","revid":352995,"updated":"2024-03-09T10:17:34Z","groups":["Multiplayer"],"status":"ok","replaced_by":[],"games":[{"game":"ofp","name":"Operation Flashpoint","version":"1.00"},{"game":"ofpe","name":"Operation Flashpoint: Elite","version":"1.00"},{"game":"arma1","name":"Armed Assault","version":"1.00"},{"game":"arma2","name":"Arma 2","version":"1.00"},{"game":"arma2oa","name":"Arma 2: Operation Arrowhead","version":"1.50"},{"game":"tkoh","name":"Take On Helicopters","version":"1.00"},{"game":"arma3","name":"Arma 3","version":"0.50"}],"since":{"game":"ofp","name":"Operation Flashpoint","version":"1.00"},"arma3_since":"0.50","branch":null,"locality":{"argument":null,"effect":null,"server_exec":false},"exec":null,"description":"Returns the person's score in MP.","syntaxes":[{"syntax":"score unit","since":null,"effect":null,"exec":null,"params":[{"name":"unit","type":"Object","optional":false,"default":null,"description":null,"types":["Object"],"since":null,"text":"unit: Object"}],"returns":{"type":"Number","types":["Number"],"description":null,"text":"Number"},"form":"unary","operator":null,"left":null,"right":{"text":"unit","types":["Object"]}}],"examples":[{"text":"```sqf\n_pScore = score player;\n```","code":["_pScore = score player;"]}],"multiplayer":null,"problems":null,"aliases":[],"see_also":["addScore","scoreSide","addScoreSide","getPlayerScores"],"notes":[{"user":"Aimgame","date":"2024-03-09T10:17:34Z","text":"In MP **score player** returns only the score of player in faction he joined first (within one server session).\n\nI.e. if he first logged for WEST faction and then relogged for another faction, **score player** will show his score when he was WEST, no matter what real score is in current faction.\n\nIn this regard it is better to use getPlayerScores:\n\n```sqf\n(getPlayerScores player) select (count (getPlayerScores player) - 1)\n```\n\nor\n\n```sqf\n(getPlayerScores player) select 5\n```\n\n- it will always return the player's actual score in the current faction."}],"categories":["ArmA: Armed Assault: Scripting Commands","Arma 2: Operation Arrowhead: Scripting Commands","Arma 2: Scripting Commands","Arma 3: Scripting Commands","Command Group: Multiplayer","Introduced with Operation Flashpoint version 1.00","Operation Flashpoint: Elite: Scripting Commands","Operation Flashpoint: New Scripting Commands","Operation Flashpoint: Scripting Commands","Scripting Commands","Take On Helicopters: Scripting Commands"]}