advisorsvur.blogg.se

Detect darkrp gmod lua
Detect darkrp gmod lua






detect darkrp gmod lua

In this script, we add a chat command that creates cash from nothing. Otherwise, all players will see the chatcommand and arguments in their chat boxes! When using DarkRP chat commands, you must return a empty string. Trace.endpos = trace.start + ply:GetAimVector ( ) * 85Īnd finally, we create the money using the trace information:ĭarkRPCreateMoneyBag (tr.HitPos, amount ) Next, we create a trace object of where the playing is looking at. Ply:ChatPrint ( "You are not authorized to use this chat command!" ) return end Notify (ply, 1, 4, string.format (LANGUAGE.invalid_x, "argument", "" ) ) return "" end if ply:IsSuperAdmin ( ) then This little script will help you to detect backdoors that may be on. Has to be 7 or above or the player wont be able to move. Local amount = math.floor ( tonumber (args ) ) if amount <= 1 then Gmod darkrp free download keyword after analyzing the system lists the list of keywords. Next, we check if the value they are trying to create is lower than 1, or if the player that is trying to create cash, is not a superadmin. Local function CreateCash (ply, args ) if args = "" then return "" end if not tonumber (args ) then return "" end local amount = math.floor ( tonumber (args ) ) if amount It should work just the same, but the work wont get lost at updates.Īdd the following code to the bottom of a: You could also paste this in a new lua file in gamemodes/modules. In this tutorial we will be using the default DarkRP a file! I will be showing you how to add a new chat command that creates money from nothing! Welcome to the tutorial, in this tutorial.








Detect darkrp gmod lua