[B]Hi again....[/B]
In my server(AGAIN) I need help! I have a thirdperson command for my server but I wanna know how to convert it into a button for everyone to use!?
You might need these details:
Commands: !3p and !thirdperson.
Console: ulx thirdperson.
Rank Usage: All Players.
Thirdperson Button I want:F2
[QUOTE=code_gs;48728616][img]http://wiki.garrysmod.com/favicon.ico[/img] [url=http://wiki.garrysmod.com/page/GM/ShowTeam]GM/ShowTeam[/url][/QUOTE]
How will this help me?
[QUOTE=Haunted Pyro;48729661]How will this help me?[/QUOTE]
That function is called when F2 is pressed. Run whatever you need to in there.
[QUOTE=code_gs;48729724]That function is called when F2 is pressed. Run whatever you need to in there.[/QUOTE]
OOOOOOOHHHHHHH ok. So do I put the console command in the slot?
[QUOTE=Haunted Pyro;48729749]OOOOOOOHHHHHHH ok. So do I put the console command in the slot?[/QUOTE]
Yes, use ply:ConCommand().
[QUOTE=code_gs;48729754]Yes, use ply:ConCommand().[/QUOTE]
What Folder?
[QUOTE=Haunted Pyro;48729758]What Folder?[/QUOTE]
Either lua/autorun/server in a hook format, or implement it into your gamemode to prevent conflicts with other things being binded to that key.
[QUOTE=code_gs;48729767]Either lua/autorun/server in a hook format, or implement it into your gamemode to prevent conflicts with other things being binded to that key.[/QUOTE]
ok this will probs be the 2nd last question but... So I want to put it in the deathrun gamemodes folder but I don't know where? Can you Give me directory to there?
This time use "Backward Slash" for the directory.
[QUOTE=Haunted Pyro;48729791]ok this will probs be the 2nd last question but... So I want to put it in the deathrun gamemodes folder but I don't know where? Can you Give me directory to there?
This time use "Backward Slash" for the directory.[/QUOTE]
Probably gamemodes\deathrun\gamemode\init.lua, but it depends on the gamemode's implementation.
[QUOTE=code_gs;48729825]Probably gamemodes\deathrun\gamemode\init.lua, but it depends on the gamemode's implementation.[/QUOTE]
I can't find it?
Could you try on your computer and see what you can find?
And if I do find it do I make a new string or find the string?
[QUOTE=Haunted Pyro;48729829]I can't find it?
Could you try on your computer and see what you can find?
And if I do find it do I make a new string or find the string?[/QUOTE]
I don't have your deathrun. Also, you know these paths are relative to your garrysmod folder, right?
[QUOTE=code_gs;48730721]I don't have your deathrun. Also, you know these paths are relative to your garrysmod folder, right?[/QUOTE]
Yes I know that they are in that folder.
But where? And when was there a different death Run?
Plus I still need help on the admin colours.
[editline]22nd September 2015[/editline]
[QUOTE=code_gs;48729767]Either lua/autorun/server in a hook format, or implement it into your gamemode to prevent conflicts with other things being binded to that key.[/QUOTE]
This was an earlier quote but this was probably the most help so far.
I COMPLETELY forgot what a hook format is.
and I wanna put it in the directory lua\autorun\server but there is nothing there?
Create a new file. [url]http://wiki.garrysmod.com/page/hook/Add[/url]
[QUOTE=code_gs;48735931]Create a new file. [url]http://wiki.garrysmod.com/page/hook/Add[/url][/QUOTE]
This seems a bit TOO complex for me! Can you send me a folder with everything I need through E-Mail?
[EMAIL="arctic_foxy@outlook.com"]arctic_foxy@outlook.com[/EMAIL]
Can you attempt to make something?
[QUOTE=code_gs;48740469]Can you attempt to make something?[/QUOTE]
Not Really. 'Cos it's a bit too complex. Yeah I'm good at computers but not really coding!
Just try with what I gave you, even if you know its wrong. As a reminder, the first argument of hook.Add is the function (ShowTeam) and the second can be anything you want.
[QUOTE=code_gs;48741621]Just try with what I gave you, even if you know its wrong. As a reminder, the first argument of hook.Add is the function (ShowTeam) and the second can be anything you want.[/QUOTE]
Wait so after: hook.add do I place the ConCommand?
[QUOTE=Haunted Pyro;48741785]Wait so after: hook.add do I place the ConCommand?[/QUOTE]
Yes.
[QUOTE=code_gs;48742491]Yes.[/QUOTE]
will this work?
[QUOTE]hook.Add( "ulx thirdperson", "F2", function()
print( "Thirdperson is activated" )
end )[/QUOTE]
[QUOTE=Haunted Pyro;48747856]will this work?[/QUOTE]
The first argument actually refers to the function name, not the command. Try this:
[code]hook.Add( "ShowTeam", "F2", function( ply )
ply:ConCommand( "ulx thirdperson" )
end )[/code]
Sorry, you need to Log In to post a reply to this thread.