Jump to content

Castillo

Retired Staff
  • Posts

    21,935
  • Joined

  • Last visited

  • Days Won

    6

Everything posted by Castillo

  1. Yes, are you sure you don't have any other error? is the window visible at all? because since is not hidden after creation, it should be visible on start.
  2. GUIEditor_Window = {} GUIEditor_TabPanel = {} GUIEditor_Tab = {} GUIEditor_Memo = {} GUIEditor_Window[1] = guiCreateWindow(119,64,799,590,"Server Help Page",false) GUIEditor_TabPanel[1] = guiCreateTabPanel(10,24,780,557,false,GUIEditor_Window[1]) GUIEditor_Tab[1] = guiCreateTab("Server Commands",GUIEditor_TabPanel[1]) GUIEditor_Memo[1] = guiCreateMemo(6,7,768,520,"1) Commands\n\n",false,GUIEditor_Tab[1]) GUIEditor_Tab[2] = guiCreateTab("Stuff",GUIEditor_TabPanel[1]) GUIEditor_Memo[2] = guiCreateMemo(6,7,767,518,"1) Admins:-\n1. Perfect\n",false,GUIEditor_Tab[2]) function serverShow ( ) guiSetVisible ( GUIEditor_Window[1], not guiGetVisible ( GUIEditor_Window[1] ) ) showCursor ( guiGetVisible ( GUIEditor_Window[1] ) ) guiSetInputEnabled ( guiGetVisible ( GUIEditor_Window[1] ) ) end addEvent("serverShow",true) addEventHandler("serverShow",root,serverShow)
  3. Maybe because race game mode already has it's own create vehicle inside?
  4. Castillo

    admin

    What is "anonymous admin"? never heard of it.
  5. Lo que "hizo" esta bien, ya que el codigo lo poste yo en otro tema antes. El problema es el que mencione antes.
  6. That script will get a random model from the table and create the vehicle with it.
  7. You must define the "images" table: images = { } On top of the script.
  8. Use the event: onPlayerWasted combined with: takePlayerMoney.
  9. Can't you just go near the object and get the coordinates of yourself?
  10. Que te parece si haces click en cada link que te di y averiguas su sintaxis?
  11. Have you tried resetting the animation?
  12. function onSpawn ( ) local vehicles = { 411, 602, 496, 491 } local veh = createVehicle ( vehicles [ math.random ( #vehicles ) ], 0, 0, 3 ) warpPedIntoVehicle ( source, veh ) end addEventHandler ( "onPlayerSpawn", getRootElement(), onSpawn )
  13. setPedAnimation ( theElement )
  14. I've also tried it, it crashed, I downloaded another mod and crashed as well.
  15. Because I said phone object not phone object model.
  16. 1: The model/texture must be invalid. 2: Download "bone_attach" from MTA community and use this: exports [ "bone_attach" ]:attachElementToBone ( phoneObject, attachTo, 12, 0, 0, 0.01, 0, -50, 0 )
  17. function getPlayerCount ( ) return #getElementsByType ( "player" ) end That's a lot easier.
  18. Castillo

    A way ?

    Go to: "race/modes/destructionderby.lua" and search for the function: "DestructionDerby:handleFinishActivePlayer" And after: if #activePlayers == 1 then Place: triggerEvent ( "onPlayerDestructionDerbyWin", activePlayers [ 1 ] ) Then you can use this new event: addEvent ( "onPlayerDestructionDerbyWin", true ) addEventHandler ( "onPlayerDestructionDerbyWin", root, function ( ) outputChatBox ( getPlayerName ( source ) .." has won the round!" ) end )
  19. Phone object model: 330 Animation: "ped", "phone_talk"
  20. Tenes muchos errores basicos la verdad... -- client side: GUIEditor_Window = {} GUIEditor_Button = {} GUIEditor_Grid = {} GUIEditor_Window[1] = guiCreateWindow(209,161,559,460,"GetClan..\"Reclutamiento\"",false) GUIEditor_Grid[1] = guiCreateGridList(16,26,207,418,false,GUIEditor_Window[1]) col1 = guiGridListAddColumn(GUIEditor_Grid[1],"Jugadores",0.7) GUIEditor_Button[1] = guiCreateButton(227,25,131,50,"Reclutar",false,GUIEditor_Window[1]) GUIEditor_Button[2] = guiCreateButton(227,85,131,50,"Removerlo",false,GUIEditor_Window[1]) GUIEditor_Grid[2] = guiCreateGridList(364,21,186,427,false,GUIEditor_Window[1]) col2 = guiGridListAddColumn(GUIEditor_Grid[2],"Jugadores del Clan",0.7) guiSetVisible ( GUIEditor_Window[1], false ) showCursor ( false ) bindKey ( "R", "down", function ( ) if ( getKeyState ( "lctrl" ) ) then guiSetVisible ( GUIEditor_Window[1], not guiGetVisible ( GUIEditor_Window[1] ) ) showCursor ( guiGetVisible ( GUIEditor_Window[1] ) ) end end ) function grid ( ) local limpiar = guiGridListClear ( GUIEditor_Grid[1] ) if ( limpiar ) then local row = guiGridListAddRow ( GUIEditor_Grid[1] ) for _, v in ipairs ( getElementsByType"player" ) do guiGridListSetItemText ( GUIEditor_Grid[1], row, col1, getPlayerName ( v ), false, false ) end end end addEventHandler ( "onClientResourceStart", resourceRoot, grid ) addEventHandler ( "onClientPlayerQuit", root, grid ) addEventHandler ( "onClientPlayerChangeNick", root, grid ) addEventHandler ( "onClientPlayerJoin", root, grid ) addEventHandler ( 'onClientGUIClick', root, function ( ) if ( source == GUIEditor_Button[1] ) then local row, col = guiGridListGetSelectedItem ( GUIEditor_Grid[1] ) if ( row and col and row ~= -1 and col ~= -1 ) then local playerName = guiGridListGetItemText ( GUIEditor_Grid[1], row, 1 ) local elPlayer = getPlayerFromName ( playerName ) triggerServerEvent ( "agregarPlayer", localPlayer, elPlayer ) end end end ) -- server side: addEvent ( "agregarPlayer", true ) addEventHandler ( "agregarPlayer", root, function ( elPlayer ) local account = getAccountName ( getPlayerAccount ( elPlayer ) ) if ( not isObjectInACLGroup ( "user." .. account, aclGetGroup ( "STARS" ) ) ) then local adicion = aclGroupAddObject ( aclGetGroup ( "STARS" ), "user.".. account ) if ( adicion ) then outputChatBox ( getPlayerName ( elPlayer ) .." Agregado Correctamente !!", source, 0, 255, 0, true ) end else outputChatBox ( getPlayerName ( elPlayer ) .." Ya esta en este Clan !!", source, 255, 255, 0, true ) end end )
×
×
  • Create New...