Jump to content

Adde

Members
  • Posts

    228
  • Joined

  • Last visited

Everything posted by Adde

  1. Yes I have tried that before, but the problem is if I´m saved in an other team when i logout and then login I spawn in army. It should not be like that. I s
  2. No don´t work. It´s nothing wrong with source and player. It´s the script, i need help with how to set the team to offline when player is not logged in and then if the player register it sets to another. But it should not make it change the saved teams for players that´s already registered.
  3. Hello, I tried to make a function that sets the players team to "offline" when it´s guestaccount, but the problem is that those who register spawn under the ground and nothing happends, they should spawn in army, on a special position, with money, etc on register. I know that this is totaly wrong and I understand why. So how can I do to make it work? function onPlayerSpawn (player) sourceAccount = getPlayerAccount ( source ) if isGuestAccount ( sourceAccount ) then setPlayerTeam (source, offline) else setPlayerTeam ( source, Army ) setElementPosition ( source, 238.4085, 1909.1389, 17.84 ) givePlayerMoney ( source, 2000 ) setElementModel( source, 179 ) setPlayerNametagColor ( source, 59, 166, 109 ) end end addEventHandler ( "onPlayerJoin", getRootElement(), onPlayerSpawn )
  4. Adde

    Very simple!?

    I understood that when the last one worked. ah okay. thx anyway.
  5. Adde

    Very simple!?

    So it should work if I write more than 1 word? But I may found the trouble, I had it like this: SALA Crew = createTeam ( "SALA Crew", 255, 128, 0 ) and used it to other things. But if I do like this: SALACrew = createTeam ( "SALA Crew", 255, 128, 0 ) it should work right?
  6. Adde

    Very simple!?

    Hi How to make a team with 2 words? Don´t work with example "The Best". Is there a command to do between words? Can´t find it if there is. createTeam("The Best", 100, 100, 100)
  7. Ah okay, now I know that. thx But I got a bug in it, I get kicked if I kill myself Is that easy to fix?
  8. That little change didn´t work I mean like, if I kill another player I will get kicked and a message will be output for other players in chatbox with my playername and then "have been kicked for DM".
  9. Hello I have tried to create a function that kicks the player who kills another player (no dm) and then output a message in chatbox. I have tried to figure out how to make it work. I read on wiki, looked at other scripts and searched on forum. The thing is that I don´t really know how to do so it get the killer, or if I´m close being right I´m stuck and I have added and removed things all the time. This is what I have atm: Function KickDM(killer) if ( attacker ) then if ( getElementType ( attacker ) == "player" ) then kickPlayer(attacker,"You have been kicked for killing another player") outputChatBox(getPlayerName(attacker).."have been kicked for DM!", getRootElement, 250, 60, 60, true) end end addEventHandler("onPlayerWasted",getRootElement,kickDM) I don´t have any ideas left -.- I would be glad for help
  10. nope, It says the gamemode is MTA:SA
  11. Hello I don´t know why it´s like this but before I could see my gamemode for my server in server browser but now I can´t. Someone that know what I may can have done wrong or what problem is?
  12. Na didn´t work, still stuck on spawn. But "7.18+5" made stuck in air
  13. I have added setElementPosition now but player get stuck. Have to reconnect to die and then respawn function onPlayerSpawn (player) setPlayerTeam ( source, Military ) setElementPosition ( source, -1467.9906, 425.6120, 7.18 ) givePlayerMoney ( source, 2000 ) setPedArmor ( source, 60 ) setElementModel( source, 287 ) setPlayerNametagColor ( source, 0, 204, 0 ) end addEventHandler ( "onPlayerJoin", getRootElement(), onPlayerSpawn )
  14. Yes, it worked when I tried on myself, so it should work correct now. thx
  15. I have a script that works fine but have one small problem. If a player is set as "player" in scoreboard and then is being moved to acl group moderator, it doesn´t change to "Mod". Same problem however i try to change. I got help with an other problem with this script before when I made it, so I´m sry if I shouldn´t have created a new topic for this. And yes, I have edited "zombie_ranks" a bit to create this kind of script. This is the script: exports.scoreboard:addScoreboardColumn('SALA') function thesala() local accName1 = getAccountName(account) local account = getPlayerAccount(source) if isObjectInACLGroup ("user."..accName1, aclGetGroup ( "Owner" ) ) then setAccountData ( account, "SALA", "Owner" ) elseif isObjectInACLGroup ("user."..accName1, aclGetGroup ( "Admin" ) ) then setAccountData ( account, "SALA", "Admin" ) elseif isObjectInACLGroup ("user."..accName1, aclGetGroup ( "SuperModerator" ) ) then setAccountData ( account, "SALA", "Super Mod." ) elseif isObjectInACLGroup ("user."..accName1, aclGetGroup ( "Moderator" ) ) then setAccountData ( account, "SALA", "Mod." ) elseif isObjectInACLGroup ("user."..accName1, aclGetGroup ( "Trial Moderator" ) ) then setAccountData ( account, "SALA", "Trial Mod." ) elseif isObjectInACLGroup ("user."..accName1, aclGetGroup ( "Everyone" ) ) then setAccountData ( account, "SALA", "Player" ) end end addEventHandler("onPlayerLogin", getRootElement(), thesala) function something() local Guest = getPlayerAccount(source) if isGuestAccount(Guest) then return end local sala = getAccountData(Guest,"SALA") if sala then setElementData(source,"SALA", sala) end end addEventHandler("onPlayerLogin",root,something)
  16. Hello, anyone that knows the problem if every player that register on my server spawns under the ground? Example: I set spawnpoint x, y, 11.563 on Navy ship in SF and they spawn in the water. Even if I set koordinate z from 11 to 20-30 or change position somewhere else on the map
  17. Adde

    Stuff team

    server.lua BaWstaff = createTeam ( "BaWstaff", 100, 100, 100 ) function enterTEAM (player ) local accName1 = getAccountName ( getPlayerAccount ( player ) ) if isObjectInACLGroup ("user."..accName1, aclGetGroup ( "Admin" ) ) or hasObjectPermissionTo( player, 'function.kickPlayer', false ) then setPlayerTeam ( player, BaWstaff) setElementModel( player, "217" ) setPlayerNametagColor ( player, 100, 100, 100 ) end addCommandHandler("joinstaff",enterTEAM) meta.xml "Me" version="1.0" type="script"/> This will create a team with name BaWstaff. Only Admins, Supermoderators, moderators will be able to enter the team (those who can kick players). The command to join team is /joinstaff
  18. What does it say in debug?
  19. Client side function yourRights() outputChatBox("text", 220, 0, 50) end addCommandHandler("mir", outputChatBox) and as he said, you can only have 128 characters.
  20. ah I see. Now it works thx! But not on Players, just those in acl groups. btw, can remove zombiekillsrow. It´s for nothing.
  21. I´ve got "local playerTeam = getPlayerTeam ( source )". This function gets the current team a player is on. Then "if playerTeam(SWAT) then *what to do* ". I looked through this https://community.multitheftauto.com/index.php?p=resources&s=details&id=5236 and thought that I could make it show the name of the acl group youré in or "player" if the player is not in any acl group. It was a test for myself but when the problems came I decided to talk about it here on forum.
  22. You mean like "it´s totaly wrong and not executing it" or like "I should add something. Or something else? Fuck, I forgot one thing -.- the 6th line...
×
×
  • Create New...