Jump to content

drk

Members
  • Posts

    1,607
  • Joined

  • Last visited

Everything posted by drk

  1. Use MTA Script Editor from 50p. It have some bugs, but it's better than Notepad++
  2. ritmo brasileiro Nem sou brasileiro..
  3. Don't forget that you need to convert getTickCount time to HOUR:MINUTE:SECONDS.
  4. That's not Off-Topic. "It's really sad when your own baby knows that you're a dumbass...." -> That's the pure true.
  5. GUIEditor_Window = {} GUIEditor_Button = {} GUIEditor_Checkbox = {} GUIEditor_Label = {} GUIEditor_Edit = {} GUIEditor_Image = {} GUIEditor_Window[1] = guiCreateWindow(214,198,427,231,"GUI Cambiar Pass",false) GUIEditor_Label[1] = guiCreateLabel(29,54,103,24,"Vieja Contraseña ",false,GUIEditor_Window[1]) guiLabelSetColor(GUIEditor_Label[1],0, 0, 190) guiSetFont(GUIEditor_Label[1],"default-bold-small") GUIEditor_Edit[1] = guiCreateEdit(137,51,179,26,"",false,GUIEditor_Window[1]) GUIEditor_Label[2] = guiCreateLabel(29,101,103,24,"Nueva Contraseña ",false,GUIEditor_Window[1]) guiLabelSetColor(GUIEditor_Label[2],0,0,190) guiSetFont(GUIEditor_Label[2],"default-bold-small") GUIEditor_Edit[2] = guiCreateEdit(137,92,179,26,"",false,GUIEditor_Window[1]) guiEditSetMaxLength(GUIEditor_Edit[2],10) GUIEditor_Image[1] = guiCreateStaticImage(27,178,94,42,"images/BAT.png",false,GUIEditor_Window[1]) GUIEditor_Image[2] = guiCreateStaticImage(126,175,82,45,"images/shruk.png",false,GUIEditor_Window[1]) GUIEditor_Button[1] = guiCreateButton(324,91,91,35,"Aceptar",false,GUIEditor_Window[1]) guiSetEnabled(GUIEditor_Button[1],false) GUIEditor_Button[2] = guiCreateButton(325,49,74,35,"Cancelar",false,GUIEditor_Window[1]) GUIEditor_Checkbox[1] = guiCreateCheckBox(30,150,359,20,"Acepto Las Condiciones y Terminos de Uso de este Servidor",false,false,GUIEditor_Window[1]) guiSetFont(GUIEditor_Checkbox[1],"default-small") GUIEditor_Label[3] = guiCreateLabel(29,54,103,24,"Old Password ",false,GUIEditor_Window[1]) guiLabelSetColor(GUIEditor_Label[3],0,0,190) guiSetFont(GUIEditor_Label[3],"default-bold-small") GUIEditor_Label[4] = guiCreateLabel(29,101,103,24,"New Password ",false,GUIEditor_Window[1]) guiLabelSetColor(GUIEditor_Label[4],0,0,190) guiSetFont(GUIEditor_Label[4],"default-bold-small") GUIEditor_Button[3] = guiCreateButton(325,49,74,35,"Cancel",false,GUIEditor_Window[1]) GUIEditor_Button[4] = guiCreateButton(324,91,91,35,"Accept",false,GUIEditor_Window[1]) guiSetEnabled(GUIEditor_Button[4],false) GUIEditor_Checkbox[2] = guiCreateCheckBox(30,150,359,20,"I accept the conditions and terms of use of this server",false,false,GUIEditor_Window[1]) guiSetFont(GUIEditor_Checkbox[2],"default-small") GUIEditor_Label[5] = guiCreateLabel(219,181,198,24,"GUI CopyRight 2012 (c) by ElMota",false,GUIEditor_Window[1]) guiLabelSetColor(GUIEditor_Label[5],255, 255, 0) guiSetFont(GUIEditor_Label[5],"default-bold-small") guiSetVisible ( GUIEditor_Window[1], false ) addEventHandler ( "onClientGUIClick", root, function ( ) if ( source == GUIEditor_Image[1] ) then guiSetVisible ( GUIEditor_Label[1], true ) guiSetVisible ( GUIEditor_Label[2], true ) guiSetVisible ( GUIEditor_Label[3], false ) guiSetVisible ( GUIEditor_Label[4], false ) guiSetVisible ( GUIEditor_Checkbox[1], true ) guiSetVisible ( GUIEditor_Checkbox[2], false ) guiSetVisible ( GUIEditor_Button[1], true ) guiSetVisible ( GUIEditor_Button[2], true ) guiSetVisible ( GUIEditor_Button[3], false ) guiSetVisible ( GUIEditor_Button[4], false ) elseif ( source == GUIEditor_Image[2] ) then guiSetVisible ( GUIEditor_Label[3], true ) guiSetVisible ( GUIEditor_Label[4], true ) guiSetVisible ( GUIEditor_Label[1], false ) guiSetVisible ( GUIEditor_Label[2], false ) guiSetVisible ( GUIEditor_Checkbox[2], true ) guiSetVisible ( GUIEditor_Checkbox[1], false ) guiSetVisible ( GUIEditor_Button[3], true ) guiSetVisible ( GUIEditor_Button[4], true ) guiSetVisible ( GUIEditor_Button[1], false ) guiSetVisible ( GUIEditor_Button[2], false ) elseif ( source == GUIEditor_Button[2] ) then guiSetVisible ( GUIEditor_Window[1], false ) showCursor(false) guiSetInputEnabled(false) elseif ( source == GUIEditor_Checkbox[1] ) then guiSetEnabled ( GUIEditor_Button[1], guiCheckBoxGetSelected ( source ) ) elseif ( source == GUIEditor_Checkbox[2] ) then guiSetEnabled ( GUIEditor_Button[4], guiCheckBoxGetSelected ( source ) ) elseif ( source == GUIEditor_Button[3] ) then guiSetVisible ( GUIEditor_Window[1], false ) showCursor(false) guiSetInputEnabled(false) end end ) function markerHit (hitPlayer) if ( hitPlayer == localPlayer ) then guiSetVisible (GUIEditor_Window[1], true) showCursor (true) end end addEventHandler ("onClientMarkerHit", changepassmarket, markerHit) addEventHandler ( "onClientPlayerDamage", root, function ( ) if ( isElementWithinMarker ( source, changepassmarket ) ) then setElementHealth ( source, 100 ) end end ) function clientSubmitChangepw(button, state) if button == "left" and state == "up" then local oldpassword = guiGetText(GUIEditor_Edit[1]) local newpassword = guiGetText(GUIEditor_Edit[2]) if oldpassword and newpassword then triggerServerEvent("submitChangepw", getRootElement(), localPlayer, oldpassword, newpassword) else outputChatBox("Pon Tu vieja Contraseña y Tu Nueva Contraseña.") end end end addEventHandler( "onClientGUIClick", GUIEditor_Button[1], clientSubmitChangepw, false) function offPlayerChangeNick () cancelEvent () -- stop the event from occuring end addEventHandler ( "onPlayerChangeNick", root, offPlayerChangeNick ) -- What is "huntedPlayer"? ------------------------------------- --La GUI De Activacion---- GUI = guiCreateWindow(0.2387,0.2317,0.5375,0.2533,"GUI Cambiar Passwords",true) guiWindowSetMovable(GUI, false) guiWindowSetSizable(GUI, false) boton = guiCreateButton(9,29,153,41,"Abrir Tienda",false,GUI) guiSetFont(GUIEditor_Button[1],"default-bold-small") boton2 = guiCreateButton(264,29,153,41,"Cerrar Tienda",false,GUI) guiSetFont(GUIEditor_Button[2],"default-bold-small") label = guiCreateLabel(9,76,415,26,"--------------------------------------------------------------------------------",false,GUI) guiSetFont(GUIEditor_Label[1],"default-bold-small") boton3 = guiCreateButton(261,101,160,42,"Cancelar",false,GUI) guiSetVisible(GUI, false) function losBotones() if (source == boton) then changepassmarket = createMarker (273.19537, -158.01585, 0, "cylinder", 3, 255, 0, 0, 100) blip = createBlipAttachedTo(changepassmarket, 35) elseif (source == boton2) then if isElement ( changepassmarket ) then destroyElement(changepassmarket) end elseif isElement(blip) then destroyElement(blip) changepassmarket2 = createMarker (273.19537, -158.01585, 0, "cylinder", 3, 255, 0, 0, 100) blip = createBlipAttachedTo(changepassmarket2, 35) elseif (source == boton3) then guiSetVisible(GUI, false) showCursor(false) end end addEventHandler ( "onClientGUIClick", root, losBotones ) function lagui() triggerServerEvent ( "ACL",localPlayer) guiSetVisible(GUI, true) showCursor(true) end bindKey("F6","down", lagui) function passwordHandler(player, oldpassword, newpassword) local account = getPlayerAccount(player) if (account) then if (isGuestAccount(account)) then outputChatBox("Tu Necesitas Loggearte para Cambiar la Contraseña/You must be logged in to change your password.", player) return end local accountName = getAccountName ( account ) local password_check = getAccount(accountName, oldpassword) if (password_check ~= false) then if (string.len(newpassword) >= 3) then setAccountPassword(account, newpassword) triggerClientEvent(player, "hidePasswordWindow", getRootElement()) else outputChatBox("Tu Nueva Contraseña Debe ser de menos de 10 caracteres/Your new password must be at least 10 characters long!", player) end else outputChatBox("Vieja Contraseña Invalida/Old Password Invalid.", player) end end end addEvent("submitChangepw", true) addEventHandler("submitChangepw", root, passwordHandler) function ACLF() local accountName = getAccountName( getPlayerAccount ( source ) ) if isObjectInACLGroup ("user."..accountName, aclGetGroup ( "Admin" ) ) then -- something here, no?? end end addEvent("ACL", true) addEventHandler("ACL", root, ACLF) You have a lot of wrong things.
  6. Tá se axando só porque não entende nda .. Cara, larga de ser criança. Não quero perder meu tempo com brasileiro lixo.. Vem dando moral não. Se você acha que sabe assim tanto, prove. Para mim, você não passa de um brasileiro lixo que fica se achando bom. Aliás, quer uma lista de tópicos em que ajudei para você ver quantas pessoas já ajudei?
  7. Se você não sabe, melhor não dizer nada... Isso tá tudo errado. Correcto: -- nódulo principal, é necessário para o recurso funcionar 'Digite o nome do Autor aqui' name = 'Nome do script aqui' version = 'Digite a versão do recurso aqui' type = 'script / gamemode / map / misc' gamemodes = 'Se isto é um mapa, digite os gamemodes a que o mapa irá funcionar separado com uma virgula' description = 'Digite a descrição do recurso aqui' /> -- Note que você não precisa de digitar isso tudo. @@Laffu, Lua é Case-Sensitive. Você não pode digitar Function ou LOCAL. São palavras distintas. Aliás, o nódulo Author não existe, muito menos o sub-nódulo info. Espero que você tenha entendido.
  8. Claro, ele não ajuda na frente dos outros porque não entende porra nenhuma disso.. Já viu a porra que ele posta na área de Programação Inglesa? Scripts sem sentido nenhum e ainda vem querendo dar moral nos outros.
  9. Jaysds1, u're kidding us, no? Obviously, it's dx text. GUI Labels don't support these fonts.
  10. drk

    Sound problem.

    Server-side: function testsoundwegserver2 (player,station) local com = getPedOccupiedVehicle ( player ) outputChatBox ( "triggering sucsesNAARSERVERSIDE") triggerClientEvent ("testsoundremove", player, com, sirene) -- what is 'sirene' ? --it's trggering good, but only for the last player who attached. -- source didn't work to. end addEvent ("testsoundwegserver", true) addEventHandler ("testsoundwegserver", getRootElement(),testsoundwegserver2)
  11. drk

    stack overflow

    Where is variable 'alpha' defined? Where is the function? What is that? function dxDrawingColorText ( text,left,top,right,bottom,color,scale,font,alignX,alignY) end Nothing in function? Good luck.
  12. drk

    stack overflow

    Where is the function 'dxDrawingColorText' ?
  13. drk

    stack overflow

    function drawMyText ( text,left,top,right,bottom,color,scale,font,alignX,alignY) dxDrawingColorText ( text, left+scale, top , right+scale, bottom, tocolor(30,30,30,Alpha),scale,font,alignX,alignY) dxDrawingColorText ( text, left+scale, top+scale , right+scale, bottom+scale, tocolor(30,30,30,Alpha),scale,font,alignX,alignY) dxDrawingColorText ( text, left, top+scale , right, bottom+scale, tocolor(30,30,30,Alpha),scale,font,alignX,alignY) dxDrawingColorText ( text, left-scale, top+scale , right-scale, bottom+scale, tocolor(30,30,30,Alpha),scale,font,alignX,alignY) dxDrawingColorText ( text, left-scale, top , right-scale, bottom, tocolor(30,30,30,Alpha),scale,font,alignX,alignY) dxDrawingColorText ( text, left-scale, top-scale , right-scale, bottom-scale, tocolor(30,30,30,Alpha),scale,font,alignX,alignY) dxDrawingColorText ( text, left, top-scale , right, bottom-scale, tocolor(30,30,30,Alpha),scale,font,alignX,alignY) dxDrawingColorText ( text, left+scale, top-scale , right+scale, bottom-scale, tocolor(30,30,30,Alpha),scale,font,alignX,alignY) dxDrawingColorText ( text, left, top , right, bottom, color,scale,font,alignX,alignY) end ? You created a function "dxDrawingColorText" and call it inside the function a lot of times.
  14. drk

    Need Help

    And "client" element is nil.
  15. drk

    Problem Car Shops

    Your code is wrong Jaysds1. Some client-side things are wrong.
  16. drk

    xml and memo

    I need sleep dude
  17. drk

    xml and memo

    It's not wrong, but yours is wrong. I clicked on "Rules" button and it didn't load the text from the XML file. I know, I've seen fast and wrong.
  18. drk

    xml and memo

    nope it works i just forgot to add it into the meta.xml I've seen wrong then.
  19. drk

    Looking 4

    You want random spawns? If so, then: local tSpawns = { { -1234, -349, 29 }; { -2945, -296, 10 }; } addEventHandler ( 'onPlayerJoin', root, function ( ) local uRandom = tSpawns [ math.random ( #tSpawns ) ] local nX, nY, nZ = uRandom[1], uRandom[2], uRandom[3] spawnPlayer ( source, nX, nY, nZ ); end )
  20. drk

    xml and memo

    local rules = xmlLoadFile ( 'xml/rules.xml' ) window = guiCreateWindow(462,275,716,474,"",false) Rules = guiCreateButton(13,76,82,35,"Rules",false,window) memo = guiCreateMemo(117,29,582,386,"",false,window) addEventHandler ( 'onClientGUIClick', root, function ( ) if ( source == Rules ) then guiSetText ( memo, tostring ( xmlNodeGetValue ( rules ) ) ) end end )
  21. drk

    Problem Car Shops

    LOL No errors in these lines.
×
×
  • Create New...