05-15-2017, 02:28 PM (This post was last modified: 09-01-2022, 01:06 AM by Fearless Community. Edited 2 times in total.
Edit Reason: Checked Encoding
)
Title of Suggestion: ^
Description: A /prop command, which will print the prop the user is looking at. My Example:
Spoiler :
Code:
hook.Add( "PlayerSay" , "SayPlayer" , function( ply, text, tChat )
text = string.lower( text )
if ( text == "/prop" ) then
local eye = ply:GetEyeTrace()
if IsValid(eye.Entity) then
PrintMessage(HUD_PRINTTALK,"Model: ".. eye.Entity:GetModel())
else
PrintMessage(HUD_PRINTTALK,"This is not a physics prop!")
end
end
end )
^ Something simple, just like that.
Looking at 2x4 metal phx prop response =
Model: models/props_phx/construct/metal_plate2x4.mdl
Why: Times I have been asked what prop I am using in a build, or other people want to know. This is a simple solution to that.
05-15-2017, 02:45 PM (This post was last modified: 09-01-2022, 01:06 AM by Fearless Community.
Edit Reason: Checked Encoding
)
I've seen this suggested before, no idea where the suggestion went though.
This would be a good addition, both for the author of a build but also for people wanting to know what props people use to build with.
+Support
Side note: The code you've posted in the OP would not fit FL as it doesn't follow the general CityRP command structure.
05-15-2017, 02:53 PM (This post was last modified: 09-01-2022, 01:06 AM by Fearless Community.
Edit Reason: Checked Encoding
)
(05-15-2017, 02:45 PM)SnowredWolf Wrote: I've seen this suggested before, no idea where the suggestion went though.
This would be a good addition, both for the author of a build but also for people wanting to know what props people use to build with.
+Support
Side note: The code you've posted in the OP would not fit FL as it doesn't follow the general CityRP command structure.
Ah, learning gLua now so just something simple I threw together.
05-15-2017, 03:03 PM (This post was last modified: 09-01-2022, 01:06 AM by Fearless Community.
Edit Reason: Fixed Encoding
)
(05-15-2017, 02:53 PM)connbob Wrote:
(05-15-2017, 02:45 PM)SnowredWolf Wrote: I've seen this suggested before, no idea where the suggestion went though.
This would be a good addition, both for the author of a build but also for people wanting to know what props people use to build with.
+Support
Side note: The code you've posted in the OP would not fit FL as it doesn't follow the general CityRP command structure.
Ah, learning gLua now so just something simple I threw together.
Something like this would probably work, just wrote it quickly to give you a general idea.
Spoiler :
Code:
-- Command to print path of current prop the user is looking at
cityrp.command.add("getprop", "b", 0, function(ply)
local ent = ply:GetEyeTrace().Entity
if IsEntity(ent) then
ply:ChatPrint(ent:GetModel())
else
ply:Notify("You are not aiming at a valid entity!", 1)
end
end, "Commands", "<none>", "Prints the path of the prop you are looking at")