Jump to content

Cocodrilo

Members
  • Content Count

    93
  • Joined

  • Last visited

Community Reputation

1 Neutral

About Cocodrilo

  • Rank
    Punk-@ss B*tch

Details

  • Gang
    nil
  • Location
    Monterrey, Mexico
  • Interests
    play Piano
  1. How do i something like this .. ? local consulta = dbQuery(myCallback,db,"SELECT * FROM acc_table") local resultado = dbPoll( consulta, -1 ) for _, v in ipairs(resultado) do local acc = v['account'] local playerAccount = getPlayerAccount ( getAccountName(acc) ) setAccountData(playerAccount,"Money", 1000) end * I save 'getPlayerMoney' into the "Money" accountData. I want to set that money to accounts who are in the table in the column 'account'.
  2. I use : local money = getPlayerMoney(getLocalPlayer()) string.gsub(money,"^(-?%d+)(%d%d%d)", '%1,%2') When money is 1 000 = 1,000 10 000 = 10,000 100 000 = 100,000 etc. But When money is 1 000 000 returns 1000,000. How i get 1,000,000 ? *without modifying the previous examples
  3. so how would it be? any function or example?
  4. How to get a string value from a column db? something like this: local q = dbQuery(con, "SELECT * FROM t_ayuntamiento WHERE Cuenta=?",Cuenta) local result = dbPoll(q,-1) if tostring(result) == "Cocodrilo" then outputChatBox(result.. " is into db") end
  5. Quiero que la progressBar = el valor de la variable "value" y aumente este valor cada segundo. El problema esta que, cuando la variable "value" esta entre 0 y 1, por ejemplo, 0.50, 0.80, etc. La progressBar no aumenta nada. A que se debe esto? tiene alguna solucion? o existe otra manera de hacerlo? ayuntamiento_panel_mejorar = guiCreateWindow(0.29, 0.27, 0.51, 0.55, "", true) guiWindowSetSizable(ayuntamiento_panel_mejorar, false) casa_lbl_me = guiCreateLabel(0.27, 0.11, 0.46, 0.06, "", true, ayuntamiento_panel_mejorar) guiLabelSetHorizontalAlign(casa
  6. Here i have a variable "ttime" which is used to define seconds, in this case. I calculate the 1% of the variable "ttime" to add to the progressBar every second. The problem is this: If my variable "ttime" is <= 100 everything works fine, but when "ttime" > 100 , the progressBar just don't increases. I've noticed that when the "value" variable's result is 0.5, 0.58, 0.9, anything between 0 and 1 this happens. is there any solution? or some other way to do this? ayuntamiento_panel_mejorar = guiCreateWindow(0.29, 0.27, 0.51, 0.55, "", true) guiWindowSetSizable(a
  7. the first one option, i just try to understand this (sql) with a easy example like this
  8. What is wrong here? addEventHandler("onResourceStart", resourceRoot, function () connection = dbConnect("sqlite", "data.db") dbExec(connection, "CREATE TABLE IF NOT EXISTS data (ID INT, cuenta TEXT, deaths INT)") end) function player_Wasted ( ammo, attacker, weapon, bodypart ) local deathss = getElementData(source, "deaths") dbExec(connection,"UPDATE data SET deaths = ? WHERE cuenta = ?", tostring(deathss)+1, source) end addEventHandler ( "onPlayerWasted", getRootElement(), player_Wasted )
  9. Cocodrilo

    VIP

    Client: call ( getResourceFromName ( "scoreboard" ), "scoreboardAddColumn", "VIP", root, 25 ) function funcion ( ) local Deadusergroup = getAccountName(getPlayerAccount(source)) if isObjectInACLGroup("user."..Deadusergroup, aclGetGroup("VIP")) then setElementData ( source, "VIP", "Si" ) else setElementData ( source, "VIP", "No" ) end end addEventHandler ( "onPlayerLogin", getRootElement(), funcion )
  10. Un ejemplo: Client --creas la barra barra = guiCreateProgressBar(0.78, 0.30, 0.17, 0.05, true) --Funcion para hacer aumentar +1 la barra function greetingHandler ( ) guiProgressBarSetProgress ( barra, ( guiProgressBarGetProgress ( barra ) + 1) ) local thePlayer = getLocalPlayer() local mu = guiProgressBarGetProgress (barra) if mu >= 100 then guiProgressBarSetProgress(barra, 0) progCount = progCount+1 end end addEvent ( "geet", true ) addEventHandler ( "geet", getRootElement(), greetingHandler ) Server --evento para que aumente por cada
  11. JAJAJA no vale madre, no sirve jajaja buen video, que bien que hagas esto para las personas interesadas en script que apenas comienzan, sigue asi, suerte
  12. objeto = createObject ( .... setElementDimension ( objeto, dim ) --(tambien le puedes dar interior) setElementInterior ( objeto, int )
  13. GUIEditor = { gridlist = {}, window = {}, button = {}, label = {} } GUIEditor.window[1] = guiCreateWindow(352, 69, 599, 652, "eTunes - Comprar Canciones", false) guiWindowSetSizable(GUIEditor.window[1], false) GUIEditor.gridlist[1] = guiCreateGridList(30, 63, 230, 498, false, GUIEditor.window[1]) guiGridListAddColumn(GUIEditor.gridlist[1], "Canciones", 0.9) GUIEditor.label[1] = guiCreateLabel(276, 73, 130, 19, "Nombre de la cancion: ", false, GUIEditor.window[1]) guiSetFont(GUIEditor.label[1], "default-bold-small")
×
×
  • Create New...