• [Help Needed] Running a Console command if a certain player model.
    2 replies, posted
Hello! , I was wondering if it was possible to run a console command if the player is a specific model example of what I mean below. if (ply:GetModel() == "models/Combine_Super_Soldier.mdl") (The command I am trying to use here "pp_mat_overlay effects/combine_binocoverlay.vmt") Any help is appreciated, I will provide more details to what I am trying to do if needed.
if (ply:GetModel() == "models/Combine_Super_Soldier.mdl") then RunConsoleCommand("pp_mat_overlay", "effects/combine_binocoverlay.vmt") end RunConsoleCommand
Quick note, if you want to run the console command on a specific player, which seems to be the case, then use Player/ConCommand instead. Alternatively, if this is clientside code, then the snippet above will run the console command on the local player. Either way works, sorry for mini-bump.
Sorry, you need to Log In to post a reply to this thread.