Jump to content

Castillo

Retired Staff
  • Posts

    21,935
  • Joined

  • Last visited

  • Days Won

    6

Everything posted by Castillo

  1. Turn off the engine when a player enter the vehicle: setVehicleEngineState combined with the event: onVehicleEnter.
  2. Castillo

    Variable

    local texto = "Hola Mundo!" -- Una variable que solo se puede usar dentro de la funcion que vos la creaste. texto = "Hola Mundo!" -- Una funcion global.
  3. https://community.multitheftauto.com/index.php?p= ... &id=324998 All his/her resources are: Vehicle mod(s), weapon mod(s), skin mod(s).
  4. Castillo

    Help

    1: You never get the selected item. 2: You don't trigger the selected vehicle, as you haven't done the #1. 3: You never get the vehicle model from the name, as you haven't done #1 and #2.
  5. Castillo

    Help

    You must trigger the selected item name to server side then get the vehicle model from the name received.
  6. Castillo

    Help

    I noticed, edited my post .
  7. Castillo

    Pregunta GUI

    Eso no tiene sentido. addEventHandler ( 'onClientGUIClick', guiRoot, 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 guiSetText ( GUIEditor_Memo[1], "Debes elegir algun Personaje" ) guiSetVisible ( GUIEditor_Window[1], true ) showCursor ( true ) end end end )
  8. Intenta agregando el recurso al "acl.xml" en el grupo "Admin".
  9. Castillo

    Pregunta GUI

    Sera una imagen creada con guiCreateStaticImage.
  10. Castillo

    Pregunta GUI

    No existe ningun evento.
  11. Castillo

    Pregunta GUI

    No, si te das cuenta, dice "DX" no "GUI" .
  12. Castillo

    Pregunta GUI

    Creo que entendi de que estas hablando. En GUI cuando creas un elemento como parent de otro y lo moves, el elemento se mueve con el. En DX no podes hacer eso.
  13. Are you sure that you don't want to destroy the vehicles locked to his/her account name instead of player name?
  14. Decis tabs en un tabPanel? si es asi, creas el tabPanel luego clickeas en el mismo y presionas "Add tab".
  15. Castillo

    ayuda

    Eso no tiene sentido, son variables globales en un script server side, ademas, solo estas obteniendo un arma. local tempData = { } addEventHandler ( "onPlayerWasted", getRootElement(), function ( ) tempData [ source ] = { weapons = getWeaponsTable ( source ), skin = getElementModel ( source ) } end ) addEventHandler ( "onPlayerSpawn", getRootElement(), function ( ) if ( tempData [ source ] ) then setElementModel ( source, tempData [ source ].skin ) for weapon, ammo in pairs ( tempData [ source ].weapons ) do giveWeapon ( source, weapon, ammo, true ) end end end ) function getWeaponsTable ( thePlayer ) local weapons = { } local hasAnyWeapon = false for slot = 0, 12 do local weapon = getPedWeapon ( thePlayer, slot ) if ( weapon > 0 ) then local ammo = getPedTotalAmmo ( thePlayer, slot ) if ( ammo > 0 ) then weapons [ weapon ] = ammo hasAnyWeapon = true end end end if ( hasAnyWeapon ) then return weapons end end
  16. Castillo

    help

    @ElMota: What has that to do with his problem?
  17. Castillo

    little problem

    I guess "police" variable is defined, right? call ( getResourceFromName ( 'scoreboard' ), 'addScoreboardColumn', 'Group' ) setTimer ( function ( ) for index, player in ipairs ( getElementsByType ( "player" ) ) do local role = getElementData ( player, 'role' ) if ( role == tostring ( police ) ) then setElementData ( player, 'Group', 'Police' ) end end end ,5000, 0 )
  18. Why you should destroy it? you can change the model of the vehicle instead of re-creating it. GUIEditor_Window = {} GUIEditor_Button = {} GUIEditor_Label = {} GUIEditor_Edit = {} GUIEditor_Grid = {} GUIEditor_Window[1] = guiCreateWindow(0,0.6583,0.2212,0.35,"GUI Garage",true) guiWindowSetMovable(GUIEditor_Window[1],false) guiWindowSetSizable(GUIEditor_Window[1],false) GUIEditor_Button[1] = guiCreateButton(10,57,157,43,"Sacar Vehiculo",false,GUIEditor_Window[1]) GUIEditor_Button[2] = guiCreateButton(10,108,157,43,"Cambiar de color el Vehiculo",false,GUIEditor_Window[1]) GUIEditor_Button[3] = guiCreateButton(10,159,157,42,"Cambiar/poner Paintjob",false,GUIEditor_Window[1]) GUIEditor_Label[1] = guiCreateLabel(53,29,56,16,"By ElMota",false,GUIEditor_Window[1]) guiSetFont(GUIEditor_Label[1],"default-bold-small") GUIEditor_Button[4] = guiCreateButton(141,22,25,29,"X",false,GUIEditor_Window[1]) GUIEditor_Window[2] = guiCreateWindow(-0.005,0.0917,0.2275,0.5667,"GUI Autos",true) GUIEditor_Grid[1] = guiCreateGridList(9,28,164,303,false,GUIEditor_Window[2]) guiGridListSetSelectionMode(GUIEditor_Grid[1],2) column = guiGridListAddColumn(GUIEditor_Grid[1],"Autos",0.-- s8) --> column2 = guiGridListAddColumn(GUIEditor_Grid[1],"ID",0.2) GUIEditor_Window[3] = guiCreateWindow(0.2212,0.6583,0.2675,0.3483,"GUI Agregar Auto",true) GUIEditor_Button[5] = guiCreateButton(13,164,187,33,"Agregar",false,GUIEditor_Window[3]) GUIEditor_Label[2] = guiCreateLabel(17,31,125,17,"Nombre de la Variable",false,GUIEditor_Window[3]) guiSetFont(GUIEditor_Label[2],"default-bold-small") GUIEditor_Edit[1] = guiCreateEdit(17,49,187,29,"",false,GUIEditor_Window[3]) GUIEditor_Label[3] = guiCreateLabel(19,90,123,22,"Numero de ID",false,GUIEditor_Window[3]) guiSetFont(GUIEditor_Label[3],"default-bold-small") GUIEditor_Edit[2] = guiCreateEdit(17,107,187,29,"",false,GUIEditor_Window[3]) guiSetVisible(GUIEditor_Window[1],false) guiSetVisible(GUIEditor_Window[2],false) guiSetVisible(GUIEditor_Window[3],false) showCursor(false) marker = createMarker( 250.27734375, -1765.474609375, 3.7, "cylinder", 1.5, 255, 255, 255, 90 ) function markerHit(hitPlayer) name = getPlayerName( localPlayer ) if name == "ElMota(BienNice)" then if ( hitPlayer == localPlayer ) then guiSetVisible (GUIEditor_Window[1], true) guiSetVisible (GUIEditor_Window[2], true) guiSetVisible (GUIEditor_Window[3], true) showCursor (true) triggerServerEvent("onCameraView", getLocalPlayer()) guiSetInputMode ( "no_binds_when_editing" ) end end end addEventHandler("onClientMarkerHit", marker, markerHit) addEventHandler("onClientGUIClick", root, function() if source == GUIEditor_Button[4] then guiSetVisible(GUIEditor_Window[1],false) guiSetVisible(GUIEditor_Window[2],false) guiSetVisible(GUIEditor_Window[3],false) showCursor(false) setCameraTarget( localPlayer ) end end ) addEventHandler("onClientGUIClick", root, function() if source == GUIEditor_Button[5] then local row = guiGridListAddRow(GUIEditor_Grid[1]) guiGridListSetItemText ( GUIEditor_Grid[1], row, column, (guiGetText(GUIEditor_Edit[1])), false, false ) guiGridListSetItemText ( GUIEditor_Grid[1], row, column2, (guiGetText(GUIEditor_Edit[2])), false, false ) end end ) addEventHandler ( "onClientGUIChanged", GUIEditor_Edit[2], function ( ) local skins = guiGetText ( source ) if ( not isElement ( auto ) ) then auto = createVehicle ( tonumber ( skins ), -1951.6552734375, 263.078125, 35.46875 ) else setElementModel ( auto, tonumber ( skins ) ) end end )
  19. function Destroyer ( ) slothbot = exports [ "slothbot" ]:spawnBot ( 1086.6645507813, 1076.1888427734, 10.838157653809, 90, 300, 0, 0, Umbrella, 38, "hunting" ) exports.extrahealth:setElementExtraHealth ( slothbot, 10000000 ) outputChatBox ( "Jefe Umbrella:¿Como va la situacion de Raccon City?" ) outputChatBox ( "Empleada:muy mal señor" ) outputChatBox ( "Jefe Umbrella:Activen el projecto Nemesis" ) outputChatBox ( "Empleada:Activando projecto Nemesis" ) outputChatBox ( "Empleada:Projecto Nemesis activado" ) end addCommandHandler ( "spawnbot", Destroyer )
  20. Castillo

    Para Zeus

    Otto, se nota que no tenes que nada hacer, porque no lo dejas con el avatar que mas le guste? Si miramos el tuyo, es tremenda ***** sin ofender.
  21. Ese evento es creado por el script, asi que si.
  22. Los eventos no se exportan. Para usar un evento propio tenes que usar: addEvent y addEventHandler
  23. Castillo

    Help

    local carros = { } addEvent ( "CreateCarros", true ) addEventHandler ( "CreateCarros", getRootElement(), function ( ) if ( isElement ( carros [ source ] ) ) then destroyElement ( carros [ source ] ) end carros [ source ] = createVehicle ( 440,1543.98962, -1670.46398, 13.600, 0, 0, 90 ) warpPedIntoVehicle ( source, carros [ source ] ) end )
  24. getPlayerAccount getAccountData setAccountData getPlayerTeam getTeamName getTeamFromName setPlayerTeam onPlayerQuit onPlayerLogout onPlayerLogin
×
×
  • Create New...