Jump to content

Sasu

MTA Contributors
  • Posts

    1,056
  • Joined

  • Last visited

Everything posted by Sasu

  1. Sasu

    dxDrawText

    I want that create dx when a player join.
  2. Sasu

    dxDrawText

    Lol. But it doesn't work. :_
  3. Try my resource. https://community.multitheftauto.com/index.php?p= ... ls&id=6772
  4. Sasu

    dxDrawText

    function select() addEventHandler("onClientRender", getLocalPlayer(), draw) showCursor(true) setElementFrozen(localPlayer, true) end addEventHandler("onClientPlayerJoin", getLocalPlayer(), onSelectLanguage) Why this dont work?
  5. Sasu

    cancelEvent

    playerAcc is not defined. OFF: another sasuke EDIT: I changed and it works. Thanks you and Pain. function chatNil(message, messageType) if messageType == 0 then if ( isGuestAccount(getPlayerAccount(source))) then cancelEvent() end end end addEventHandler("onPlayerChat", root, chatNil)
  6. Sasu

    cancelEvent

    Cancel event if the Player isnt logged in.
  7. Sasu

    cancelEvent

    Doesnt work :_
  8. Sasu

    cancelEvent

    Why it isn't cancel event? function chatNil(message, messageType) if messageType == 0 then local playerAcc = getPlayerAccount(source) if (not playerAcc) then cancelEvent() end end end addEventHandler("onPlayerChat", root, chatNil)
  9. Sasu

    SQL

    Perfecto Solid. Muchas gracias.
  10. Sasu

    SQL

    Por que no agrega un row ? server: function obtenermiembros(playerName, info) if (not getElementData(source, "Gang") == "None") then local gangName = getElementData(source, "Gang") playerName = executeSQLQuery("SELECT Nombre FROM members WHERE gangName=?", gangName ) triggerClientEvent("gangMiembros", source, playerName) end end addEventHandler("onPlayerLogin", root, obtenermiembros) client: function miembros(playerName, info) for _, nombres in ipairs(playerName) do local row = guiGridListAddRow ( playerGangList ) guiGridListSetItemText ( playerGangList, row, nameColumn, playerName, false, false ) end end addEvent("gangMiembros", true) addEventHandler("gangMiembros", root, miembros)
  11. Sasu

    SQL

    Si solid. Eso estaba pensando hoy cuando estaba caminando a mi casa. Igual gracias. Luego posteare x si nesecito ayuda.
  12. Sasu

    Mechanic

    Yes. Edit: It solved alone. ._. Thank you very much.
  13. Sasu

    Mechanic

    function cursorMecanico(button, state, absoluteX, absoluteY, worldX, worldY, worldZ, clickedElement) if (state == "down" and clickedElement and getElementType(clickedElement) == "vehicle") then if (getElementHealth(clickedElement) <= 999) then setElementHealth(clickedElement, 1000) setElementPosition(clickedElement, worldX, worldY, worldZ+2) givePlayerMoney(1000) outputChatBox("Has reparado un auto por lo tanto has ganado $1000.", 255, 255, 0) end end end addEventHandler("onClientClick", root, cursorMecanico) Oh yes thanks. But when I click on vehicle, its explode. Why?
  14. Yes ! I can not find the server ! Here, too, at the bottom of Chat ! https://community.multitheftauto.com/ind ... ew&id=6772 I know that there are some scripts to move Window life, armor, money, but Window to chat - I can not find ! generally have at least some options to move it down ? This my photo. I extend the lines because I am admin on Proyecto SX
  15. Sasu

    Mechanic

    Why this dont work? :C function cursorMecanico(button, state, absoluteX, absoluteY, worldX, worldY, worldZ, clickedElement) if (state == "down" and clickedElement and getElementType(clickedElement) == "vehicle") then if (getElementHealth(clickedElement) <= 99) then setElementHealth(clickedElement, 100) givePlayerMoney(1000) outputChatBox("Has reparado un auto por lo tanto has ganado $1000.", 255, 255, 0) end end end addEventHandler("onClientClick", root, cursorMecanico) And no error.
  16. Sasu

    SQL

    Server: exports.scoreboard:addScoreboardColumn("Gang") function check() local account = getPlayerAccount(source) if getAccountData(account, "Gang") then setElementData(source, "Gang", getAccountData(account, "Gang")) else setElementData(source, "Gang", None) end end addEventHandler("onPlayerLogin", root, check) function crearTabla() check = executeSQLQuery("CREATE TABLE IF NOT EXISTS gangSystem(gangs TEXT, members TEXT, infoGang TEXT)") if check then outputDebugString("Creando tabla 'gangSystem'... Se ha creado correctamente") else outputDebugString("Ha ocurrido un error al crear las tablas") end end addEventHandler("onResourceStart", resourceRoot, crearTabla) function crearGang(thePlayer, gangName, liderName) liderText = "lider" infoGang = "Bienvenido al gang "..gangName.."." crear = executeSQLQuery("INSERT INTO gangSystem(gangs, members, infoGang) VALUES(?,?=?=?,?)", gangName, liderText, gangName, liderName, infoGang) local account = getPlayerAccount(thePlayer) setAccountData(account, "Gang", tostring(gangName)) setElementData(thePlayer, "Gang", tostring(gangName)) if crear then outputDebugString("Se ha creado un gang con nombre: "..gangName.." el cual el lider es "..liderName) end end addEvent("onCreateGang", true) addEventHandler("onCreateGang", resourceRoot, crearGang) function obtenerlider(playerName, info) if (not getElementData(source, "Gang") == "None") then local gangName = getElementData(source, "Gang") info = executeSQLQuery("SELECT infoGang FROM gangSystem WHERE ?", gangName ) triggerClientEvent("gangLider", source, playerName, info) end end addEventHandler("onPlayerLogin", root, obtenerlider) Client(a part): function crearGang(thePlayer, gangName, liderName) gangName = guiGetText(gangEdit) liderName = getPlayerName(localPlayer) if gangName then triggerServerEvent("onCreateGang", getRootElement(), getLocalPlayer(), gangName, liderName) end end function miembros(playerName, info) local row = guiGridListAddRow ( playerGangList ) guiGridListSetItemText ( playerGangList, row, nameColumn, getPlayerName ( playerName ), false, false ) guiSetText(infoMemo, info) end addEvent("gangLider", true) addEventHandler("gangLider", root, miembros) I want to save the info gang and set text in the infoMemo. Also I want to create a row with the leader but I cant. Can you help me?
  17. Sasu

    SQL

    Esto me marea un poco. Primera vez que uso SQL. Alguna idea como puedo distinguir el lider del gang . function crearGang(thePlayer, gangName, liderName) liderText = "lider" crear = executeSQLQuery("INSERT INTO gangSystem(gangs, members) VALUES(?,?=?=?)", gangName, liderText, gangName, liderName) local account = getPlayerAccount(thePlayer) setAccountData(account, "Gang", gangName) setElementData(thePlayer, "Gang", gangName) if crear then outputDebugString("Se ha creado un gang con nombre: "..gangName.." el cual el lider es "..liderName) end end addEvent("onCreateGang", true) addEventHandler("onCreateGang", resourceRoot, crearGang)
  18. Sasu

    CheckBox

    local item = guiComboBoxGetSelected(languageCheck) ._. And I want the event but I just have found. onClientGUIComboBoxAccepted EDIT: Oh sorry. I put CheckBox in the tittle but I wanted to write ComboBox.
  19. Sasu

    CheckBox

    What event can I select to change text? function checkLanguage() local item = guiComboBoxGetSelected(languageCheck) local text = guiComboBoxGetItemText(languageCheck, item) if text == "Español" then guiSetText(gangWindow, "Sistema de Gang V1.0") guiSetText(nameColumn, "Nombre") guiSetText(accountColumn, "Cuenta") guiSetText(addPlayerButton, "Agregar jugador") guiSetText(closeButton, "Cerrar") elseif text == "English" then guiSetText(gangWindow, "Gang System V1.0") guiSetText(nameColumn, "Name") guiSetText(accountColumn, "Account") guiSetText(addPlayerButton, "Add player") guiSetText(closeButton, "Close") end end addEventHandler("onClientGUIChanged", languageCheck, checkLanguage, false) I tried with onClientGUIClick and onClientGUIChanged but nothings happen.
  20. Sasu

    Comandos

    Resulta que al final le faltaba crear la funcion "Salir" y estaba pasando mal los argumentos en triggerServerEvent. Solucionado!
  21. Sasu

    Comandos

    JesusAliso cuando vaya a mi casa , lo hago, lo testeo y te lo paso.
  22. Sasu

    Comandos

    function tienda() Window = guiCreateWindow(243,181,555,488,"Tienda de Armas/Weapon Shop",false) imagen4 = guiCreateStaticImage(0.0595,0.0902,0.2414,0.2172,"images/SNIPER.png",true,Window) imagen3 = guiCreateStaticImage(0.618,0.1004,0.2577,0.207,"images/M4.png",true,Window) imagen2 = guiCreateStaticImage(0.6505,0.5861,0.2306,0.2582,"images/MP5.png",true,Window) imagen1 = guiCreateStaticImage(0.0865,0.5922,0.2126,0.2275,"images/GRENADE.png",true,Window) Sniper = guiCreateButton(0.0631,0.3217,0.2324,0.1352,"Sniper/Costo:155000$",true,Window) M4 = guiCreateButton(0.6144,0.3217,0.2523,0.127,"M4/Costo:120000$",true,Window) Grenade = guiCreateButton(0.0649,0.8525,0.2559,0.1291,"Grenade/Costo:20000$x1",true,Window) MP5 = guiCreateButton(0.6432,0.8504,0.2685,0.1311,"MP5/Costo:25000$",true,Window) Cerrar = guiCreateButton(0.355,0.5082,0.2162,0.168,"Cerrar/Close",true,Window) addEventHandler ( "onClientGUIClick", Cerrar, Salir, false ) addEventHandler ( "onClientGUIClick", M4, arma1, false ) addEventHandler ( "onClientGUIClick", Sniper, arma2, false ) addEventHandler ( "onClientGUIClick", Grenade, arma3, false ) addEventHandler ( "onClientGUIClick", MP5, arma4, false ) guiSetVisible (Window,false) end addEventHandler("onClientResourceStart", root, tienda) Te dije q lo pongas abajo.
  23. Sasu

    Comandos

    Lo de addEventHandler lo debes agregar despues de la funcion.
  24. Sasu

    Comandos

    No estas creando la gui x ningun lado. Agrega esto en el client side: addEventHandler("onClientResourceStart", root, tienda)
  25. Sasu

    Comandos

    Yo solo decia para que se de cuenta. Y en giveWeapon le ponga thePlayer.
×
×
  • Create New...