Modme Forums

Script username based

Game Modding | Call of Duty: Black Ops 3 | General Discussion


ModmeBot:

Thread By: simplyzak09
Hi, I know this was somewhat possible in waw
but is it possible in bo3 to have a script that checks the
players steam ID and if the game detects a certain player
with a certain name it’ll trigger one set of code or if the player
who triggers it doesn’t go by that user name it does something else.


ModmeBot:

Reply By: mathfag
You can do

foreach(player in getplayers())
{
player thread check_name();
}



function check_name()
{
iprintlnbold(self); //prints the player steam name
if(self == "insert username here")
{
do stuff
}


}
Never tested this tho


ModmeBot:

Reply By: Scobalula

mathfag
You can do foreach(player in getplayers()) { player thread check_name(); } function check_name() { iprintlnbold(self); //prints the player steam name if(self == "insert username here") { do stuff } } Never tested this tho


The player/s are just entities, the player's name is stored on them:


player_name = player.name;


ModmeBot:

Reply By: Harry Bo21

player.playername

thats to get the players steam name or whatever if thats the question