Jump to content

Jacobob14

Members
  • Posts

    266
  • Joined

  • Last visited

Everything posted by Jacobob14

  1. Jacobob14

    help

    still no update panel
  2. as I can do to give that a click in a row is visible the function draw1 weapon = guiCreateGridList(320, 173, 218, 344, false) guiSetVisible(weapon, false) closed = guiCreateButton(165, 321, 56, 22, "", false, weapon) comprar = guiCreateButton(0, 320, 52, 23, "", false, weapon) guiSetAlpha(closed, 0) guiSetAlpha(comprar, 0) guiGridListAddColumn(weapon, "Weapon list", 0.3) guiGridListAddColumn(weapon, "Municion", 0.3) guiGridListAddColumn(weapon, "Price $", 0.3) for i = 1, 18 do guiGridListAddRow(weapon) end guiGridListSetItemText(weapon, 0, 1, "Pistol", false, false) guiGridListSetItemText(weapon, 0, 2, "-", false, false) guiGridListSetItemText(weapon, 0, 3, "400 $", false, false) guiGridListSetItemText(weapon, 1, 1, "Deagle", false, false) guiGridListSetItemText(weapon, 1, 2, "-", false, false) guiGridListSetItemText(weapon, 1, 3, "500 $", false, false) guiGridListSetItemText(weapon, 2, 1, "Shotgun", false, false) guiGridListSetItemText(weapon, 2, 2, "-", false, false) guiGridListSetItemText(weapon, 2, 3, "750 $", false, false) guiGridListSetItemText(weapon, 3, 1, "Recortada", false, false) guiGridListSetItemText(weapon, 3, 2, "-", false, false) guiGridListSetItemText(weapon, 3, 3, "750 $", false, false) guiGridListSetItemText(weapon, 4, 1, "Spaz", false, false) guiGridListSetItemText(weapon, 4, 2, "-", false, false) guiGridListSetItemText(weapon, 4, 3, "2000 $", false, false) function draw1() dxDrawRectangle(569, 182, 193, 176, tocolor(7, 0, 0, 91), false) dxDrawRectangle(569, 182, 193, 20, tocolor(136, 136, 136, 254), false) dxDrawText("Weapon Image", 599, 182, 734, 197, tocolor(255, 255, 255, 255), 0.60, "bankgothic", "left", "top", false, false, true, false, false) dxDrawImage(574, 206, 182, 138, "shop/fotos/M4.png", 0, 0, 0, tocolor(255, 255, 255, 255), true) dxDrawText("buy now !!", 569, 341, 687, 354, tocolor(0, 0, 0, 254), 0.60, "bankgothic", "left", "top", false, false, true, false, false) end
  3. Jacobob14

    help

    addEventHandler("onClientResourceStart",resourceRoot, function() grid = guiCreateGridList(423, 276, 159, 207, false) guiGridListSetSelectionMode(grid,2) guiSetVisible(grid, false) addEventHandler ( "onClientGUIClick", grid, click ) local name = guiGridListGetItemText(grid, row, col) local column = guiGridListAddColumn( grid, "Nombre del Jugador", 0.9 ) if ( column ) then for id, player in ipairs(getElementsByType("player")) do local row = guiGridListAddRow ( grid ) guiGridListSetItemText ( grid, row, column, getPlayerName ( player ):gsub ( "#%x%x%x%x%x%x", "" ), false, false ) guiGridListSetItemData ( grid, row, column, getPlayerName ( player ) ) end end end) function click () local playerName = guiGridListGetItemData ( grid, guiGridListGetSelectedItem ( grid ), 1 ) guiSetText ( edit, playerName ) end function showPanel1() guiSetVisible(closed, true) guiSetVisible(Reclutar, true) guiSetVisible(Expulsar, true) guiSetVisible(Permisos, true) guiSetVisible(qpermisos, true) guiSetVisible(edit, true) guiSetVisible(grid, true) showCursor(true) playSound("open.ogg") addEventHandler("onClientRender", root, draw1) end addEvent( "showPanel1", true ) addEventHandler ( "showPanel1", getRootElement(), showPanel1) function onGuiClick (button, state, absoluteX, absoluteY) if (source == closed) then guiSetVisible (closed, false) guiSetVisible(closed, false) guiSetVisible(Reclutar, false) guiSetVisible(Expulsar, false) guiSetVisible(Permisos, false) guiSetVisible(qpermisos, false) guiSetVisible(edit, false) guiSetVisible(grid, false) playSound("open.ogg") showCursor (false) elseif (source == qpermisos) then local name = guiGetText ( edit ) local target = getPlayerFromName(name) triggerServerEvent ("remove1", getLocalPlayer(), target) elseif (source == Reclutar) then local name = guiGetText ( edit ) local target = getPlayerFromName(name) triggerServerEvent("Moderator1", getLocalPlayer(), target) playSound("sec.wav",false) elseif (source == Permisos) then local name = guiGetText ( edit ) local target = getPlayerFromName(name) triggerServerEvent("SuperModerator1", getLocalPlayer(), target) playSound("sec.wav",false) elseif (source == Expulsar) then local name = guiGetText ( edit ) local target = getPlayerFromName(name) triggerServerEvent("Admin1", getLocalPlayer(), target) playSound("sec.wav",false) end end addEventHandler ("onClientGUIClick", getRootElement(), onGuiClick) function GetPermission() triggerServerEvent ("OpenPanel1", getLocalPlayer(), OpenPanel1) end function nopsound () playSound("np.mp3",false) end addEvent( "nopsound", true ) addEventHandler ( "nopsound", getRootElement(), nopsound) function removedsound () playSound("removed.wav",false) end addEvent( "removedsound", true ) addEventHandler ( "removedsound", getRootElement(), removedsound) function updateList(old, new) if eventName == "onClientPlayerJoin" then local row = guiGridListAddRow( grid ) guiGridListSetItemText( grid, row, column, getPlayerName(source), false, false) elseif eventName == "onClientPlayerQuit" then for i=0, guiGridListGetRowCount( grid ) do if guiGridListGetItemText( grid, i, column) == getPlayerName(source) then guiGridListRemoveRow( grid, i) end end elseif eventName == "onClientPlayerChangeNick" then for i=0, guiGridListGetRowCount( grid ) do if guiGridListGetItemText( grid, i, column) == old then guiGridListSetItemText( grid, i, column, new, false, false) end end end end addEventHandler("onClientPlayerJoin", root, updateList) addEventHandler("onClientPlayerQuit", root, updateList) addEventHandler("onClientPlayerChangeNick", root, updateList)
  4. Jacobob14

    help

    still no update panel
  5. Jacobob14

    help

    when a player enters or leaves the server does not update the panel
  6. Jacobob14

    help

    help because I do not update the list of players: ( function() grid = guiCreateGridList(423, 276, 159, 207, false) guiGridListSetSelectionMode(grid,2) guiSetVisible(grid, false) addEventHandler ( "onClientGUIClick", grid, click ) local name = guiGridListGetItemText(grid, row, col) local column = guiGridListAddColumn( grid, "Nombre del Jugador", 0.9 ) if ( column ) then for id, player in ipairs(getElementsByType("player")) do local row = guiGridListAddRow ( grid ) guiGridListSetItemText ( grid, row, column, getPlayerName ( player ):gsub ( "#%x%x%x%x%x%x", "" ), false, false ) guiGridListSetItemData ( grid, row, column, getPlayerName ( player ) ) end end end) function click () local playerName = guiGridListGetItemData ( grid, guiGridListGetSelectedItem ( grid ), 1 ) guiSetText ( edit, playerName ) end function showPanel1() guiSetVisible(closed, true) guiSetVisible(Reclutar, true) guiSetVisible(Expulsar, true) guiSetVisible(Permisos, true) guiSetVisible(qpermisos, true) guiSetVisible(edit, true) guiSetVisible(grid, true) showCursor(true) playSound("open.ogg") addEventHandler("onClientRender", root, draw1) end addEvent( "showPanel1", true ) addEventHandler ( "showPanel1", getRootElement(), showPanel1) function onGuiClick (button, state, absoluteX, absoluteY) if (source == closed) then guiSetVisible (closed, false) guiSetVisible(closed, false) guiSetVisible(Reclutar, false) guiSetVisible(Expulsar, false) guiSetVisible(Permisos, false) guiSetVisible(qpermisos, false) guiSetVisible(edit, false) guiSetVisible(grid, false) playSound("open.ogg") showCursor (false) elseif (source == qpermisos) then local name = guiGetText ( edit ) local target = getPlayerFromName(name) triggerServerEvent ("remove1", getLocalPlayer(), target) elseif (source == Reclutar) then local name = guiGetText ( edit ) local target = getPlayerFromName(name) triggerServerEvent("Moderator1", getLocalPlayer(), target) playSound("sec.wav",false) elseif (source == Permisos) then local name = guiGetText ( edit ) local target = getPlayerFromName(name) triggerServerEvent("SuperModerator1", getLocalPlayer(), target) playSound("sec.wav",false) elseif (source == Expulsar) then local name = guiGetText ( edit ) local target = getPlayerFromName(name) triggerServerEvent("Admin1", getLocalPlayer(), target) playSound("sec.wav",false) end end addEventHandler ("onClientGUIClick", getRootElement(), onGuiClick) function GetPermission() triggerServerEvent ("OpenPanel1", getLocalPlayer(), OpenPanel1) end function nopsound () playSound("np.mp3",false) end addEvent( "nopsound", true ) addEventHandler ( "nopsound", getRootElement(), nopsound) function removedsound () playSound("removed.wav",false) end addEvent( "removedsound", true ) addEventHandler ( "removedsound", getRootElement(), removedsound) function list ( ) guiGridListClear ( grid ) for id, players in ipairs ( getElementsByType ( "player" ) ) do local row = guiGridListAddRow ( grid ) guiGridListSetItemText ( grid, row, 1, getPlayerName ( players ):gsub ( "#%x%x%x%x%x%x", "" ), false, false ) guiGridListSetItemData ( grid, row, 1, getPlayerName ( player ) ) end end addEventHandler ( "onClientPlayerJoin", getRootElement(), list ) addEventHandler ( "onClientPlayerQuit", getRootElement(), list ) addEventHandler ( "onClientPlayerChangeNick", getRootElement(), list )
  7. yet there are many people who steal the client side although this compilation
  8. ok thanks for your help I could already do
  9. mmm would be something like this avatar = guiCreateStaticImage(sWidth-250,sHeight-103 ,60, 50, "skins/"..getElementModel(localPlayer)..".png", false)
  10. it is possible to spawn a screenshot is taken the player and display miniature in screen something like this http://prntscr.com/2v92e2
  11. Jacobob14

    help

    as I do to remove this message when someone logs http://prntscr.com/2v2441
  12. thank you very much wanted to do it with bind key but the problem is that pressing another f9 panel sigue visible function showPanel() guiSetVisible(buton1, true) guiSetVisible(buton2, true) guiSetVisible(buton3, true) guiSetVisible(buton4, true) guiSetVisible(buton5, true) guiSetVisible(buton6, true) addEventHandler("onClientRender", root, drawPanel) end bindKey ("F9", "down", showPanel)
  13. as I could do to make the panel visible with a command I'm new to the gui someone help me addEventHandler("onClientResourceStart", resourceRoot, function () buton1 = guiCreateButton(520, 192, 64, 28, "", false) buton2 = guiCreateButton(480, 383, 84, 40, "", false) buton2 = guiCreateButton(348, 383, 84, 40, "", false) buton2 = guiCreateButton(480, 433, 84, 40, "", false) buton2 = guiCreateButton(348, 433, 84, 40, "", false) buton2 = guiCreateEdit(328, 220, 250, 158, "", false) end ) addEventHandler("onClientRender", root, function () dxDrawRectangle(313, 166, 276, 343, tocolor(0, 0, 1, 122), false) dxDrawRectangle(313, 166, 276, 22, tocolor(0, 0, 209, 237), false) dxDrawText("HELP PALNEL", 344, 170, 598, 184, tocolor(255, 255, 255, 255), 0.40, "bankgothic", "left", "top", false, false, true, false, false) dxDrawText("helpmanager", 315, 489, 446, 503, tocolor(0, 60, 88, 237), 0.50, "bankgothic", "left", "top", false, false, true, false, false) end )
  14. Tiene que publicar en la seccion español estas en lugar equivocado viewforum.php?f=145 y otra cosa el comando no debe tener espacios
  15. Hola tengo el spawn de 50 p lo e editado un poco pero no se como hacer para que la camara no se teletransporte al selecionar un spawn si no que se mueva hasta el lugar del spawn alguien podria ayudarme en eso c_gui.lua local selectedRow = -1; local selectedGroup = -1; previousClass = -1; local weaponIcons = { }; local weaponLabels = { }; local weaponAmmoLabels = { }; function createGroupSelectionWnd( ) local selectionPos = { gridList:Position( false ) }; groupsGridList = GridList:Create( screenSize[ 1 ] - gridList:Size( false ) - 4, screenSize[ 2 ] - 425, 180, 200, false ); groupsGridList: Alpha( .9 ); groupsGridList: AddColumn( "zone to respawn", .8 ); groupsGridList: SortingEnabled( false ); for _, group in ipairs( classGroups ) do groupsGridList:AddRow( false, group.name ); end groupsGridList:AddOnClick( groupSelected ); groupsGridList:Visible( false ); end function groupSelected( ) descrGridList:Visible( false ); weaponsGrid:Visible( false ); selectedGroup = groupsGridList:SelectedItem( ); if selectedGroup ~= -1 then populateClassesGrid( classGroups[ selectedGroup + 1 ].classes ); else gridList:Clear( ); end previousClass = -1; end function createClassSelectionWnd( ) gridList = GridList:Create( screenSize[ 1 ] - 184, screenSize[ 2 ] -225, 180, 220, false ); gridList:AddColumn( "Selection to spawn :", .85 ); gridList:Alpha( .9 ); gridList:SortingEnabled( false ); gridList:AddOnClick( classSelected ); gridList:Visible( false ); local gridSize = { gridList:Size( false ) }; spawnBtn = Button:Create( screenSize[ 1 ] - gridList:Size( false ) - 255, screenSize[ 2 ] - 45, 115, 40, "SPAWN", false ); spawnBtn:Font( "default-bold-small" ); spawnBtn:ColorOnHover( "0000FFFF" ); spawnBtn:AddOnClick( requestSpawn ); spawnBtn:Visible( false ); end function populateClassesGrid( classes ) gridList:Clear( ); for classIndex, class in pairs( classes ) do gridList:AddRow( true, class.name ); for skinIndex, skin in ipairs( class.skinMngr:GetSkins( ) ) do local row = gridList:AddRow( false, skin.name ); gridList:ItemData( row, 1, tostring( classIndex ) .."," .. tostring( skinIndex ) ); end end end function classSelected ( ) selectedRow = gridList:SelectedItem( ); if selectedRow ~= -1 then playSound( "Menu.mp3", false ) local data = split( gridList:ItemData( selectedRow, 1 ), string.byte(',') ); local classIndex = tonumber( data[ 1 ] ); local skinIndex = tonumber( data[ 2 ] ); local class = classGroups[ selectedGroup + 1 ].classes[ classIndex ]; local skin = classGroups[ selectedGroup + 1 ].classes[ classIndex ].skinMngr.skins[ skinIndex ]; enableSpawn( false ); if previousClass ~= classIndex then resizeWeaponsWnd( class.weaponMngr ); fadeCamera( false ); setTimer( moveCameraTo, 1000, 1, class, skin ); else teleportTempPed( skin ); end previousClass = classIndex; local classDescr = class.info; if classDescr then descrLabel:Text( classDescr ); descrGridList:Visible( true ); else descrGridList:Visible( false ); weaponsGrid:Visible( false ); end else descrGridList:Visible( false ); weaponsGrid:Visible( false ); end end function requestSpawn( ) selectedRow = gridList:SelectedItem(); if ( selectedGroup ~= -1 ) and ( selectedRow ~= -1 ) then playSound( "Menu.mp3", false ) local data = split( gridList:ItemData( selectedRow, 1 ), string.byte(',') ); local classIndex = tonumber( data[ 1 ] ); local skinIndex = tonumber( data[ 2 ] ); local class = classGroups[ selectedGroup + 1 ].classes[ classIndex ]; local skin = classGroups[ selectedGroup + 1 ].classes[ classIndex ].skinMngr.skins[ skinIndex ]; fadeCamera( false ); setTimer( triggerServerEvent, 1000, 1, "spawn_clientRequestSpawn", g_root, selectedGroup + 1, classIndex, skinIndex ); end end function moveCameraTo( class, skin ) local camX, camY, camZ = class.cameraMngr.pos.x, class.cameraMngr.pos.y, class.cameraMngr.pos.z; local lookAtX, lookAtY, lookAtZ = class.cameraMngr.lookAt.x, class.cameraMngr.lookAt.y, class.cameraMngr.lookAt.z; fadeCamera( true ); --outputDebugString( "fading camera in" ); setCameraMatrix( camX, camY, camZ, lookAtX, lookAtY, lookAtZ ); setTimer( teleportTempPed, 500, 1, skin ); end local losTests = 0; -- line of sight function teleportTempPed( skin ) local x, y, z = getWorldFromScreenPosition( screenSize[ 1 ] - gridList:Size(false) -295, ( screenSize[ 2 ]) -250, 5 ) local cX, cY, cZ; cX, cY, cZ = getCameraMatrix(); if not tempPed then createTempPed( skin.modelId ); else setElementPosition( g_ground, x, y, z - 1.02 ); setElementPosition( tempPed, x, y, z ); setElementModel( tempPed, skin.modelId ); x, y, z = getWorldFromScreenPosition( screenSize[ 1 ] - gridList:Size(false) -295, ( screenSize[ 2 ]) -250, 5 ) end if not processLineOfSight( cX, cY, cZ, x, y, z ) then losTests = losTests + 1; if losTests < 3 then setTimer( teleportTempPed, 300, 1, skin ); return else destroyElement( g_ground ); destroyElement( tempPed ); tempPed = nil; createTempPed( skin.modelId ); enableSpawn( true ); losTests = 0; end else enableSpawn( true ); end end function createClassDescriptionWnd( ) descrGridList = GridList:Create( screenSize[ 1 ] - 305, 5, 300, 125, false ); descrTitleLbl = Label:Create( 8, 5, 100, 30, "Information :", false, descrGridList.gui ); descrTitleLbl:Font( "default-bold-small" ); descrTitleLbl:Color( 255, 100, 5 ); descrLabel = Memo:Create( 10, 25, 280, 90, "", false, descrGridList.gui ); descrLabel:ReadOnly( true ); descrGridList:Alpha( 1 ); descrGridList:Visible( false ); end function createClassWeaponWnd( ) local descrSize = { descrGridList:Size( false ) }; weaponsGrid = GridList:Create( screenSize[ 1 ] - 1, descrSize[ 2 ] + 4, 1, 1, false ); weaponsGrid:Alpha( .0 ); weaponsGrid:Visible( false ); end function enableSpawn( enable ) bringSpawnMenuToFront( ); gridList:Enabled( enable ); spawnBtn:Enabled( enable ); descrGridList:Visible( enable ); if enable == true then local data = split( gridList:ItemData( selectedRow, 1 ), string.byte(',') ); local classIndex = tonumber( data[ 1 ] ); local skinIndex = tonumber( data[ 2 ] ); local class = classGroups[ selectedGroup + 1 ].classes[ classIndex ]; if class.weaponMngr:WeaponCount( ) > 0 then weaponsGrid:Visible( enable ); else weaponsGrid:Visible( false ); end end end function resizeWeaponsWnd( weaponManager ) local minHeight = 18; local weapCount = weaponManager:WeaponCount( ); local weapons = weaponManager:GetWeapons( ); weaponsGrid:Size( 115, minHeight + ( weapCount * 40 ), false ); if weapCount > 0 then for i, icon in pairs( weaponIcons ) do if icon and icon.gui then destroyElement( icon.gui ); end end weaponIcons = nil; weaponIcons = { }; for i, lbl in pairs( weaponLabels ) do if lbl and lbl.gui then destroyElement( lbl.gui ); end end weaponLabels = nil weaponLabels = { }; for i, weapon in ipairs( weapons ) do weaponIcons[ i ] = StaticImage:Create( 10, ( (i-1) * 40 ) + 10, iconWidths[ weapon.id ], 20, icons[ weapon.id ], false, weaponsGrid.gui ); weaponLabels[ i ] = Label:Create( 10, ( (i-1) * 40 ) + 17, 95, 35, "\nAmmo: x" .. tostring( weapon.ammo ), false, weaponsGrid.gui ); weaponLabels[ i ]:Font( "pricedown" ); weaponLabels[ i ]:HorizontalAlign( "left" ); end weaponsGrid:Visible( true ); else weaponsGrid:Visible( false );
  16. as I make the camera moves quickly to the next spawn and do not get black local selectedRow = -1; local selectedGroup = -1; previousClass = -1; local weaponIcons = { }; local weaponLabels = { }; local weaponAmmoLabels = { }; function createGroupSelectionWnd( ) local selectionPos = { gridList:Position( false ) }; groupsGridList = GridList:Create( screenSize[ 1 ] - gridList:Size( false ) - 4, screenSize[ 2 ] - 425, 180, 200, false ); groupsGridList: Alpha( .9 ); groupsGridList: AddColumn( "Seleccionar Modo Campaña", .8 ); groupsGridList: SortingEnabled( false ); for _, group in ipairs( classGroups ) do groupsGridList:AddRow( false, group.name ); end groupsGridList:AddOnClick( groupSelected ); groupsGridList:Visible( false ); end function groupSelected( ) descrGridList:Visible( false ); weaponsGrid:Visible( false ); selectedGroup = groupsGridList:SelectedItem( ); if selectedGroup ~= -1 then populateClassesGrid( classGroups[ selectedGroup + 1 ].classes ); else gridList:Clear( ); end previousClass = -1; end function createClassSelectionWnd( ) gridList = GridList:Create( screenSize[ 1 ] - 184, screenSize[ 2 ] -225, 180, 220, false ); gridList:AddColumn( "seleccionar Protagonista:", .85 ); gridList:Alpha( .9 ); gridList:SortingEnabled( false ); gridList:AddOnClick( classSelected ); gridList:Visible( false ); local gridSize = { gridList:Size( false ) }; spawnBtn = Button:Create( screenSize[ 1 ] - gridList:Size( false ) - 255, screenSize[ 2 ] - 45, 115, 40, "SPAWN", false ); spawnBtn:Font( "default-bold-small" ); spawnBtn:ColorOnHover( "FF0000FF" ); spawnBtn:AddOnClick( requestSpawn ); spawnBtn:Visible( false ); end function populateClassesGrid( classes ) gridList:Clear( ); for classIndex, class in pairs( classes ) do gridList:AddRow( true, class.name ); for skinIndex, skin in ipairs( class.skinMngr:GetSkins( ) ) do local row = gridList:AddRow( false, skin.name ); gridList:ItemData( row, 1, tostring( classIndex ) .."," .. tostring( skinIndex ) ); end end end function classSelected ( ) selectedRow = gridList:SelectedItem( ); if selectedRow ~= -1 then playSound( "Menu.mp3", false ) local data = split( gridList:ItemData( selectedRow, 1 ), string.byte(',') ); local classIndex = tonumber( data[ 1 ] ); local skinIndex = tonumber( data[ 2 ] ); local class = classGroups[ selectedGroup + 1 ].classes[ classIndex ]; local skin = classGroups[ selectedGroup + 1 ].classes[ classIndex ].skinMngr.skins[ skinIndex ]; enableSpawn( false ); if previousClass ~= classIndex then resizeWeaponsWnd( class.weaponMngr ); fadeCamera( false ); setTimer( moveCameraTo, 1000, 1, class, skin ); else teleportTempPed( skin ); end previousClass = classIndex; local classDescr = class.info; if classDescr then descrLabel:Text( classDescr ); descrGridList:Visible( true ); else descrGridList:Visible( false ); weaponsGrid:Visible( false ); end else descrGridList:Visible( false ); weaponsGrid:Visible( false ); end end function requestSpawn( ) selectedRow = gridList:SelectedItem(); if ( selectedGroup ~= -1 ) and ( selectedRow ~= -1 ) then playSound( "Menu.mp3", false ) local data = split( gridList:ItemData( selectedRow, 1 ), string.byte(',') ); local classIndex = tonumber( data[ 1 ] ); local skinIndex = tonumber( data[ 2 ] ); local class = classGroups[ selectedGroup + 1 ].classes[ classIndex ]; local skin = classGroups[ selectedGroup + 1 ].classes[ classIndex ].skinMngr.skins[ skinIndex ]; fadeCamera( false ); setTimer( triggerServerEvent, 1000, 1, "spawn_clientRequestSpawn", g_root, selectedGroup + 1, classIndex, skinIndex ); end end function moveCameraTo( class, skin ) local camX, camY, camZ = class.cameraMngr.pos.x, class.cameraMngr.pos.y, class.cameraMngr.pos.z; local lookAtX, lookAtY, lookAtZ = class.cameraMngr.lookAt.x, class.cameraMngr.lookAt.y, class.cameraMngr.lookAt.z; fadeCamera( true ); --outputDebugString( "fading camera in" ); setCameraMatrix( camX, camY, camZ, lookAtX, lookAtY, lookAtZ ); setTimer( teleportTempPed, 500, 1, skin ); end local losTests = 0; -- line of sight function teleportTempPed( skin ) local x, y, z = getWorldFromScreenPosition( screenSize[ 1 ] - gridList:Size(false) -295, ( screenSize[ 2 ]) -250, 5 ) local cX, cY, cZ; cX, cY, cZ = getCameraMatrix(); if not tempPed then createTempPed( skin.modelId ); else setElementPosition( g_ground, x, y, z - 1.02 ); setElementPosition( tempPed, x, y, z ); setElementModel( tempPed, skin.modelId ); x, y, z = getWorldFromScreenPosition( screenSize[ 1 ] - gridList:Size(false) -295, ( screenSize[ 2 ]) -250, 5 ) end if not processLineOfSight( cX, cY, cZ, x, y, z ) then losTests = losTests + 1; if losTests < 3 then setTimer( teleportTempPed, 300, 1, skin ); return else destroyElement( g_ground ); destroyElement( tempPed ); tempPed = nil; createTempPed( skin.modelId ); enableSpawn( true ); losTests = 0; end else enableSpawn( true ); end end function createClassDescriptionWnd( ) descrGridList = GridList:Create( screenSize[ 1 ] - 305, 5, 300, 125, false ); descrTitleLbl = Label:Create( 8, 5, 100, 30, "Descripcion:", false, descrGridList.gui ); descrTitleLbl:Font( "sans" ); descrTitleLbl:Color( 255, 0, 0 ); descrLabel = Memo:Create( 10, 25, 280, 90, "", false, descrGridList.gui ); descrLabel:ReadOnly( true ); descrGridList:Alpha( 1 ); descrGridList:Visible( false ); end function createClassWeaponWnd( ) local descrSize = { descrGridList:Size( false ) }; weaponsGrid = GridList:Create( screenSize[ 1 ] - 1, descrSize[ 2 ] + 4, 1, 1, false ); weaponsGrid:Alpha( .0 ); weaponsGrid:Visible( false ); end function enableSpawn( enable ) bringSpawnMenuToFront( ); gridList:Enabled( enable ); spawnBtn:Enabled( enable ); descrGridList:Visible( enable ); if enable == true then local data = split( gridList:ItemData( selectedRow, 1 ), string.byte(',') ); local classIndex = tonumber( data[ 1 ] ); local skinIndex = tonumber( data[ 2 ] ); local class = classGroups[ selectedGroup + 1 ].classes[ classIndex ]; if class.weaponMngr:WeaponCount( ) > 0 then weaponsGrid:Visible( enable ); else weaponsGrid:Visible( false ); end end end function resizeWeaponsWnd( weaponManager ) local minHeight = 18; local weapCount = weaponManager:WeaponCount( ); local weapons = weaponManager:GetWeapons( ); weaponsGrid:Size( 115, minHeight + ( weapCount * 40 ), false ); if weapCount > 0 then for i, icon in pairs( weaponIcons ) do if icon and icon.gui then destroyElement( icon.gui ); end end weaponIcons = nil; weaponIcons = { }; for i, lbl in pairs( weaponLabels ) do if lbl and lbl.gui then destroyElement( lbl.gui ); end end weaponLabels = nil weaponLabels = { }; for i, weapon in ipairs( weapons ) do weaponIcons[ i ] = StaticImage:Create( 10, ( (i-1) * 40 ) + 10, iconWidths[ weapon.id ], 20, icons[ weapon.id ], false, weaponsGrid.gui ); weaponLabels[ i ] = Label:Create( 10, ( (i-1) * 40 ) + 17, 95, 35, "\nAmmo: x" .. tostring( weapon.ammo ), false, weaponsGrid.gui ); weaponLabels[ i ]:Font( "pricedown" ); weaponLabels[ i ]:HorizontalAlign( "left" ); end weaponsGrid:Visible( true ); else weaponsGrid:Visible( false );
  17. Hola alguien conoce de algún buen host que se pueda pagar por wester unión el que utilizaba desapareció y no conozco otro host si alguien conoce uno me lo puede decir
  18. is there any way to change the bind key chat say and teamsay
  19. ._. acabo de pagar mi host que pedi en saw host por wester union y no me entra la pagina que paso
×
×
  • Create New...