Jump to content

teronrussell

Members
  • Posts

    17
  • Joined

  • Last visited

Posts posted by teronrussell

  1. Editor      = {} 
    Gate        = {} 
    Gate2       = {} 
    Precision   = {} 
    status      = {} 
    coll        = {} 
    coll2        = {} 
    coll3        = {} 
    coll4        = {} 
      
     -- this script mod is (no longer) PRIVATE 
     -- - Deject3d 
      
    function startBuilding(playerSource, commandName, objectid) 
        if not objectid then 
            outputChatBox("usage: /addgate objectid teamname", playerSource) 
            return false 
        end 
             
        team = getTeamName(getPlayerTeam(playerSource)) 
        if team == false then 
            team = "" 
        end 
        for i = 1,20 do 
            if Editor[i] == playerSource then 
                destroyElement(Gate[i]) 
                Gate[i] = null 
                Editor[i] = null 
                Precision[i] = null 
            end 
            if Editor[i] == null then 
                Editor[i] = playerSource -- set Editor[i] to who made the object 
      
                    --creating object -v 
                local x,y,z = getElementPosition(playerSource) 
                object = createObject ( objectid, x + 3,y + 3,z) 
                interior = getElementInterior ( playerSource ) 
                setElementInterior(object,interior) 
    

    now i have a warning for lines 20,36,38

  2. Editor      = {} 
    Gate        = {} 
    Gate2       = {} 
    Precision   = {} 
    status      = {} 
    coll        = {} 
    coll2        = {} 
    coll3        = {} 
    coll4        = {} 
      
     -- this script mod is (no longer) PRIVATE 
     -- - Deject3d 
      
    function startBuilding(playerSource, commandName, objectid) 
        if not objectid then 
            outputChatBox("usage: /addgate objectid teamname", playerSource) 
        end 
             
        team = getTeamName(getPlayerTeam(playerSource)) 
        if team == false then 
            team = "" 
        end 
        for i = 1,20 do 
            if Editor[i] == playerSource then 
                destroyElement(Gate[i]) 
                Gate[i] = null 
                Editor[i] = null 
                Precision[i] = null 
            end 
            if Editor[i] == null then 
                Editor[i] = playerSource -- set Editor[i] to who made the object 
      
                    --creating object -v 
                local x,y,z = getElementPosition(playerSource) 
                object = createObject ( objectid, x + 3,y + 3,z) 
                interior = getElementInterior ( playerSource ) 
                setElementInterior(object,interior) 
    

    i need help i keep getting warning errors at lines:19,25,35,37

  3. i have seen in many servers gang bases with movable gates.can some one explain/help me how to get a gat like that

    i know they say a code and it moves or if they are in a certain group it moves for them ? help

  4. 1. I'm having a problem with my script

    2. When I go into my server and go on the resource panel i see my script but when i click start nothing happens

    3. heres my script i'm trying to make a login panel

    function createLoginWindow() 
        local X = 0.375 
        local Y = 0.375 
        local Width = 0.25 
        local Height = 0.25 
        wdwLogin = guiCreateWindow(X, Y, Width, Height, "Please Log In", true) 
      
        
        X = 0.0825 
        Y = 0.2 
        
        Width = 0.25 
        Height = 0.25 
        
        guiCreateLabel(X, Y, Width, Height, "Username", true, wdwLogin) 
        
        Y = 0.5 
        guiCreateLabel(X, Y, Width, Height, "Password", true, wdwLogin) 
      
      
        X = 0.415 
        Y = 0.2 
        Width = 0.5 
        Height = 0.15 
        edtUser = guiCreateEdit(X, Y, Width, Height, "", true, wdwLogin) 
        Y = 0.5 
        edtPass = guiCreateEdit(X, Y, Width, Height, "", true, wdwLogin) 
        
        guiEditSetMaxLength(edtUser, 50) 
        guiEditSetMaxLength(edtPass, 50) 
      
        X = 0.415 
        Y = 0.7 
        Width = 0.25 
        Height = 0.2 
        btnLogin = guiCreateButton(X, Y, Width, Height, "Log In", true, wdwLogin) 
      
        
        guiSetVisible(wdwLogin, false) 
    end 
    addEventHandler("onClientResourceStart", getResourceRootElement(getThisResource()), 
        function () 
            createLoginWindow() 
        end 
    ) 
    addEventHandler("onClientResourceStart", getResourceRootElement(getThisResource()), 
        function () 
            -- create the log in window and its components 
            createLoginWindow() 
      
            -- output a brief welcome message to the player 
                    outputChatBox("Welcome to RealWorldGaming, please log in.") 
      
            -- if the GUI was successfully created, then show the GUI to the player 
                if (wdwLogin ~= nil) then 
                guiSetVisible(wdwLogin, true) 
            else 
                -- if the GUI hasnt been properly created, tell the player 
                outputChatBox("An unexpected error has occurred and the log in GUI has not been created.") 
                end 
      
            -- enable the players cursor (so they can select and click on the components) 
                showCursor(true) 
            -- set the input focus onto the GUI, allowing players (for example) to press 'T' without the chatbox opening 
                guiSetInputEnabled(true) 
        end 
    ) 
    function clientSubmitLogin(button,state) 
        if button == "left" and state == "up" then 
            
            local username = guiGetText(edtUser) 
            
            local password = guiGetText(edtPass) 
      
            
            if username and password then 
                
                triggerServerEvent("submitLogin", getRootElement(), username, password) 
      
                
                guiSetInputEnabled(false) 
                guiSetVisible(wdwLogin, false) 
                showCursor(false) 
            else 
                
                outputChatBox("Please enter a username and password.") 
            end 
        end 
    end 
    function loginHandler(username,password) 
        -- check that the username and password are correct 
        if username == "user" and password == "apple" then 
            -- the player has successfully logged in, so spawn them 
            if (client) then 
                spawnPlayer(client, 1959.55, -1714.46, 10) 
                fadeCamera(client, true) 
                outputChatBox("Welcome RealWorldGaming.", client) 
            end 
        else 
            -- if the username or password are not correct, output a message to the player 
            outputChatBox("Invalid username and password. Please re-connect and try again.",client) 
            end         
    end 
      
    addEvent("submitLogin",true) 
    addEventHandler("submitLogin",root,loginHandler) 
    

    4. i didnt get any warning non of my resources failed its just nothing happened

  5. WHERE DID I MESS UP :(

      
      
    function createLoginWindow() 
        local X = 0.375 
        local Y = 0.375 
        local Width = 0.25 
        local Height = 0.25 
        wdwLogin = guiCreateWindow(X, Y, Width, Height, "Please Log In", true) 
      
         
        X = 0.0825 
        Y = 0.2 
         
        Width = 0.25 
        Height = 0.25 
         
        guiCreateLabel(X, Y, Width, Height, "Username", true, wdwLogin) 
         
        Y = 0.5 
        guiCreateLabel(X, Y, Width, Height, "Password", true, wdwLogin) 
      
      
        X = 0.415 
        Y = 0.2 
        Width = 0.5 
        Height = 0.15 
        edtUser = guiCreateEdit(X, Y, Width, Height, "", true, wdwLogin) 
        Y = 0.5 
        edtPass = guiCreateEdit(X, Y, Width, Height, "", true, wdwLogin) 
         
        guiEditSetMaxLength(edtUser, 50) 
        guiEditSetMaxLength(edtPass, 50) 
      
        X = 0.415 
        Y = 0.7 
        Width = 0.25 
        Height = 0.2 
        btnLogin = guiCreateButton(X, Y, Width, Height, "Log In", true, wdwLogin) 
      
         
        guiSetVisible(wdwLogin, false) 
    end 
    addEventHandler("onClientResourceStart", getResourceRootElement(getThisResource()),  
        function () 
            createLoginWindow() 
        end 
    ) 
    addEventHandler("onClientResourceStart", getResourceRootElement(getThisResource()),  
        function () 
            -- create the log in window and its components 
            createLoginWindow() 
      
            -- output a brief welcome message to the player 
                    outputChatBox("Welcome to RealWorldGaming, please log in.") 
      
            -- if the GUI was successfully created, then show the GUI to the player 
                if (wdwLogin ~= nil) then 
                guiSetVisible(wdwLogin, true) 
            else 
                -- if the GUI hasnt been properly created, tell the player 
                outputChatBox("An unexpected error has occurred and the log in GUI has not been created.") 
                end  
      
            -- enable the players cursor (so they can select and click on the components) 
                showCursor(true) 
            -- set the input focus onto the GUI, allowing players (for example) to press 'T' without the chatbox opening 
                guiSetInputEnabled(true) 
        end 
    ) 
    function clientSubmitLogin(button,state) 
        if button == "left" and state == "up" then 
             
            local username = guiGetText(edtUser) 
             
            local password = guiGetText(edtPass) 
      
             
            if username and password then 
                 
                triggerServerEvent("submitLogin", getRootElement(), username, password) 
      
                 
                guiSetInputEnabled(false) 
                guiSetVisible(wdwLogin, false) 
                showCursor(false) 
            else 
                 
                outputChatBox("Please enter a username and password.") 
            end 
        end 
    end 
    function loginHandler(username,password) 
        -- check that the username and password are correct 
        if username == "user" and password == "apple" then 
            -- the player has successfully logged in, so spawn them 
            if (client) then 
                spawnPlayer(client, 1959.55, -1714.46, 10) 
                fadeCamera(client, true) 
                outputChatBox("Welcome RealWorldGaming.", client) 
            end 
        else 
            -- if the username or password are not correct, output a message to the player 
            outputChatBox("Invalid username and password. Please re-connect and try again.",client) 
            end          
    end 
      
    addEvent("submitLogin",true) 
    addEventHandler("submitLogin",root,loginHandler) 
    

  6. when will MTA community be back up.......................

    Can some1 make me a login system and im not gonna pay you for typing lines so if u want me to pay go F*** yourself

×
×
  • Create New...