Jump to content

v0nz

Members
  • Posts

    11
  • Joined

  • Last visited

Posts posted by v0nz

  1. Question 1: Simple. How can I create icon that you go to and automaticly enter interiors. Im just asking, what is the code, simplified.

    Question 2: Say I wanted to create an icon at 24/7, then you go in. How can I create a command /buy and a GUI pop up with the items.

  2. -- define our chat radius 
      
    local chatRadius = 20 --units 
      
    -- define a handler that will distribute the message to all nearby players 
    function sendMessageToNearbyPlayers( message, messageType ) 
        -- we will only send normal chat messages, action and team types will be ignored 
        if messageType == 0 then 
            -- get the chatting player's position 
            local posX, posY, posZ = getElementPosition( source ) 
             
            -- create a sphere of the specified radius in that position 
            local chatSphere = createColSphere( posX, posY, posZ, chatRadius ) 
            -- get a table all player elements inside it 
            local nearbyPlayers = getElementsWithinColShape( chatSphere, "player" ) 
            -- and destroy the sphere, since we're done with it 
            destroyElement( chatSphere ) 
             
            -- deliver the message to each player in that table 
            for index, nearbyPlayer in ipairs( nearbyPlayers ) do 
                outputChatBox( message, nearbyPlayer ) 
            end 
        end 
    end 
    -- attach our new chat handler to onPlayerChat 
    addEventHandler( "onPlayerChat", getRootElement(), sendMessageToNearbyPlayers ) 
      
    -- define another handler function that cancels the event so that the message won't be delivered through the  
    function blockChatMessage() 
        cancelEvent() 
    end 
    -- attach it as a handler to onPlayerChat 
      
      
    addEventHandler( "onPlayerChat", getRootElement(), blockChatMessage ) 
    

    I am trying to make it... A name: "Chat"

    I was looking at outputChatBox( message, nearbyPlayer ). Adding getClientName: does not work.

  3. I have been starting to learn Lua and I get it a bit. I was just wondering if anyone could help me with a roleplay script I am starting to create. If you have ventrilo, we could talk in that. Im just new to Lua and I could use some help.

  4. 1 more question:
    I have been trying to learn Lua but I just cant seem to find the solution

    Solution to what exactly?

    What I mean by solution is pretty much overall, I cannot get it. I must say, I am not a very patient person. When wikipedia explains things, I am not one of those people who can learn when they read something. I like to be taught verbally. I could not find any video tutorials on Lua. I would love it if someone could help.

  5. I am new, as you can see (1 Post). I am just wondering is there any roleplay script that are public? I have been looking for a roleplay script for MTA because I believe it would be 100% better than SAMP. If there is not a script, I was wondering if any scripter would want to work on a project. I would have all the information about the script that will have details. I really want to create a MTA RP server. I have seen MTA does not have as many people as SAMP but with roleplay server up, I can get a lot of people to join. I like roleplay, I was just wondering if someone could take a while of there time to do such a thing. I have been trying to learn Lua but I just cant seem to find the solution. Thanks.

×
×
  • Create New...