Jump to content

Mr.Aleks

Members
  • Posts

    178
  • Joined

  • Last visited

Everything posted by Mr.Aleks

  1. You forgot to close the line with ')'
  2. Mr.Aleks

    Command

    function gangsyntax (player, cmd, syntax, name) if syntax == "crear" then local name = tostring(name) if name then -- Ejecutas lo que tengas que hacer si introduce el name else outputChatBox ( "[GANG] #FF8000Use: /gang crear ",player, 255, 100, 100, true ) end else -- Ejecutas lo que haga si solo introduce /gang sin ningún syntax o introduce /gang con un syntax diferente a "crear" end end addCommandHandler("gang", gangsyntax)
  3. Check if the element ( player ) is correctly defined. I can't help you only with that line.
  4. Can you explain better what you wanna do? If what you want is to change the weather, use setWeather
  5. Si los jugadores solo podrán ver a sus compañeros de clan tienes que indicar de qué clan son, podes hacerlo de diferentes maneras, pero tienes que indicarlo.
  6. Just look for the script and change the position ._.
  7. Usa GetPlayerTeam y compáralo con el team que desees usar para ver el blip.
  8. month = { [1] = "January", [2] = "February", [3] = "March", [4] = "April", [5] = "May", [6] = "June", [7] = "July", [8] = "August", [9] = "September", [10] = "October", [11] = "November", [12] = "December" } local month = time.month[month]
  9. If test is a string, try using testTable[test]
  10. Do you want to get "test" from the table and then use it inside the outputChatBox? I don't understand what you wanna get
  11. Conociendo la gran mayoría de servidores en MTA:RP hispanos, os deseo suerte. Capaz me pase a saludar a algunas amistades
  12. Podrías explicarte mejor, no entiendo lo que quieres hacer.
  13. Prueba a hacerlo así: if getElementModel (localPlayer) == 202 then
  14. If we give you it all done you'll never learn anything.
  15. ¿Te refieres a que no te lee el archivo? ¿Configuraste bien el meta.xml?
  16. Where is player defined at line 13?
  17. Where is player defined?
  18. Explícanos un poco sobre si tu servidor usa host, es local, características...
  19. ¿Probaste si te pasa igual en otros servidores?
  20. You haven't posted anything about the chats... that's only about the godmode. If you need help with chats, post the code.
  21. local groups = { "Owner", "Co-Owner", "Admin" , "SuperModerator" , "Moderator" } function toggleGodMode(thePlayer) local account = getPlayerAccount(thePlayer) if account then if not isGuestAccount(account) then local accountName = getAccountName(account) for i, v in pairs ( groups ) do if isObjectInACLGroup ( "user.".. accountName, aclGetGroup ( v ) ) then if getElementData(thePlayer, "godmode") == true then setElementData(thePlayer, "godmode", false) setElementData(thePlayer, "blood", 12000) outputChatBox("God Mode is now Disabled.",thePlayer,0,255,0) setAccountData(account, "godmode", false) elseif getElementData(thePlayer, "godmode") == false then setElementData(thePlayer, "godmode", true) setElementData(thePlayer, "blood", 99999999) setAccountData(account, "godmode", true) outputChatBox("God Mode is now Enabled.",thePlayer,0,255,0) end end end end end end addCommandHandler("godmode",toggleGodMode) addEventHandler("onPlayerLogin", root, function ( _,account ) local account = getPlayerAccount(source) if account then if not isGuestAccount(account) then local godstate = getAccountData(account, "godmode") if godstate == true then setElementData(source, "blood", 99999999) setElementData(source, "godmode", true) outputChatBox("You had been disconnected with your godmode enabled.",source,0,255,0) else setElementData(source, "godmode", false) end end end end)
  22. server local groups = { "Owner", "Co-Owner", "Admin" , "SuperModerator" , "Moderator" } function toggleGodMode(thePlayer) local account = getPlayerAccount(thePlayer) if account then if not isGuestAccount(account) then local accountName = getAccountName(account) for i, v in pairs ( groups ) do if isObjectInACLGroup ( "user.".. accountName, aclGetGroup ( v ) ) then if getElementData(thePlayer, "godmode") == true then setElementData(thePlayer, "godmode", false) outputChatBox("God Mode is now Disabled.",thePlayer,0,255,0) setAccountData(account, "godmode", false) elseif getElementData(thePlayer, "godmode") == false then setElementData(thePlayer, "godmode", true) setElementData(thePlayer, "blood", 99999999) setAccountData(account, "godmode", true) outputChatBox("God Mode is now Enabled.",thePlayer,0,255,0) end end end end end end addCommandHandler("godmode",toggleGodMode) addEventHandler("onPlayerLogin", root, function ( _,account ) local account = getPlayerAccount(source) if account then if not isGuestAccount(account) then local godstate = getAccountData(account, "godmode") if godstate == true then setElementData(source, "blood", 99999999) setElementData(source, "godmode", true) outputChatBox("You had been disconnected with your godmode enabled.",source,0,255,0) else setElementData(source, "godmode", false) end end end end) client addEventHandler ( "onClientPlayerDamage",root, function () if getElementData(source,"godmode") == true then cancelEvent() end end) addEventHandler("onClientPlayerStealthKill",localPlayer, function (targetPlayer) if getElementData(targetPlayer,"godmode") == true then cancelEvent() end end)
×
×
  • Create New...