setResourceInfo | Multi Theft Auto: Wiki Skip to content

setResourceInfo

Client-side
Server-side
Shared

This page is incomplete! Help wanted!

Please finish this page using the corresponding Old Wiki article.
Go to Contribution guidelines for more information.


This function sets the value of any attribute in a resource info tag.

Note

This function requires the resource to have 'ModifyOtherObjects' ACL right.

Syntax

setResourceInfo ( )

Code Examples

server

This function sets the author of the current resource.

function outputAuthor(newAuthorName)
author = getResourceInfo ( getThisResource(), "author" ) --Get the authors name
if author then --if it exists
outputChatBox( author .. " made this script." ) --tell the world his name
else --if it doesn't
setResourceInfo ( getThisResource(), "author", newAuthorName )
outputChatBox( "Author set to: "..newAuthorName ) --tell them that it was set
end
end