So, I am trying to set it so when an admin joins, they get infinite money in Darkrp. In darkrp, infinite money only lasts 1 instance, so I would have it so every time you join, it sets admins to have infinite money. I am trying to make that code, and i am new to lua coding, so i was wondering if i could get some help. The console command for setting money is
rp_setmoney NAME AMOUNT
so i would want
rp_setmoney Bazoogle inf
I made this
hook.Add( "PlayerConnect", "test", function( ply ) if ( ply:IsAdmin() ) then concommand.Run( self, rp_setmoney, inf ) Msg("Money set") else Msg("You are not an admin") end end)
and put it in lua/autorun/client and I have no idea what to set the target to… Could anyone help?