-
Posts
21,935 -
Joined
-
Last visited
-
Days Won
6
Everything posted by Castillo
-
Skin mods: https://community.multitheftauto.com/ind ... ls&id=5560 DONE
-
I prefer RPG's because I don't like to play like the real life itself.
-
Ok, entonces olvidate del post anterior mio y usa esto: function dxsetText ( ) local text = "" local UP = tonumber ( getElementData ( localPlayer, "level" ) ) or 0 if ( UP == 1 ) then text = "/60" elseif ( UP == 2 ) then text = "/110" elseif ( UP == 3 ) then text = "/160" elseif ( UP == 4 ) then text = "/250" elseif ( UP == 5 ) then text = "/500" elseif ( UP == 6 ) then text = "/2000" elseif ( UP == 7 ) then text = "/4000" elseif ( UP == 8 ) then text = "/8000" end GUIEditor_Label[5] = guiCreateLabel(706,159,63,13, text,false ) guiSetFont ( GUIEditor_Label[5], "default-bold-small" ) end addEventHandler ( "onClientResourceStart", resourceRoot, dxsetText ) addEventHandler ( "onClientElementDataChange", localPlayer, function ( dataName ) if ( dataName == "level" ) then dxsetText ( ) end end )
-
Inserta todos los jugadores con sus kills en una tabla y luego usa: table.sort
-
Clear it first with: https://wiki.multitheftauto.com/wiki/GuiComboBoxClear
-
You must change the guiSetText "Memo" to "teamMemo".
-
addEventHandler ( "onClientGUIComboBoxAccepted", guiRoot, function ( comboBox ) if ( comboBox == comboTeam ) then local item = guiComboBoxGetSelected ( comboBox ) local text = guiComboBoxGetItemText ( comboBox, item ) if ( tostring ( text ) and tostring ( text ) ~= "" ) then if ( tostring ( text ) == "Police" ) then guiSetText ( Memo, "whatever .." ) end end end end ) I'm guessing that you have "Memo" defined?
-
Oh, yeah, I forgot that it had to be alive players.
-
local poisonTeam = getTeamFromName ( "Poison" ) local ninjaTeam = getTeamFromName ( "Ninja" ) function Winning ( ) local poisonPlayers = countPlayersInTeam ( poisonTeam ) local ninjaPlayers = countPlayersInTeam ( ninjaTeam ) if ( ninjaPlayers == 0 ) then outputChatBox ( "Poison Team won the round!", 255, 25, 0 ) elseif ( poisonPlayers == 0 ) then outputChatBox ( "Ninja Team won the round!", 255, 25, 0 ) elseif ( poisonPlayers == 0 and ninjaPlayers == 0 ) then outputChatBox ( "#00ff00[#ffffffThe round was a tie!#00ff00]", 255, 255, 255, true ) end end addEventHandler ( "onPlayerWasted", root, Winning ) Try that.
-
I don't think you can do that.
-
Use: playSound
-
http://portforward.com/ That website has tutorials for a lot of modems/routers as far as I know.
-
El script que contine: dxsetText ( ) es el mismo que tiene el que muestra el nivel y experiencia?
-
Is not yet on his website, if I'm right, he's still working on it.
-
addEventHandler ( "onClientResourceStart", resourceRoot, function ( ) GUIEditor_Label = { } GUIEditor_Label[2] = guiCreateLabel(625,153,53,43, tostring ( getElementData ( localPlayer, "level" ) ),false) guiSetFont ( GUIEditor_Label[2], "sa-header" ) GUIEditor_Label[4] = guiCreateLabel(679,159,49,14, tostring ( getElementData ( localPlayer, "exp" ) ),false) guiSetFont ( GUIEditor_Label[4], "default-bold-small" ) end ) addEventHandler ( "onClientElementDataChange", localPlayer, function ( dataName ) if ( dataName == "level" ) then guiSetText ( GUIEditor_Label[2], tostring ( getElementData ( localPlayer, "level" ) ) ) dxsetText ( ) elseif ( dataName == "exp" ) then guiSetText ( GUIEditor_Label[4], tostring ( getElementData ( localPlayer, "exp" ) ) ) end end ) Supongo que estan en el mismo archivo ambos scripts, ya que este ejecutara la funcion: dxsetText ( ) al cambiar el nivel.
-
Eso es porque las labels ni se crearon, copia el codigo de nuevo.
-
Ah, es que me olvide de definir 'dataName', copialo de nuevo. P.D: Mi script va a cambiar las labels al cambiar el valor.
-
Funcionaria solo si el resultado es "true", pero lo mejor es directamente devolver el resultado.
-
function isPlayerInParty ( thePlayer ) return getElementData ( thePlayer, "player.party" ) end Es mucho mas facil eso, deberia devolver: true o false.
-
addEventHandler ( "onClientResourceStart", resourceRoot, function ( ) GUIEditor_Label = { } GUIEditor_Label[2] = guiCreateLabel(625,153,53,43, tostring ( getElementData ( localPlayer, "level" ) ),false) guiSetFont ( GUIEditor_Label[2], "sa-header" ) GUIEditor_Label[4] = guiCreateLabel(679,159,49,14, tostring ( getElementData ( localPlayer, "exp" ) ),false) guiSetFont ( GUIEditor_Label[4], "default-bold-small" ) end ) addEventHandler ( "onClientElementDataChange", localPlayer, function ( dataName ) if ( dataName == "level" ) then guiSetText ( GUIEditor_Label[2], tostring ( getElementData ( localPlayer, "level" ) ) ) elseif ( dataName == "exp" ) then guiSetText ( GUIEditor_Label[4], tostring ( getElementData ( localPlayer, "exp" ) ) ) end end ) Proba con eso.
-
Ah, es que puse 'source' en vez de 'vehicle', copialo de nuevo .