Jump to content

Castillo

Retired Staff
  • Posts

    21,935
  • Joined

  • Last visited

  • Days Won

    6

Everything posted by Castillo

  1. Yes, gridlist element includes a scroll bar.
  2. local weapons = { 22, 31 } function search ( playerSource ) if ( getElementInterior ( playerSource ) == 0 ) then giveWeapon ( playerSource, weapons [ math.random ( #weapons ) ], 200 ) end end addCommandHandler ( "search", search )
  3. Te lo voy a hacer simple: No tiene sentido.
  4. Why can't you resize it every time you add a row? GUIEditor_Grid = {} GUIEditor_Grid[1] = guiCreateGridList(379,0,203,25,false) guiGridListAddColumn(GUIEditor_Grid[1],"Items:",0.70) for index = 1, 40 do local row = guiGridListAddRow ( GUIEditor_Grid[1] ) guiGridListSetItemText ( GUIEditor_Grid[1], row, 1, "Item ".. index, false, false ) local x, y = guiGetSize ( GUIEditor_Grid[1], false ) guiSetSize ( GUIEditor_Grid[1], x, y + 15, false ) end I'd that as test, it leaves some space though.
  5. Make a table and use: math.random Topic moved to "Scripting" section.
  6. Lo que ve es que estas usando la funcion: getLocalMoney ( ), pero esa funcion no existe. local armas = { [ 0 ] = 15, [ 1 ] = 30, [ 2 ] = 30, [ 3 ] = 500, [ 4 ] = 30, [ 5 ] = 100, [ 6 ] = 600, [ 7 ] = 15, [ 8 ] = 800, [ 9 ] = 500, [ 10 ] = 800, [ 11 ] = 900, [ 12 ] = 1000, [ 13 ] = 1500, [ 14 ] = 1600, [ 15 ] = 1000, [ 16 ] = 1200, [ 17 ] = 1200, [ 18 ] = 1500, [ 19 ] = 1500, [ 20 ] = 2500 } function HaveTheMoneyForSelectedWeapon ( selected ) local m = getPlayerMoney ( ) local price = armas [ tonumber ( selected ) ] return ( m >= price and 1 or 0 ) end Cambie tu script bastante, no era necesario, pero me parecio mas facil.
  7. I guess you're talking about "Freeroam": 1: You can set this in the script: "freeroam/fr_server.lua", search for this: vehicles = { maxidletime = 60000, idleexplode = true, maxperplayer = 2, disallowed = {} } and change this: maxperplayer = 2, To whatever you want. 2: You can disable weapons on the settings of the resource, just change "weapons/disallowed" setting.
  8. I don't understand why would you do that, the grid list has a scroll.
  9. Me olvide de algo, copia el server side de nuevo.
  10. -- client side: function Krt () triggerServerEvent ( "onKrt", localPlayer ) end -- server side: function Krt1( ) local status = setPlayerFightingStyle ( source, 6 ) if ( not status ) then outputConsole ( "No has logrado aprender nada.", source) end end addEvent( "onKrt", true ) addEventHandler( "onKrt", getRootElement(), Krt1)
  11. Mostra el codigo donde envias el evento: "onKrt".
  12. onColShapeHit onColShapeLeave These events are used for when a element hits/leaves a collision shape.
  13. I don't understand what is your problem.
  14. You can't use a client side exported function in a server side script.
  15. Donde esta "accountName" definido?
  16. You can create a colshape and attach it to the player, then get the players inside it. createColTube attachElements
  17. function getCurrentDateAndTime ( ) local realTime = getRealTime ( ) local cDate = string.format ( "%04d/%02d/%02d", realTime.year + 1900, realTime.month + 1, realTime.monthday ) local cTime = string.format ( "%02d:%02d:%02d", realTime.hour, realTime.minute, realTime.second ) return cDate, cTime end cDate, cTime = getCurrentDateAndTime ( )
  18. We cannot help you if you don't even test your script. What is this? local aAllowedGroups = { [ 'Armed Forces' ] = true; [ false ] = false; -- This. }
×
×
  • Create New...