Jump to content

Script - Help Please


Bilal135

Recommended Posts

Hi, I'm having a little bit problem with the script, I made a gui on gui editor, and made a bind key for to open it. But the console gives some error.

Error: Unfinished Strip Near '-Multi Theft Auto San Andreas Cheats And Codes--'

My code:

GUIEditor = { 
    window = {}, 
    memo = {} 
} 
addEventHandler("onClientResourceStart", resourceRoot, 
    function() 
        GUIEditor.window[1] = guiCreateWindow(572, 238, 337, 226, "Cheats And Codes Help Panel", false) 
        guiWindowSetSizable(GUIEditor.window[1], false) 
  
        GUIEditor.memo[1] = guiCreateMemo(9, 24, 318, 192, "- Multi Theft Auto Cheats And Codes -- 
\n 
\nCheat Code Commands: 
\n 
\n/power - Gives you 100 power. 
\n/rhino - Creates a tank for you. 
\n/givemejetpack - Gives you a jetpack. 
\n/givemeweapons - Gives you many weapons. 
\n/moneymoneymoney - Gives you 1000000 money. 
\n/policecantgetme - Sets your wanted level to 2. 
\n/jumpjet - Creates a hydra for you. 
\n/toodamnhot - Sets weather to scorching hot. 
\n/professionalkiller - Sets your weapon stats to max. 
\n 
\n--", false, GUIEditor.window[1]) 
        guiMemoSetReadOnly(GUIEditor.memo[1], true)     
    end 
) 
  
    bindKey ( "o", "down", 
        function ( ) 
            guiSetVisible ( GUIEditor.window[1], not guiGetVisible ( GUIEditor_Window[1] ) ) 
            showCursor ( guiGetVisible ( GUIEditor_Window[1] ) ) 
        end 
    ) 

Link to comment
GUIEditor = { 
    window = {}, 
    memo = {} 
} 
addEventHandler("onClientResourceStart", resourceRoot, 
    function() 
        GUIEditor.window[1] = guiCreateWindow(572, 238, 337, 226, "Cheats And Codes Help Panel", false) 
        guiWindowSetSizable(GUIEditor.window[1], false) 
  
        GUIEditor.memo[1] = guiCreateMemo(9, 24, 318, 192, [[-- Multi Theft Auto Cheats And Codes -- 
  
Cheat Code Commands: 
  
/power - Gives you 100 power. 
/rhino - Creates a tank for you. 
/givemejetpack - Gives you a jetpack. 
/givemeweapons - Gives you many weapons. 
/moneymoneymoney - Gives you 1000000 money. 
/policecantgetme - Sets your wanted level to 2. 
/jumpjet - Creates a hydra for you. 
/toodamnhot - Sets weather to scorching hot. 
/professionalkiller - Sets your weapon stats to max. 
  
]], false, GUIEditor.window[1]) 
        guiMemoSetReadOnly(GUIEditor.memo[1], true)     
    end 
) 
  
    bindKey ( "o", "down", 
        function ( ) 
            guiSetVisible ( GUIEditor.window[1], not guiGetVisible ( GUIEditor.window[1] ) ) 
            showCursor ( guiGetVisible ( GUIEditor.window[1] ) ) 
        end 
    ) 

Edit; fixed your typos on the bindKey function.

GUIEditor_window = {} 
GUIEditor_memo = {} 
  
function LoadGui() 
 GUIEditor_window[1] = guiCreateWindow(572, 238, 337, 226, "Cheats And Codes Help Panel", false) 
     
    guiWindowSetSizable(GUIEditor_window[1], false) 
      
    GUIEditor_memo[1] = guiCreateMemo(9, 24, 318, 192, [[-- Multi Theft Auto Cheats And Codes -- 
      
    Cheat Code Commands: 
      
    /power - Gives you 100 power. 
    /rhino - Creates a tank for you. 
    /givemejetpack - Gives you a jetpack. 
    /givemeweapons - Gives you many weapons. 
    /moneymoneymoney - Gives you 1000000 money. 
    /policecantgetme - Sets your wanted level to 2. 
    /jumpjet - Creates a hydra for you. 
    /toodamnhot - Sets weather to scorching hot. 
    /professionalkiller - Sets your weapon stats to max. 
      
    ]] 
    , false, GUIEditor_window[1]) 
            guiMemoSetReadOnly(GUIEditor_memo[1], true)     
end 
addEventHandler("onClientResourceStart", resourceRoot, LoadGui) 
      
 function showGui() 
    if (guiGetVisible ( GUIEditor_window[1] )) then 
        guiSetVisible(GUIEditor_window[1], false) 
        showCursor(false) 
    else 
        guiSetVisible(GUIEditor_window[1], true) 
        showCursor(true) 
    end 
 end 
 addCommandHandler("cheatcodeshelp", showGui) 

Link to comment
Correct me if I'm wrong but doesn't MTA use /r/n and not /n?

/n alone works too, tried it already. not sure what /r does.

Oh yeah, makes sense now - it was for a logging system I was working on. And since I was writing it to a text file - I had to use /r/n since that's what Windows uses. :lol:

Link to comment
Correct me if I'm wrong but doesn't MTA use /r/n and not /n?

/n alone works too, tried it already. not sure what /r does.

Oh yeah, makes sense now - it was for a logging system I was working on. And since I was writing it to a text file - I had to use /r/n since that's what Windows uses. :lol:

Ehm still not sure, if you're using fileWrite /n works alone too....

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