Jump to content

Castillo

Retired Staff
  • Posts

    21,935
  • Joined

  • Last visited

  • Days Won

    6

Everything posted by Castillo

  1. I'm not sure if you can replace CJ Clothes.
  2. @Juan: Eso que hiciste es la manera mas boluda de hacerlo ( sin ofender ), para que enviar 2 triggers de la misma tabla? ademas "usuario" y "rango" estan en la misma tabla, asi que solo envias una sola vez y obtenes ambos datos. -- client side: GUIEditor_Label3 = {} theWindowCla3 = guiCreateWindow(200,50,400,200,"[CLG]Clanes Lista de Miembros",false) guiWindowSetSizable(theWindowCla3,false) guiSetVisible (theWindowCla3, false) guiLabelSetHorizontalAlign(GUIEditor_Label3[1],"left",false) guiSetFont(GUIEditor_Label3[1],"default-bold-small") CerraVentanaMiembro = guiCreateButton(0.65,0.85,0.30,0.50,"Close",true,theWindowCla3) SubeRambo = guiCreateButton(0.01,0.85,0.50,0.10,"Promote",true,theWindowCla3) BajaRambo = guiCreateButton(0.01,0.85,0.50,0.10,"Promote",true,theWindowCla3) addEvent("ListaMiembros",true) local playerList2 = guiCreateGridList ( 0.01, 0.10, 0.99, 0.60, true, theWindowCla3 ) local column2 = guiGridListAddColumn( playerList2, "Online?", 0.10 ) local column3 = guiGridListAddColumn( playerList2, "Name", 0.25 ) local column4 = guiGridListAddColumn( playerList2, "Cuenta", 0.25 ) local column5 = guiGridListAddColumn( playerList2, "Rango", 0.25 ) function ListaMiembros(usuarios) if ( column4 ) then for index, clan in ipairs ( usuarios ) do local row = guiGridListAddRow ( playerList2 ) guiGridListSetItemText ( playerList2, row, 3, clan [ "usuario" ], false, false ) guiGridListSetItemText ( playerList2, row, 4, clan [ "rango" ], false, false ) end end end addEventHandler ("ListaMiembros", getRootElement(), ListaMiembros) -- server side: addEvent ("PidoListaMiembros", true) function PidoListaMiembros (MiClan) local account = getPlayerAccount(source) local accountName = getAccountName(account) local master = dbQuery ( link, "SELECT usuario FROM clanmiembros WHERE clan='".. MiClan .."'" ) local queryResult = dbPoll ( master , -1 ) if ( queryResult ~= nil ) then triggerClientEvent ( source, "ListaMiembros", source, queryResult ) end dbFree ( master ) end addEventHandler ( "PidoListaMiembros", getRootElement(), PidoListaMiembros )
  3. A report againts me? with what charges? I haven't done anything wrong. P.S: We never followed you, you supposed we'd.
  4. Castillo

    Help

    You're still using setPlayerWantedLevel. Also, the second function argument is a number, not a string.
  5. No te aconsejo hacer el loop server side, mejor envia la tabla de los clanes y luego haces el loop en el client side: --client side: addEvent("ListaClanes",true) function ListaClanes(clanes) local playerList = guiCreateGridList ( 0.01, 0.09, 0.90, 0.75, true, theWindowCla1 ) local column = guiGridListAddColumn( playerList, "Clanes", 0.75 ) if ( column ) then for index, clan in ipairs ( clanes ) do local row = guiGridListAddRow ( playerList ) guiGridListSetItemText ( playerList, row, column, clan [ "elNombreDeLaColumna" ], false, false ) -- Cambia "elNombreDeLaColumna". end end end addEventHandler ("ListaClanes", getRootElement(), ListaClanes) -- server side: addEvent ("PidoLista", true) function PidoLista ( ) local master = dbQuery ( link, "SELECT nombreclan FROM clanes" ) local queryResult = dbPoll ( master , -1 ) if ( queryResult ~= nil ) then triggerClientEvent ( source, "ListaClanes", source, queryResult ) end dbFree ( master ) end addEventHandler ( "PidoLista", getRootElement(), PidoLista ) Mira el comentario que puse en el client side, es muy importante.
  6. If I'm right, with the new siren functions it is possible. getVehicleSirenParams removeVehicleSirens getVehicleSirens addVehicleSirens setVehicleSirens
  7. As far as I know, this is the same Anti-AFK script that is uploaded to the MTA Community, is not stolen.
  8. Seriously? you mean: You'll let the Scripters do all the hard work and then you'll get the donations to buy your PC Games? I hardly doubt you'll get someone to work with you. P.S: Just so everyone knows, I'm not doing this reply to start a war, but to warn the Scripters.
  9. Castillo

    Help

    'source' of "onClientGUIClick" is the GUI element clicked, not a player.
  10. How do you mean by "load a table"?
  11. You can use: setAccountData.
  12. No podes usar numeros para los nombres de las variables, tenes que poner una letra: imgarmor = guiCreateStaticImage(0.5288,0.835,0.0575,0.0783,"ArmorHUD.png",true) -- Aca i0 = guiCreateStaticImage(0.6625,0.1117,0.2962,0.2483,"iconos/0.png",true) -- Aca i1 = guiCreateStaticImage(0.6625,0.1117,0.2962,0.2483,"iconos/1.png",true)
  13. 1: Te falta terminar la funcion ( un 'end' ). 2: Para usar un 'else' necesitas un 'if' primero.
  14. Queres decir que queres que no tenga los decimales el resultado? si es eso, entonces usa math.floor ( valor ).
  15. Oh, yeah, I forgot about that part, copy both codes again.
  16. You have to edit the scoreboard resource itself, you could do some research here in the forums, there are many topics related to this.
  17. Deberia funcionar, vos spawneaste y no se ocultaron?
  18. Maybe you can create a element server side, set to that element the table, and when the element data changes client side, you update the table with it's new value?
  19. -- client side: function dxDrawColorText(str, ax, ay, bx, by, color, scale, font, left, top, clip, wordbreak, postGUI) local pat = "(.-)#(%x%x%x%x%x%x)" local s, e, cap, col = str:find(pat, 1) local last = 1 while s do if cap == "" and col then color = tocolor( tonumber( "0x"..col:sub( 1, 2 ) ), tonumber( "0x"..col:sub( 3, 4 ) ), tonumber( "0x"..col:sub( 5, 6 ) ), 255 ) end if s ~= 1 or cap ~= "" then local w = dxGetTextWidth(cap, scale, font) dxDrawText( cap, ax, ay, ax + w, by, color, scale, font ) ax = ax + w color = tocolor( tonumber( "0x"..col:sub( 1, 2 ) ), tonumber( "0x"..col:sub( 3, 4 ) ), tonumber( "0x"..col:sub( 5, 6 ) ), 255 ) end last = e + 1 s, e, cap, col = str:find( pat, last ) end if last <= #str then cap = str:sub( last ) local w = dxGetTextWidth( cap, scale, font ) dxDrawText( cap, ax, ay, ax + w, by, color, scale, font, left, top, clip, wordbreak, postGUI ) end end local messageJoin = "" local x, y = guiGetScreenSize ( ) function renderPlayerJoined ( ) dxDrawColorText("#c0c0c0".. messageJoin,20,y/2-20,574.0,20.0,tocolor(200,0,0,255),1,"default-bold","left","top",false,false,false) end function greetingHandler ( player, ulke ) messageJoin = "#abcdef"..getPlayerName ( player ) .. " #c0c0c0has Joined the server from #abcdef".. tostring ( ulke ) .."#c0c0c0." addEventHandler ( "onClientRender", root, renderPlayerJoined ) setTimer ( function ( ) removeEventHandler ( "onClientRender", root, renderPlayerJoined ) end ,6000,1 ) end addEvent( "onJoin", true ) addEventHandler( "onJoin", root, greetingHandler ) -- server side: exports.scoreboard:addScoreboardColumn('country') countryNames = { ['AD'] = 'Andorra', ['AE'] = 'United Arab Emirates', ['AF'] = 'Afghanistan', ['AG'] = 'Antigua and Barbuda', ['AI'] = 'Anguilla', ['AL'] = 'Albania', ['AM'] = 'Armenia', ['AO'] = 'Angola', ['AP'] = 'ARIPO', ['AR'] = 'Argentina', ['AT'] = 'Austria', ['AU'] = 'Australia', ['AW'] = 'Aruba', ['AZ'] = 'Azerbaijan', ['BA'] = 'Bosnia and Herzegovina', ['BB'] = 'Barbados', ['BD'] = 'Bangladesh', ['BE'] = 'Belgium', ['BF'] = 'Burkina Faso', ['BG'] = 'Bulgaria', ['BH'] = 'Bahrain', ['BI'] = 'Burundi', ['BJ'] = 'Benin', ['BM'] = 'Bermuda', ['BN'] = 'Brunei Darussalam', ['BO'] = 'Bolivia', ['BQ'] = 'Bonaire', ['BR'] = 'Brazil', ['BS'] = 'Bahamas', ['BT'] = 'Bhutan', ['BV'] = 'Bouvet Island', ['BW'] = 'Botswana', ['BY'] = 'Belarus', ['BZ'] = 'Belize', ['CA'] = 'Canada', ['CD'] = 'Congo', ['CF'] = 'Central African Republic', ['CG'] = 'Congo', ['CH'] = 'Switzerland', ['CI'] = 'Cote d?Ivoire', ['CK'] = 'Cook Islands', ['CL'] = 'Chile', ['CM'] = 'Cameroon', ['CN'] = 'China', ['CO'] = 'Colombia', ['CR'] = 'Costa Rica', ['CU'] = 'Cuba', ['CV'] = 'Cape Verde', ['CW'] = 'Curacao', ['CY'] = 'Cyprus', ['CZ'] = 'Czech Republic', ['DE'] = 'Germany', ['DJ'] = 'Djibouti', ['DK'] = 'Denmark', ['DM'] = 'Dominica', ['DO'] = 'Dominican Republic', ['DZ'] = 'Algeria', ['EC'] = 'Ecuador', ['EE'] = 'Estonia', ['EG'] = 'Egypt', ['EH'] = 'Western Sahara', ['ER'] = 'Eritrea', ['ES'] = 'Spain', ['ET'] = 'Ethiopia', ['FI'] = 'Finland', ['FJ'] = 'Fiji', ['FK'] = 'Malvinas', ['FO'] = 'Faroe Islands', ['FR'] = 'France', ['GA'] = 'Gabon', ['GB'] = 'United Kingdom', ['GD'] = 'Grenada', ['GE'] = 'Georgia', ['GG'] = 'Guernsey', ['GH'] = 'Ghana', ['GI'] = 'Gibraltar', ['GL'] = 'Greenland', ['GM'] = 'Gambia', ['GN'] = 'Guinea', ['GQ'] = 'Equatorial Guinea', ['GR'] = 'Greece', ['GT'] = 'Guatemala', ['GW'] = 'Guinea-Bissau', ['GY'] = 'Guyana', ['HN'] = 'Honduras', ['HR'] = 'Croatia', ['HT'] = 'Haiti', ['HU'] = 'Hungary', ['ID'] = 'Indonesia', ['IE'] = 'Ireland', ['IL'] = 'Israel', ['IM'] = 'Isle of Man', ['IN'] = 'India', ['IQ'] = 'Iraq', ['IR'] = 'Iran', ['IS'] = 'Iceland', ['IT'] = 'Italy', ['JE'] = 'Jersey', ['JM'] = 'Jamaica', ['JO'] = 'Jordan', ['JP'] = 'Japan', ['KE'] = 'Kenya', ['KG'] = 'Kyrgyzstan', ['KH'] = 'Cambodia', ['KI'] = 'Kiribati', ['KM'] = 'Comoros', ['KN'] = 'Saint Kitts and Nevis', ['KP'] = 'Korea', ['KR'] = 'Korea', ['KW'] = 'Kuwait', ['KY'] = 'Cayman Islands', ['KZ'] = 'Kazakhstan', ['LA'] = 'Lao People?s Republic', ['LB'] = 'Lebanon', ['LC'] = 'Saint Lucia', ['LI'] = 'Liechtenstein', ['LK'] = 'Sri Lanka', ['LR'] = 'Liberia', ['LS'] = 'Lesotho', ['LT'] = 'Lithuania', ['LU'] = 'Luxembourg', ['LV'] = 'Latvia', ['LY'] = 'Libyan Arab Jamahiriya', ['MA'] = 'Morocco', ['MC'] = 'Monaco', ['MD'] = 'Moldova', ['ME'] = 'Montenegro', ['MG'] = 'Madagascar', ['MK'] = 'Macedonia', ['ML'] = 'Mali', ['MM'] = 'Myanmar', ['MN'] = 'Mongolia', ['MO'] = 'Macao', ['MP'] = 'Northern Mariana Islands', ['MR'] = 'Mauritania', ['MS'] = 'Montserrat', ['MT'] = 'Malta', ['MU'] = 'Mauritius', ['MV'] = 'Maldives', ['MW'] = 'Malawi', ['MX'] = 'Mexico', ['MY'] = 'Malaysia', ['MZ'] = 'Mozambique', ['NA'] = 'Namibia', ['NE'] = 'Niger', ['NG'] = 'Nigeria', ['NI'] = 'Nicaragua', ['NL'] = 'Netherlands', ['NO'] = 'Norway', ['NP'] = 'Nepal', ['NR'] = 'Nauru', ['NZ'] = 'New Zealand', ['OM'] = 'Oman', ['PA'] = 'Panama', ['PE'] = 'Peru', ['PG'] = 'Papua New Guinea', ['PH'] = 'Philippines', ['PK'] = 'Pakistan', ['PL'] = 'Poland', ['PT'] = 'Portugal', ['PW'] = 'Palau', ['PY'] = 'Paraguay', ['QA'] = 'Qatar', ['RO'] = 'Romania', ['RS'] = 'Serbia', ['RU'] = 'Russian Federation', ['RW'] = 'Rwanda', ['SA'] = 'Saudi Arabia', ['SB'] = 'Solomon Islands', ['SC'] = 'Seychelles', ['SD'] = 'Sudan', ['SE'] = 'Sweden', ['SG'] = 'Singapore', ['SH'] = 'Saint Helena', ['SI'] = 'Slovenia', ['SK'] = 'Slovakia', ['SL'] = 'Sierra Leone', ['SM'] = 'San Marino', ['SN'] = 'Senegal', ['SO'] = 'Somalia', ['SR'] = 'Suriname', ['ST'] = 'Sao Tome and Principe', ['SV'] = 'Salvador', ['SX'] = 'Sint Maarten (Dutch part)', ['SY'] = 'Syrian Arab Republic', ['SZ'] = 'Swaziland', ['TC'] = 'Turks and Caicos Islands', ['TD'] = 'Chad', ['TG'] = 'Togo', ['TH'] = 'Thailand', ['TJ'] = 'Tajikistan', ['TL'] = 'Timor?Leste', ['TM'] = 'Turkmenistan', ['TN'] = 'Tunisia', ['TO'] = 'Tonga', ['TR'] = 'Turkey', ['TT'] = 'Trinidad and Tobago', ['TV'] = 'Tuvalu', ['TW'] = 'Taiwan', ['TZ'] = 'Tanzania', ['UA'] = 'Ukraine', ['UG'] = 'Uganda', ['US'] = 'United States of America', ['UY'] = 'Uruguay', ['UZ'] = 'Uzbekistan', ['VA'] = 'Holy See', ['VC'] = 'Saint Vincent', ['VE'] = 'Venezuela', ['VG'] = 'Virgin Islands', ['VN'] = 'Viet Nam', ['VU'] = 'Vanuatu', ['WS'] = 'Samoa', ['YE'] = 'Yemen', ['ZA'] = 'South Africa', ['ZZ'] = 'n/a', ['ZM'] = 'Zambia', } function showHome ( ) local countryCode = exports [ "admin" ]:getPlayerCountry ( source ) setElementData ( source, "country", countryNames [ countryCode ] ) triggerClientEvent ( "onJoin", getRootElement(), source, tostring ( countryNames [ countryCode ] ) ) end addEventHandler ( "onPlayerJoin", getRootElement(), showHome )
  20. What about if you tell us what's not working?
×
×
  • Create New...