/prop command - gives prop's location (such as model/x/x)
#1
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.
#2
+support, I see no disadvantages to this.
Regards,
 
[Image: mEVbpdN.png]
Thanks to Envy for the signature.
#3
+support
Kind Regards,
Floodify
#4
+support
Wolven

__________________________________________________________________
#5
+Support
Oh bollocks... I lost my Signature!
#6
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.
#7
+Support
[Image: tgRQtsH.png]
#8
+Support
#9
(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.
#10
(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.  Smile


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")




Forum Jump:


Users browsing this thread: 1 Guest(s)