• NPC Shop
    8 replies, posted
Give me a basic script to remove the jobs from the F4 menu in DarkRP and make it only accessable when you interact with an NPC.
bump
[QUOTE=Dave_Parker;23853683]Say please.[/QUOTE] I guess you are sorta right. :/ I am sorry. Please can I have a code to where you can access the jobs menu only from an NPC?
Bump
Just call it when you Use an npc.
Okay I am really not that advanced with LUA nad I am sorry for being so "requesty". lol. Could I have a code for that please? :/
I dont know what the command is, but I'll explain how/when/what calling is. [code]function Hello(ply) for k, v in pairs (player.GetAll()) do if v:IsAdmin() then ply:ChatPrint("You have respawned!") end end end hook.Add("PlayerSpawn", "SpawnMessage", Hello)[/code] We've hooked the function to the "PlayerSpawn" function, which is being [i]called[/i] when the player spawns. If you have an Entity, you do this, forexample: [code] function ENT:Use( activator, caller ) for k, v in pairs (player.GetAll()) do v:PrintMessage(HUD_PRINTCENTER, "Someone used me!") end end [/code] The function is getting [i]called[/i], when the entity is being used.
OH okay. Well, I just took the jobs derma menu and added it to my NPC, and now it works fine. Thanks for the help, though!
Sorry, you need to Log In to post a reply to this thread.