Call function

i’m new to lua but i’m trying to run a car dealer script from client side so i can access the car dealer without having to go to it i’m trying something like this


	chatP("Running car dealer...")





But it’s not working the car dealer function is possibly incorrect so i’ll just post the function i would supply the whole lua but i’d get banned for sharing links

 function CarDealer:OpenDealer( dealer )

so yeah i’m not really sure where i went wrong

Why are you running the net message 31 times? Also do you have the car Dealer open function bound to the net message on the server? I.e. with net.Recieve

You probably just need to call CarDealer:OpenDealer( dealer ) clientside with a dealer npc or id or whatever it takes. Impossible to know without the original code so you probably need to ask the author for help

Hi do you have skype i can send you the lua

Waaaaaaaait a second…
You want to open client vgui of car dealer?
If so why you send net to server.Its doesnt open it.

Find server side function that send net to client and do something like this on server side :

function OpenCarDealer(ply)
        print ("Open Car Dealer")
        net.Start("Name of the net that open menu")

Its may works if car dealer opens by npc (Click E on NPC)

We don’t know if CarDealer:OpenDealer is serverside or clientside and the first parameter is a dealer NPC (I think) so you’d need to find the dealer first (read my post :))

Can you not ask the author because you didn’t buy it? :)))