Jump to content

Lock this


Anubhav

Recommended Posts

  • Replies 54
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

But it will be laggy. Any other way without xml or sql or mysql?

Dude, my lobby script load maps using XML functions and it doesn't lagg at all and about the gang thing, what do you use to save gang names, elementData or accountData ?

Link to comment

You can save the groups, members, leaders and all that sort if things, but you cant save the memo? How come? Its pretty much the same thing... You probably have a table or something with the members of a given team, just insert your text there and retreive it whenever you need it.

Link to comment
what is v == "Text" ? I will try it but it will take all info. I need for the one group only? Is account data possible for itt/

its the text you inserted. for example,

  
local myT = { } 
a = "Hello, MTA players" 
b = "Welcome to lua scripting" 
table.insert (myT, b) 
 table.insert (myT, a) 
-- loop 
local Cash = tonumber ( getElementData (localPlayer, "cash") ) -- you must use setElementData before this ^^ 
for k,v in ipairs (myT) do 
if v == "Hello, MTA players" and Cash > 50  then 
-- some code here 
elseif v == "Welcome to lua scripting" and Cash < 50 then 
-- some code here 
end 
      end 

Well if you're doing this client side then use setElementData.

Link to comment

There is.

local myTable =  
    { 
  
        [ "text" ] = "This is the first text.", 
  
    } 
  
    myTable.text2 = "And here comes the second one." 
  
outputChatBox( myTable [ "text" ] ) 
outputChatBox( myTable [ "text2" ] ) 

Link to comment
Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.

×
×
  • Create New...