Jump to content

JoinQuit by Mota pero editado


Arsilex

Recommended Posts

Posted

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?

rsilex.png.0e6ad382b3fdc3cbe6390e3e847572c9.png
Posted
1º Aqui nadie te ara el script por ser tu

Al menos postea la linea de las imagenes dentro del codigo de mota.

y con las banderas claro. para ir moldeando el script. Asi tirando una linea de drawImage sera dificil pa los ke no conocen ese script de mota

Actual Nick: [XGN]BorderLine

Actual Clan: XLatino

Actual Status: Staff, Mod Level 1

(BOSS)Yakuza - [vS]Yakuza - [sXE]Yakuza - [uG]Yakuza - [FTLS]Racing - [XGN]Borderline

Posted

No podes, ya que la funcion esa es server side, tenes que guardar el codigo del pais en element data al entrar al servidor.

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted

pfff y aora encima aprender como se usa el elemet ._.

PD: no se puede hacer con un simple trigger?

y otra cosa eso de element data se tiene que usar con un XML?

rsilex.png.0e6ad382b3fdc3cbe6390e3e847572c9.png
Posted

element data no necesita XML, es para guardar datos temporarios, al destruirse el elemento, en este caso el jugador se va, esa informacion se borra.

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted

Osea serviría así

local Pais = setElementData (source, getPlayerCountry) 
  
dxDrawImage(1235.0,99.0,21.0,16.0,..Pais..,0.0,0.0,0.0,tocolor(255,255,255,255),false) 

rsilex.png.0e6ad382b3fdc3cbe6390e3e847572c9.png
Posted

Nada quever, ademas necesitas las imagenes del pais que tengan el mismo formato.

Tenes que usar: setElementData al entrar al servidor, osea: onPlayerJoin, ahi obtener el pais del jugador y guardarlo como element data.

Luego en el client side obtenes esa element data con: getElementData.

Mejor explicado imposible.

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted

No se si lo hize bien pero creo que es asi

Client-Side

  
  
dxDrawImage(1235.0,99.0,21.0,16.0,..getElementData..,0.0,0.0,0.0,tocolor(255,255,255,255),false) 

Server-Side

function Entro() 
setElementData (source, getPlayerCountry(Player)) 
end 
addEventHandler ( "onPlayerJoin", getRootElement(), Entro) 
  

rsilex.png.0e6ad382b3fdc3cbe6390e3e847572c9.png
Posted

Eso no tiene sentido.

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted

cuando guardes algo en setElementData debes darle una key.. osea algo para saber donde estas guardando dichos datos

Por ejemplo pones setElementData (source,"country.flags", getPlayerCountry(source))

y despues por clientside getElementData(localPlayer,"country.flags")

Nose si estoy bien, eso tengo entendido, que solid me corrija si tiene tiempo

Actual Nick: [XGN]BorderLine

Actual Clan: XLatino

Actual Status: Staff, Mod Level 1

(BOSS)Yakuza - [vS]Yakuza - [sXE]Yakuza - [uG]Yakuza - [FTLS]Racing - [XGN]Borderline

Posted

Así estaría bien

function renderPlayerJoined ( ) 
    Banderas = dxDrawImage(1235.0,99.0,21.0,16.0, "/images/flags/" ,0.0,0.0,0.0,tocolor(255,255,255,255),false) 
end 

addEventHandler('onClientPlayerJoin', root, 
    function() 
        messageJoin = getPlayerName(source) .. " #00ff00has joined in #80ff00Tbb#abcdef!" 
        addEventHandler ( "onClientRender", root, renderPlayerJoined ) 
        getElementData(localPlayer,"country.flags",Banderas) 
        setTimer ( 
            function ( ) 
                removeEventHandler ( "onClientRender", root, renderPlayerJoined ) 
            end 
            ,6000,1 
        ) 
    end 
) 

rsilex.png.0e6ad382b3fdc3cbe6390e3e847572c9.png
Posted

mm podrias hacerle asi :

srv-side :

addEventHandler("onPlayerJoin",root,function() 
local the_country = getElementData(source,"elPais") 
if the_country == CL then 
triggerClientEvent("mostrarbanderaCL",getRootElement()) 
end 
end 
) 
  

cl-side

  
addEvent("mostrarbanderaCL",true) 
addEventHandler("mostrarbanderaCL",root,function() 
dxDrawImage(...) 
end 
) 

espero haberte ayudado

elMota/elFoReX De Vuelta En MTA *---------*

Cuenta De Youtube En La Que Subo Tutoriales Acerca De MTA :3

https://www.youtube.com/user/KillersGPs

430x73_FFFFFF_FF9900_000000_000000.png
Posted

Las funciones de DirectX necesitan el evento onClientRender para funcionar.

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted
  
  
function CL() 
dxDrawImage(BLABLABLA) 
end 
  
addEvent("mostrarbanderaCL",true) 
addEventHandler("mostrarbanderaCL",root,function() 
addEventHandler("onClientRender",root,CL) 
end 
) 

? c:

elMota/elFoReX De Vuelta En MTA *---------*

Cuenta De Youtube En La Que Subo Tutoriales Acerca De MTA :3

https://www.youtube.com/user/KillersGPs

430x73_FFFFFF_FF9900_000000_000000.png
Posted

No tiene sentido ese codigo.

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted

No estoy seguro, pero creo que se puede hacer algo como esto:

function creargui() 
 function CL() 
 dxDrawImage(BLABLABLA) 
 end 
 addEventHandler("onClientRender",root,CL) 
end 
  
addEvent("mostrarbanderaCL",true) 
addEventHandler("mostrarbanderaCL",root,function() 
creargui() 
end 
) 

Developer @ MYVAL

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...