Jump to content

EstrategiaGTA

Members
  • Posts

    684
  • Joined

  • Last visited

Everything posted by EstrategiaGTA

  1. There are no dx functions in that code...
  2. My Notepad++ is set to Spanish, but there is an option in the menu saying Coding or something similar. There you can encode it as UTF8. Also update the race gamemode removing the deprecated functions and using the last ones.
  3. Encode them as UTF-8. You can do this with Notepad++ easily.
  4. Try with this... You did not pass the player to the server side and the localPlayer is only client side. --client outputChatBox("#52FF52Egyedi #ff0000élet#52ff52feltöltő panel: /elet !",0,255,255,true) local GUIEditor = { window = {}, button = {} } GUIEditor.window[1] = guiCreateWindow(502, 266, 514, 105, "Élet és életpajzs kérő panel | TELJESEN TURBESZ ÁLTAL", false) guiWindowSetSizable(GUIEditor.window[1], false) guiSetProperty(GUIEditor.window[1], "CaptionColour", "FFFF0000") GUIEditor.button[1] = guiCreateButton(10, 53, 234, 42, "ÉLET FELTÖLTÉSE MAXRA", false, GUIEditor.window[1]) guiSetProperty(GUIEditor.button[1], "NormalTextColour", "FFFF0000") GUIEditor.button[2] = guiCreateButton(267, 53, 237, 42, "ÉLETPAJZS FELTÖLTÉSE MAXRA", false, GUIEditor.window[1]) guiSetProperty(GUIEditor.button[2], "NormalTextColour", "FF0023FE") GUIEditor.button[3] = guiCreateButton(433, 20, 71, 27, "x", false, GUIEditor.window[1]) guiSetFont(GUIEditor.button[3], "sa-header") guiSetVisible(GUIEditor.window[1], false) function OpenWin() if guiGetVisible ( GUIEditor.window[1] ) == false then guiSetVisible ( GUIEditor.window[1], true ) showCursor(true) end end addCommandHandler ( "elet", OpenWin) function Bezaras() guiSetVisible(GUIEditor.window[1], false) showCursor ( false ) end addEventHandler ( "onClientGUIClick", GUIEditor.button[3], Bezaras) function health() triggerServerEvent ("hp", root, getLocalPlayer()) end addEventHandler ( "onClientGUIClick", GUIEditor.button[1], health, false ) function health() triggerServerEvent ("armor", root, getLocalPlayer()) end addEventHandler ( "onClientGUIClick", GUIEditor.button[2], health, false ) --server addEvent( "hp", true ) addEventHandler( "hp", root, function (thePlayer) setElementHealth( thePlayer, 100 ) end ) addEvent( "armor", true ) addEventHandler( "armor", root, function (thePlayer) setPedArmor ( thePlayer, 100 ); end )
  5. Where is the spawnPositions table? It doesn't exist in the code you gave, so that's why it won't work.
  6. outputChatBox("#52FF52Egyedi #ff0000élet#52ff52feltöltő panel: /elet !",0,255,255,true) local GUIEditor = { window = {}, button = {} } GUIEditor.window[1] = guiCreateWindow(502, 266, 514, 105, "Élet és életpajzs kérő panel | TELJESEN TURBESZ ÁLTAL", false) guiWindowSetSizable(GUIEditor.window[1], false) guiSetProperty(GUIEditor.window[1], "CaptionColour", "FFFF0000") GUIEditor.button[1] = guiCreateButton(10, 53, 234, 42, "ÉLET FELTÖLTÉSE MAXRA", false, GUIEditor.window[1]) guiSetProperty(GUIEditor.button[1], "NormalTextColour", "FFFF0000") GUIEditor.button[2] = guiCreateButton(267, 53, 237, 42, "ÉLETPAJZS FELTÖLTÉSE MAXRA", false, GUIEditor.window[1]) guiSetProperty(GUIEditor.button[2], "NormalTextColour", "FF0023FE") GUIEditor.button[3] = guiCreateButton(433, 20, 71, 27, "x", false, GUIEditor.window[1]) guiSetFont(GUIEditor.button[3], "sa-header") guiSetVisible(GUIEditor.window[1], false) function OpenWin() if guiGetVisible ( GUIEditor.window[1] ) == false then guiSetVisible ( GUIEditor.window[1], true ) showCursor(true) end end bindKey ( "F2", "down", OpenWin)
  7. He just started playing MTA:SA two days ago, do you seriously think he's a server owner? Randy, you mean you want to open the Freeroam F1 panel with other key. Well, the freeroam panel can be opened too with the command "/fr", so do this: -Open the console (press F8). -Type "bind [key] fr" and press enter. The key can be for example F3, now when you press F3 you'll open it without having to press the default F1 key. I hope I helped you
  8. Debugscript 3? Is that the full code? If that's the full code, you create the GUI whenever the resource starts for the client... So it'll always open without even having to press "F2".
  9. Mira aquí: https://forum.multitheftauto.com/viewtopic.php?f ... 9&p=645404
  10. addEventHandler("onClientPlayerWeaponSwitch", root, function(antiguoSlot,nuevoSlot) local nueva_arma = getPedWeapon(getLocalPlayer(), nuevoSlot) if getPedTotalAmmo (getLocalPlayer(), nueva_arma) ~= 1 then toggleControl ("fire", true) else toggleControl ("fire", false) end end ) El código debería funcionar... Pruébalo.
  11. addEventHandler("onClientPlayerWeaponSwitch", root, function(antiguoSlot,nuevoSlot) local nueva_arma = getPedWeapon(getLocalPlayer(), nuevoSlot) if getPedTotalAmmo (getLocalPlayer(), nueva_arma) ~= 1 then toggleControl ("fire", true) else --aquí ya pon tú si quieres que cambie el arma, si no lo quieres (cancela el evento). Acuérdate de ponerle el control "fire" en false si al final te decantas porque sí pueda cambiar a ese arma. end end ) Disculpa si pueda ir algo mal, es que estoy en el móvil...
  12. Not stealing client side scripts.
  13. Use this. function payScript(player,cmd,other,amount) local money = getPlayerMoney(player) local otherPlayer = getPlayerFromName(other) if not other then outputChatBox("Syntax: /pay (playerName) (amount)",player,0,255,255) else if not amount then outputChatBox("Syntax: /pay (playerName) (amount)",player,0,255,255) else if ((money - amount) < 0) then outputChatBox("You do not have enough money!",player,0,255,255) return else setPlayerMoney(otherPlayer,getPlayerMoney(otherPlayer) + amount) setPlayerMoney(player,money - amount) outputChatBox("$"..amount.." has been sent to "..other.."!",player,0,255,255) outputChatBox("You have received $"..amount.." from "..getPlayerName(player).."!",otherPlayer,0,255,255) end end end end addCommandHandler("pay",payScript)
  14. Toy around with different times and stay with the one you think it fits the most.
  15. Are you sure you are logged in and that the login panel logs you in correctly? I found no logIn function there. I am with my mobile so I cannot check it much. I think you either are: *Not logged in. *Or you do not have any last position... Somehow.
  16. I do not speak Portuguese but I just wanted to help this guy. Roots, in order to make the command able to be used with caps lock it'd be better to use the fourth argument addCommandHandler (case Sensitive). And finally, what's the problem with my nick? Is it hard to write? (I will try to speak in Portuguese forgive me for my mistakes in grammar) Não falo português pero tam só quería ajudar a esse usuario Roots, para poder digitar o comando co CapsLock é melhor ativar o 4o argumento do addCommandHandler, caseSensitive. E cal é o problema co meu nick? É dificil de escrever?
  17. We can't help you unless you post the full code. There's an error with the player position, which will then also give you errors with the colShape, attachElements, and so on.
  18. function kitarma(source) local conta = getAccountName (getPlayerAccount(source)) if isObjectInACLGroup ("user."..conta, aclGetGroup("GRUPO")) then outputChatBox("#00ff00Você pegou seu kit de armas!", source, 255, 255, 255, true) outputChatBox("#ffffff[#00f5ffKit Armas#ffffff]:#c4c4c4 O jogador #00ff00 "..getPlayerName(source).." #c4c4c4 pegou seu kit jogador#ffffff[#00ff00/kitjogador#ffffff] ", getRootElement(source), 255, 255, 255, true) giveWeapon(source, 24, 500) giveWeapon(source, 25, 200) giveWeapon(source, 29, 500) giveWeapon(source, 41, 500) takePlayerMoney(source, 0) end end addCommandHandler("kitjogador", kitarma) function health(source) local conta = getAccountName (getPlayerAccount(source)) if isObjectInACLGroup ("user."..conta, aclGetGroup("GRUPO")) then setElementHealth(source, 100) end end addCommandHandler("kitjogador", health) function armor(source) local conta = getAccountName (getPlayerAccount(source)) if isObjectInACLGroup ("user."..conta, aclGetGroup("GRUPO")) then setPedArmor(source, 100) end end addCommandHandler("kitjogador", armor) "GRUPO": escrever o grupo da ACL ("Admin", "Everyone"...)
  19. getWeaponIDFromName En ningún momento da el nombre del arma, sino el ID ya directamente en el editbox. Anzo, la función giveWeapon ya lee directamente el ID como el arma que tú quieres, solo haz un triggerServerEvent y pasa el ID al server-side.
  20. Slash14, veo que utilizas elementData para los jugadores dentro de la greenzone, así que podrías hacer algo así: addEventHandler ("onClientPlayerDamage", getLocalPlayer(), function (atac) if getElementType (atac) == "player" and getElementData(atac, "greenzone") == true then cancelEvent ( ) end end ) Ponlo como client-side, debería funcionar. Pero si ya está usando ColShapes, acaba de postear un código con onColShapeHit...
  21. Hello ccw, I tried again a gta_sa.exe 1.0 patch and now it worked, MTA opened. I still wonder why it didn't work with the gta-sa.exe my Steam version has when it's been working for ages, untill now.
  22. Edit the useful function getOnlineAdmins, like this: function getOnlineVIPs() local t = {} for k,v in ipairs ( getElementsByType("player") ) do local acc = getPlayerAccount(v) if acc and not isGuestAccount(acc) then local accName = getAccountName(acc) local isVIP = isObjectInACLGroup("user."..accName,aclGetGroup("VIP")) if isVIP then table.insert(t,v) end end end return t end
  23. Thank you , i didn't knew it was that resource there You're welcome
×
×
  • Create New...