Jump to content

getResourceFromName client-side


Et-win

Recommended Posts

outputChatBox(tostring(getResourceFromName("race"))) 

This always returns 'false' in client-side, I'm wondering why? (Server-side works only)

EDIT: If I use

outputChatBox(tostring(getResourceFromName("admin"))) 

it works fine. Why doesn't this work with "race"?

Link to comment

I found out that the resource needs to be running when using 'getResourceFromName'.

So I have an editbox and can fill in any name and want to check if it exists. How can I do this when I can't use 'getResourceFromName' when the resource is not running?

Link to comment

just like you can't get a player from getPlayerFromName while he/she is offline, you can't get a resource with getResourceFromName if it's not running.

you can use serverside and use getResources() and check if it exists server-side

if you insist on client-side then idk, i didn't really use this client-sided nor i needed to

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...