Jump to content

Arsilex

Members
  • Posts

    1,410
  • Joined

  • Last visited

Everything posted by Arsilex

  1. Lo que pasa es que habia creado el tema en otra seccion, yo lo movi aca. Am no sabia jeje
  2. Lo unico que quiero saber es como usar exports.admin:getPlayerCountry(player) en un dx...
  3. Arsilex

    IMG Contry

    how is to dxDrawImage(1235.0,99.0,21.0,16.0,"images/shruk.png",0.0,0.0,0.0,tocolor(255,255,255,255),false) in images/shruk put contry img from admin panel and this put in 1235.0,99.0,21.0,16.0 on player join server and put contry img
  4. 1º Aqui nadie te ara el script por ser tu 2º aqui todos ablan español 3º Tendras que aprender scripting.
  5. Bueno tengo un joinquit que es el de mota pero no es eso lo que quiero es que añadi imagenes a el pero las ultimas no me van por la siguente razon dxDrawImage(1235.0,99.0,21.0,16.0,"images/shruk.png",0.0,0.0,0.0,tocolor(255,255,255,255),false) Esta es la ultima img pero quiero hacer que cuando esa imagen se ponga que no salga la imagen shruk si no la bandera de un pais como abria que hacer eso?
  6. --ID Usa esto haber si te va no lo eh probado... local ids = { } addEventHandler( "onPlayerJoin", root, function( ) for i = 1, getMaxPlayers( ) do if not ids[ i ] then ids[ i ] = source setElementData( source, "playerid", i ) break end end end ) addEventHandler( "onResourceStart", resourceRoot, function( ) for i, source in ipairs( getElementsByType( "player" ) ) do ids[ i ] = source setElementData( source, "playerid", i ) end end ) addEventHandler( "onPlayerQuit", root, function( type, reason, responsible ) for i = 1, getMaxPlayers( ) do if ids[ i ] == source then ids[ i ] = nil if reason then type = type .. " - " .. reason if isElement( responsible ) and getElementType( responsible ) == "player" then type = type .. " - " .. getPlayerName( responsible ) end end exports.server:message( "%C04[" .. i .. "]%C %B" .. getPlayerName( source ):gsub( "_", " " ) .. "%B left the server. (" .. type .. ")" ) break end end end ) function getFromName( player, targetName, ignoreLoggedOut ) if targetName then targetName = tostring( targetName ) local match = { } if targetName == "*" then match = { player } elseif tonumber( targetName ) then match = { ids[ tonumber( targetName ) ] } elseif ( getPlayerFromName ( targetName ) ) then match = { getPlayerFromName ( targetName ) } else for key, value in ipairs ( getElementsByType ( "player" ) ) do if getPlayerName ( value ):lower():find( targetName:lower() ) then match[ #match + 1 ] = value end end end if #match == 1 then if isLoggedIn( match[ 1 ] ) or ignoreLoggedOut then return match[ 1 ], getPlayerName( match[ 1 ] ):gsub( "_", " " ), getElementData( match[ 1 ], "playerid" ) else if player then outputChatBox( getPlayerName( match[ 1 ] ):gsub( "_", " " ) .. " is not logged in.", player, 255, 0, 0 ) end return nil -- not logged in error end elseif #match == 0 then if player then outputChatBox( "No player matches your search.", player, 255, 0, 0 ) end return nil -- no player elseif #match > 10 then if player then outputChatBox( #match .. " players match your search.", player, 255, 204, 0 ) end return nil -- not like we want to show him that many players else if player then outputChatBox ( "Players matching your search are: ", player, 255, 204, 0 ) for key, value in ipairs( match ) do outputChatBox( " (" .. getElementData( value, "playerid" ) .. ") " .. getPlayerName( value ):gsub ( "_", " " ), player, 255, 255, 0 ) end end return nil -- more than one player. We list the player names + id. end end end addCommandHandler( "id", function( player, commandName, target ) if isLoggedIn( player ) then local target, targetName, id = getFromName( player, target ) if target then outputChatBox( targetName .. "'s ID is " .. id .. ".", player, 255, 204, 0 ) end end end ) function getID( player ) local id = getElementData( player, "playerid" ) if ids[ id ] == player then return id else for i = 1, getMaxPlayers( ) do if ids[ i ] == player then return id end end end end
  7. Mira hize esto pero cuando un admin envia el mensaje dice que el jugador no es admin por que claro el jugador al que envia no es admin como hacer para que un admin puede enviar a todos eso? -- /pm to message other players local function pm( player, target, message ) outputChatBox( "PM a [" .. exports.players:getID( target ) .. "] " .. getPlayerName( target ) .. ": " .. message, player, 255, 255, 0 ) outputChatBox( "PM de [" .. exports.players:getID( player ) .. "] " .. getPlayerName( player ) .. ": " .. message, target, 255, 255, 0 ) end addCommandHandler( "pm", function( thePlayer, commandName, otherPlayer, ... ) if exports.players:isLoggedIn( thePlayer ) then if otherPlayer and ( ... ) then local message = table.concat( { ... }, " " ) local player, name = exports.players:getFromName( thePlayer, otherPlayer ) if ( hasObjectPermissionTo ( player, "command.kick", true ) ) then if player then pm( thePlayer, player, message ) end else outputChatBox( "Este jugador no es administrador!", thePlayer, 255, 255, 255 ) end else outputChatBox( "Syntax: /" .. commandName .. " [player] [ooc text]", thePlayer, 255, 255, 255 ) end end end ) addEventHandler( "onPlayerPrivateMessage", root, function( message, recipent ) if exports.players:isLoggedIn( thePlayer ) and exports.players:isLoggedIn( recipent ) then pm( source, recipent, message ) end cancelEvent( ) end )
  8. lo que yo digo es que el script necesita ejecutarlo un comando que es el setmap osea que el setmap ejecuta la funciona bla bla bla y entonces se pone el next yo use este para mi panel.. executeCommandHandler("nextmap",thePlayer,mapName)
  9. una cosa donde ejecuta el comando el script el comando "setmap"???
  10. Hola miren tengo esto local function pm( player, target, message ) outputChatBox( "PM a [" .. exports.players:getID( target ) .. "] " .. getPlayerName( target ) .. ": " .. message, player, 255, 255, 0 ) outputChatBox( "PM de [" .. exports.players:getID( player ) .. "] " .. getPlayerName( player ) .. ": " .. message, target, 255, 255, 0 ) end addCommandHandler( "pm", function( thePlayer, commandName, otherPlayer, ... ) if exports.players:isLoggedIn( thePlayer ) then if otherPlayer and ( ... ) then local message = table.concat( { ... }, " " ) local player, name = exports.players:getFromName( thePlayer, otherPlayer ) if player then pm( thePlayer, player, message ) end else outputChatBox( "Syntax: /" .. commandName .. " [player] [ooc text]", thePlayer, 255, 255, 255 ) end end end ) addEventHandler( "onPlayerPrivateMessage", root, function( message, recipent ) if exports.players:isLoggedIn( thePlayer ) and exports.players:isLoggedIn( recipent ) then if ( hasObjectPermissionTo ( thePlayer, "command.kick", true ) ) then pm( source, recipent, message ) end end cancelEvent( ) end ) Y como ven intente poner si el player no es admin que no envie el pm pero no funciona el mensaje sigue llegando yo lo que quiero es que los jugadores solo puedan enviar PM a los admines y lo admines a todos los jugadores como aria eso S:
  11. Arsilex

    CountryID

    Esta eso muy buen digo yo primero por que un evento no puede ser para dos function a la vez..... como en tu caso addEventHandler("onResourceStart",getResourceRootElement(getThisResource()),function() Te lo remodele un poco aver si te sirve. g_Root = getRootElement() function Initiate() country = getPlayerCountry(source) if country == nil or country == false then country = "n/a" end setElementData(source, "country", country) end addEventHandler('onPlayerJoin', g_Root, Initiate) addEventHandler('onPlayerJoin', g_Root, function() country = getPlayerCountry(source) if country == nil or country == false then country = "n/a" end outputChatBox('#FF0000*ENTRANDO: #ffffff' .. getPlayerName(source) .. ' #339999Se ha Unido al server Desde #ffffff"'..country..'"#0fc0fc', getRootElement(), 255, 100, 100, true) setElementData(source, "country", country) end ) addEventHandler("onResourceStart",getResourceRootElement(getThisResource(), function () country = getPlayerCountry(source) if country == nil or country == false then country = "n/a" end setElementData(source, "country", country) end, 4000, 1) ) aCountries = {} function getPlayerCountry ( player ) return getIpCountry ( getPlayerIP ( player ) ) end
  12. Hola miren hize este script pero no me funciona addCommandHandler ( "cuff", function ( player, commandName, otherPlayer ) local cuff = toggleAllControls ( player ) if ( otherPlayer and cuff ) then local other, name = exports.players:getFromName ( player, otherPlayer ) if ( other ) then if ( player ~= other ) then local x, y, z = getElementPosition ( player ) if ( getDistanceBetweenPoints3D ( x, y, z, getElementPosition ( other ) ) < 5 ) then toggleAllControls ( other, true ) outputChatBox ( " Arrestado por" .. name .. " ".", player, 0, 255, 0 ) outputChatBox ( getPlayerName ( player ):gsub ( "_", " " ) .. " te arresto.", other, 0, 255, 0 ) else outputChatBox ( "Estas lejos de " .. name .. ".", player, 255, 0, 0 ) end else outputChatBox ( "No puedes darte arma a ti mismo.", player, 255, 0, 0 ) end end else outputChatBox ( "Syntax: /" .. commandName .. " [player]", player, 255, 255, 255 ) end end ) Al poner cuff tiene que dejar al jugador (other) sin movimiento
  13. Arsilex

    skins

    miren tengo esto en el paradise para ponerse skins t cuando le doy a uno siempre sale lo mismo elseif id == 5 then if type( value ) == "number" and exports.players:isValidSkin( value ) then local new = exports.players:getSkinDetails( value ) local current = exports.players:getSkinDetails( getElementModel( source ) ) if current.gender == new.gender and current.color == new.color then if setElementModel( source, value ) then exports.chat:me( source, "changes their clothes." ) else outputChatBox( "(( You're already wearing these clothes. ))", source, 255, 0, 0 ) end else outputChatBox( "(( These clothes do not fit you. ))", source, 255, 0, 0 ) end end siempre sale outputChatBox( "(( These clothes do not fit you. ))", source, 255, 0, 0 )
  14. no puedo postearlo castillo lo ah comprimido o como se diga..
  15. yo creo que el se refiere cuando subes de nivel que sale algo en el medio y la musiquita esa
  16. Arsilex

    HitMarker

    Hello im have one problem in my script Mision1 = createMarker ( 2788.11, -2409.87, 12.63, "cylinder", 1.5, 255, 255, 0, 170 ) function Tren( hitElement ) if ( exports.exp_system:getPlayerLevel ( source ) >= 7 ) then Estacion = createMarker( 1762.55, -1945.46, 12.24, "cylinder", 5, 255, 255, 0, 170 ) Puto1 = createBlip ( 1762.55, -1945.46, 12.24, 56, 0, 0, 0, 255,thePlayer ) coche1 = createVehicle ( 542, 2788.33, -2418.6, 13.63 ) destroyElement ( Mision1 ) outputChatBox ( "James:Hola tienes que ir hasta la estacion de tren y recoje a mi hermano de alli", getRootElement(), 255, 255, 255, true,thePlayer ) else outputChatBox ( "No eres el nivel apropiado para ello", getRootElement(), 255, 255, 255, true ) end end addEventHandler("onPlayerMarkerHit",getRootElement(),Tren) function Volver( hitElement ) Casa = createMarker( 2788.33, -2418.6, 12.63, "cylinder", 5, 255, 255, 0, 170 ) Puto1 = createBlip ( 2788.33, -2418.6, 13.63, 56, 0, 0, 0, 255,thePlayer ) destroyElement ( Estacion ) outputChatBox ( "Javier: Hola soy el hermano de James puedes llevarme a casa porfavor.!", getRootElement(), 255, 255, 255, true,thePlayer ) end addEventHandler( "onMarkerHit", Estacion, Volver ) onhitmarker (function Volver..... the script create vehicles form marker 1
  17. Arsilex

    Misiones

    Hola queria saber por que no me funciona esto cuando yo paso (no soy level 10 ) me tendria que salir que no eres nivel apropiado pero me sale que valla a por el siguente punto Mision1 = createMarker ( 2788.11, -2409.87, 12.63, "cylinder", 1.5, 255, 255, 0, 170 ) function MarkerHit( hitElement, matchingDimension ) if exports.exp_system:getPlayerLevel ( source,10 ) then createMarker( 1762.55, -1945.46, 12.24, "cylinder", 1.5, 255, 255, 0, 170 ) outputChatBox ( "Hola tienes que ir hasta la estacion de tren y recoje a mi hermano de alli", getRootElement(), 255, 255, 255, true ) else outputChatBox ( "No eres el nivel apropiado para ello", getRootElement(), 255, 255, 255, true ) end end addEventHandler("onPlayerMarkerHit",getRootElement(),MarkerHit) (Estoy usando el resource exp_system de Castillo)
  18. Miren hize este script para mi sv zombies y a algunos que tienen peor resolucion no les aparece dxDrawText( tostring ( getElementData ( localPlayer, "level" ) ),954.0,701.0,1031.0,767.0,tocolor(0,0,255,190),2.0,"diploma","center","center",false,false,false) dxDrawText( tostring ( getElementData ( localPlayer, "exp" ) ),1094.0,707.0,1165.0,759.0,tocolor(0,0,255,150),2.0,"diploma","center","center",false,false,false) dxDrawRectangle(945.0,699.0,254.0,68.0,tocolor(0,0,0,90),false) dxDrawText("Exp",1075.0,646.0,1168.0,699.0,tocolor(0,0,0,150),1.0,"beckett","center","center",false,false,false) dxDrawText("Level",946.0,646.0,1039.0,699.0,tocolor(0,0,0,150),1.0,"beckett","center","center",false,false,false)
  19. Arsilex

    /papeles

    Hola miren tengo este script addCommandHandler( "setvehiclefaction", function( player, commandName, other, faction ) local faction = tonumber( faction ) if other and faction and ( faction == 0 or exports.factions:getFactionName( faction ) ) then local other, name = exports.players:getFromName( player, other ) if other then local vehicle = getPedOccupiedVehicle( other ) if vehicle then local data = vehicles[ vehicle ] if data then if data.vehicleID > 0 then if data.characterID <= 0 then if exports.sql:query_free( "UPDATE vehicles SET characterID = " .. -faction .. " WHERE vehicleID = " .. data.vehicleID ) then data.characterID = -faction outputChatBox( name .. "'s " .. getVehicleName( vehicle ) .. " does now belong to " .. ( faction == 0 and "no faction" or exports.factions:getFactionName( faction ) ) .. ".", player, 0, 255, 153 ) else outputChatBox( "MySQL Query failed.", player, 255, 0, 0 ) end else outputChatBox( "This is no civilian/faction vehicle.", player, 255, 0, 0 ) end end else outputChatBox( "Vehicle Error.", player, 255, 0, 0 ) end else outputChatBox( name .. " isn't driving a vehicle.", player, 255, 0, 0 ) end end else outputChatBox( "Syntax: /" .. commandName .. " [player] [faction or 0 for no faction]", player, 255, 255, 255 ) end end, true ) y lo que yo quiero es que se guarde no el ID de la faccion si no que de el palayer osea y pongo /darapapeles estando en el coche los papele del coche se cambien de mi nombre al nombre de el PJ que tendira que modificar alli? SS::S
  20. Arsilex

    Level

    Prueba asi addEventHandler("onClientRender",root, function() dxDrawText( tostring ( getElementData ( localPlayer, "lvl" ) ),636.0,148.0,696.0,183.0,tocolor(255,255,255,255),1.0,"default","left","top",false,false,false) dxDrawRectangle(633.0,142.0,67.0,46.0,tocolor(255,255,255,255),false) end )
  21. con quitar eso funcionaria no?
  22. entonces quito lo de getPlayerName y solo dejo (item)?
×
×
  • Create New...