Jump to content

[HELP] Problems at starting the script


LabiVila

Recommended Posts

Hello,

as the Subject says, I need a bit help. I am a newbie in here so I flounder in a problem,

--GENERAL

local mainwindow = guiCreateWindow (0.25, 0.25, 0.50, 0.50, "Userpanel", true)

local tabPanel = guiCreateTabPanel (0.00, 0.10, 1.00, 1.00, true, mainwindow)

local info = guiCreateTab("Informations", tabPanel)

local shop = guiCreateTab("Maps shop", tabPanel)

local credits = guiCreateTab ("Credits", tabPanel)

guiWindowSetMovable (mainwindow, false)

guiWindowSetSizable (mainwindow, false)

showCursor (true )

--INFO

guiCreateLabel (0.05, 0.05, 0.90, 0.90, "My nickname: ".. tostring (getPlayerName (localPlayer)), true, info)

guiCreateLabel (0.05, 0.25, 0.90, 0.90, "My ping: ".. tostring (getPlayerPing (localPlayer)), true, info)

guiCreateLabel (0.05, 0.45, 0.90, 0.90, "My money: $".. tostring (getPlayerMoney (localPlayer)), true, info)

guiCreateLabel (0.05, 0.65, 0.90, 0.90, "My team: ".. tostring (getPlayerTeam (localPlayer)), true, info)

guiCreateLabel (0.05, 0.85, 0.90, 0.90, "My serial: ".. tostring (getPlayerSerial (localPlayer)), true, info)

--SHOP, unfinished!

guiCreateLabel (0.03, 0.03, 0.90, 0.90, "Which map would you like to play?", true, shop)

guiCreateLabel (0.60, 0.07, 0.90, 0.90, "A map's price is:", true, shop)

money = guiCreateLabel (0.80, 0.15, 0.90, 0.90, "5000$", true, shop)

guiLabelSetColor ( money, 0, 140, 255)

memo = guiCreateMemo (0.03, 0.10, 0.50, 0.85, "", true, shop)

guiMemoSetReadOnly (memo, true)

I am running the server in a Hamachi. Everytime I use /start myserver (based on wiki.multitheftauto.com/scriptingintro), this script starts. I don't want this script to start when I turn on my server.

Regards,

LabiVila.

Link to comment

Look, I just don't want for that script up to run when the server starts, I wanna make it show by typing f1 or so. When I connect to the server, this window (mainwindow) shows automatically and all the other things up (it's like a log-in, when we connect, we can see it without binding anything). I don't want this script like that, I don't know how much am I clear. :/

Link to comment
--GENERAL 
local mainwindow = guiCreateWindow (0.25, 0.25, 0.50, 0.50, "Userpanel", true) 
guiSetVisible ( 
 mainwindow,false 
 ) 
local tabPanel = guiCreateTabPanel (0.00, 0.10, 1.00, 1.00, true, mainwindow)  
local info = guiCreateTab("Informations", tabPanel)  
local shop = guiCreateTab("Maps shop", tabPanel)  
local credits = guiCreateTab ("Credits", tabPanel) 
guiWindowSetMovable (mainwindow, false) 
guiWindowSetSizable (mainwindow, false) 
showCursor (true ) 
  
--INFO 
guiCreateLabel (0.05, 0.05, 0.90, 0.90, "My nickname: ".. tostring (getPlayerName (localPlayer)), true, info) 
guiCreateLabel (0.05, 0.25, 0.90, 0.90, "My ping: ".. tostring (getPlayerPing (localPlayer)), true, info) 
guiCreateLabel (0.05, 0.45, 0.90, 0.90, "My money: $".. tostring (getPlayerMoney (localPlayer)), true, info) 
guiCreateLabel (0.05, 0.65, 0.90, 0.90, "My team: ".. tostring (getPlayerTeam (localPlayer)), true, info) 
guiCreateLabel (0.05, 0.85, 0.90, 0.90, "My serial: ".. tostring (getPlayerSerial (localPlayer)), true, info) 
  
--SHOP, unfinished! 
guiCreateLabel (0.03, 0.03, 0.90, 0.90, "Which map would you like to play?", true, shop) 
guiCreateLabel (0.60, 0.07, 0.90, 0.90, "A map's price is:", true, shop) 
money = guiCreateLabel (0.80, 0.15, 0.90, 0.90, "5000$", true, shop) 
guiLabelSetColor ( money, 0, 140, 255) 
memo = guiCreateMemo (0.03, 0.10, 0.50, 0.85, "", true, shop) 
guiMemoSetReadOnly (memo, true) 
  
bindKey ( 'F1','down', 
    function (      ) 
        guiSetVisible ( mainwindow,not guiGetVisible ( mainwindow ) ) 
        showCursor ( guiGetVisible ( mainwindow ) ) 
    end 
) 

It's a client side also use debug script if it's not working.

P.S : Time to learn .

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...