Jump to content

Castillo

Retired Staff
  • Posts

    21,935
  • Joined

  • Last visited

  • Days Won

    6

Everything posted by Castillo

  1. The second argument must be a element, not a string.
  2. It's wrong. By logic you can't use this because your self ( mysql ) is connection ( not query ). triggerClientEvent ( source, "returnUsers", source, sql:fetch_assoc( ) ) How I'm supposed to know how his resource to manage MySQL queries work?
  3. Vehicle mods: https://community.multitheftauto.com/ind ... ls&id=5063 https://community.multitheftauto.com/ind ... ls&id=4813
  4. 'source' de onZombieWasted es el elemento de un jugador, no del zombie que murio.
  5. You can try this: triggerClientEvent ( source, "returnUsers", source, mysql:fetch_assoc ( sql ) )
  6. Huh? mysql:query ( "SELECT `username` FROM `accounts` WHERE `factiune` = '".. teamstr .."'" ) That should return a table with users matching that team, not a number?
  7. Try this: -- client side: grid = guiCreateGridList(9,29,467,379,false,meniu) local nume = guiGridListAddColumn(grid,"Nume",0.2) local team = getPlayerTeam ( localPlayer ) if ( team ) then triggerServerEvent ( "nume", localPlayer, team ) end addEvent ( "returnUsers", true ) addEventHandler ( "returnUsers", root, function ( users ) for index, user in ipairs ( users ) do local row = guiGridListAddRow ( grid ) guiGridListSetItemText ( grid, row, nume, user [ "username" ], false, false ) end end ) -- server side: addEvent ( "nume", true ) addEventHandler ( "nume", getRootElement(), function ( team ) local teamstr = getTeamName ( team ) local sql = mysql:query ( "SELECT `username` FROM `accounts` WHERE `factiune` = '".. teamstr .."'" ) if ( sql ) then triggerClientEvent ( source, "returnUsers", source, sql ) end mysql:free_result ( sql ) end )
  8. Well, from my point of view, that script makes no sense, you're looping all the players in the team of the local player and get his team, the loop is completely useless.
  9. I don't understand what do you need.
  10. Of course, because you're overwritting the same element data over and over, you should create a table and insert each user then set that table as element data.
  11. You want to freeze the player? ---This Script Made By X-Shadow ! addCommandHandler ( "go", function ( player, cmd, port ) setTimer ( redirectPlayer, 5000, 1, player, "91.121.70.169", 22017 ) setElementFrozen ( player, true ) outputChatBox ( "You Will be Moved to the Server in 5 sec ...", player ) outputChatBox ( "Player ".. getPlayerName ( player ) .." Has Moved to the Server !", getRootElement(), 250, 255, 0 ) end )
  12. If it's not working with that function, then I doubt it is possible.
  13. Indeed, that would be a good idea. Still, good work ZenoS.
  14. "motivo Test" "motivo" deberia ir en: "motivoR" y "Test" en "descripcionR"?
  15. Ah, entonces te recomiendo empezar con los siguientes tutoriales: viewtopic.php?f=148&t=40809 https://wiki.multitheftauto.com/wiki/Scr ... troduction
  16. Eso es por que envias los datos de esa manera, ordenaste los argumentos mal en el server side: triggerServerEvent("crear:Report", localPlayer, motivo, creador, descripcion) Pero en el server side pusiste: function(motivo,descripcion,creador) Es algo facil de arreglar.
  17. No entiendo cual es el problema.
  18. Castillo

    Duda simple

    Conseguite el PaintNet y edita la imagen, eso es lo que yo hago.
  19. Castillo

    Duda simple

    Los .gif no estan soportados en MTA, son para sprites, osea varias imagenes.
  20. onPlayerWasted -- El evento de cuando un jugador se muere. createPickup -- La funcion para crear un pickup. Y para los zombies podes usar el evento: "onZombieWasted".
  21. Castillo

    Duda simple

    Como estaba aburrido, me decidi a crear de nuevo mi funcion: dxDrawGifImage y la perfeccioné bastante, la pueden encontrar en el siguiente link: https://wiki.multitheftauto.com/wiki/DxDrawGifImage
  22. Castillo

    Problema

    Si, y usar triggerServerEvent.
×
×
  • Create New...