Jump to content

Fishy

Members
  • Posts

    8
  • Joined

  • Last visited

Posts posted by Fishy

  1. Okay, I fixed the problem. I now can find the resource and run it successfully, but it seems the code is broken.

    I took the code from wiki

    function greetPlayer ( )

    local joinedPlayerName = getPlayerName ( source )

    local serverName = getServerName( )

    outputChatBox ( "Helllo " .. joinedPlayerName .. " Wekcome to ".. serverName .."!" , source, 255, 255, 255 )

    end

    addEventHandler ( "onPlayerJoin", getRootElement(), greetPlayer )

    Btw, the problem was i named my meta "meta.xml" and you only have to name it "meta"

  2. Okay, So I have a resource that I can't start in the admin panel, the name does not even appear in the panel so I can't find it.

    It's a welcome message.

    The file is located here

    C:\Program Files (x86)\MTA San Andreas 1.4\server\mods\deathmatch\resources

    It is called message

    C:\Program Files (x86)\MTA San Andreas 1.4\server\mods\deathmatch\resources\message

    It has two folders inside, one is a .xml and one is a .lua

    I am nameing them : message.lua and meta.xml

    Names:

    message.lua & meta.xml

    Here are the codes for them

    Note : I am making a script not gamemode

    Meta.xml file

    message.lua file:

    function greetPlayer ( )

    local joinedPlayerName = getPlayerName ( source )

    local serverName = getServerName( )

    outputChatBox ( "Welcome " .. joinedPlayerName .. " to ".. serverName .."!" , source, 255, 255, 255 )

    end

    addEventHandler ( "onPlayerJoin", getRootElement(), greetPlayer )

    Please help me!

×
×
  • Create New...