Need Help with RP ATM SENT

*Fixed

cl_init.lua :
[lua]
include(‘shared.lua’)
//[[---------------------------------------------------------
//Name: Draw Purpose: Draw the model in-game.
//Remember, the things you render first will be underneath!
//-------------------------------------------------------]]

function ENT:Draw()
self.Entity:DrawModel()
end

function ATMDERMA()
ATM = vgui.Create( “DFrame” )
ATM:SetSize( 375, 105 )
ATM:SetPos( ScrW()/2-ATM:GetWide()/2, ScrH()/2-ATM:GetTall()/2 )
ATM:SetTitle( “Automated Teller Machine” )
ATM:SetVisible( true )
ATM:SetDraggable( false )
ATM:ShowCloseButton( true )
ATM:MakePopup()

DepositeButton = vgui.Create( "DButton" )
DepositeButton:SetParent( ATM )
DepositeButton:SetText( "Deposite" )
DepositeButton:SetPos( 25, 25 )
DepositeButton:SetSize( 150, 50 )
DepositeButton.DoClick = function ()
	if (tonumber(AmountEntry:GetValue())) then
		Amount = AmountEntry:GetValue()
		LocalPlayer():ConCommand("ATM_Deposite "..Amount)
	else
		LocalPlayer():ConCommand("ATM_errorhint")
	end
end
 
WithdrawButton = vgui.Create( "DButton" )
WithdrawButton:SetParent( ATM )
WithdrawButton:SetText( "Withdraw" )
WithdrawButton:SetPos( 200, 25 )
WithdrawButton:SetSize( 150, 50 )
WithdrawButton.DoClick = function ()
if (tonumber(AmountEntry:GetValue())) then
		Amount = AmountEntry:GetValue()
		LocalPlayer():ConCommand("ATM_Withdraw "..Amount)
	else
		LocalPlayer():ConCommand("ATM_errorhint")
	end
end

AmountEntry = vgui.Create("DTextEntry")
AmountEntry:SetParent( ATM )
AmountEntry:SetPos( 25, 80 )
AmountEntry:SetSize( 325, 20 )

end

usermessage.Hook(“OpenATMDerma”, ATMDERMA)
concommand.Add( “ATM”, ATMDERMA)
[/lua]

init.lua :
[lua]
AddCSLuaFile( “cl_init.lua” )
AddCSLuaFile( “shared.lua” )
include(‘shared.lua’)

function ENT:Initialize()
–self:SetModel( “models/props_silo/consolepanelloadingbay.mdl”)
–self:SetModel( “models/props/de_nuke/NuclearTestCabinet.mdl”)
self:SetModel( “models/props/de_nuke/equipment1.mdl”)
self:PhysicsInit(SOLID_VPHYSICS)
self:SetMoveType(MOVETYPE_VPHYSICS)
self:SetSolid(SOLID_VPHYSICS)
local phys = self:GetPhysicsObject()
if phys:IsValid() then phys:Wake() end

self.used = false
self.player = nil

end

function ENT:SpawnFunction( ply, tr )

if ( !tr.Hit ) then return end

local SpawnPos = tr.HitPos + tr.HitNormal * 25

local ent = ents.Create( "sent_atm" )
ent:SetPos( SpawnPos )
ent:Spawn()
ent:Activate()
return ent

end

function ENT:Use(activator)
if (!self.used) then
self.used = true
umsg.Start(“OpenATMDerma”, activator)
umsg.End()
timer.Simple(0.3,unuse,self)
end
end

function unuse(self)
self.used = false
end

concommand.Add( “ATM_errorhint”, function( ply, cmd, args )
WireLib.AddNotify(ply, “Please enter a numeric value.”, NOTIFY_GENERIC, 7)
end )

concommand.Add( “ATM_Deposite”, function( ply, cmd, args )
WireLib.AddNotify(ply, “Not ready yet.”, NOTIFY_GENERIC, 7)
end )

concommand.Add( “ATM_Withdraw”, function( ply, cmd, args )
WireLib.AddNotify(ply, “Not ready yet.”, NOTIFY_GENERIC, 7)
end )
[/lua]

shared.lua :
[lua]
ENT.Type = “anim”
ENT.Base = “base_gmodentity”
ENT.PrintName = “ATM”
ENT.Author = “Carocrazy132”
ENT.Contact = “RichyLC@Gmail.com
ENT.Purpose = “Acts as a medium between the customer and the bank.”
ENT.Instructions = “Is the money system for the FringeRP gamemode.”

ENT.Spawnable = true
ENT.AdminSpawnable = true
[/lua]

EDIT: Files changed a third time, SENT works, but it doesn’t actually do anything, it’s just the entity (Meaning it shows menus and everything but doesn’t actually interact with DarkRP), I may release a bank module for DarkRP later on.

You’re not sending the usermessage to anyone.

?? the wiki says that by default it sends it to everyone.

EDIT: I edited the op

So when someone uses the ATM, everyone gets a pop up enabling their mouse?

Seems like a great idea!

How about you stop being such a fucking dick, I created this two seconds ago, I know it doesn’t fucking work. The menu doesn’t even work properly, I never said it fucking works, it’s for a base that needs work not someone to stick in there gamemode and expect to be the next perp or darklands.

I fixed that for you since you don’t know how to add one word and a comma.

Calm down, change the

[quote]
tags to [lua] tags and actually explain what’s wrong.

It’s messy. Use [lua] tags

Nothing is wrong with it (that I can tell) anymore.
Quotes changed to lua.

I make my own shit dear, heck, I even make some money doing this stuff as a freelancer. I was just pointing out the obvious flaw in your SENT.

Also it’s still there :buddy:

Quick question, is this all your own code? If it isn’t, you’ll have a really hard time debugging it, because you probably won’t understand what’s going on.

btw on line 28 there is a bug it dont spawn unless u havent updated it here and can i use this on my server
when i get it working that is

this is what my console says
[lua]
Attempted to create unknown entity type sent_atm!
entities/menu/init.lua:28: Tried to use a NULL entity!
[/lua]

A) Updated, not sure what all I’ve changed since I posted that code but I know it sends the umsg to and only to the correct player now.

B) Don’t call me “dear”.

C) Yes it is all my own code.

D) Yes you can use it on your server. Are you trying to spawn it from the Q menu or do you have another file spawning them in place?

spawning it form the q menu till i work out a auto spawn script for the stuff

wasn’t ENT:Use broken?

No, you’re just doing it wrong.

Lol, first you bitch and moan about your Darkland ban then you come beg for help at Facepunch and flame anyone who tells you that your networking is bad.

its still broken i thought i fixed it but still same problem

errors?

no console errors

… Those are two COMPLETELY separate things.


(User was banned for this post ("Pointless bump" - mahalis))