NotAvailable
Members-
Posts
595 -
Joined
-
Last visited
Everything posted by NotAvailable
-
I do NOT understand this i have readed this like 10 times... and it confuses me
-
Patience, Dont do anything stupid.
-
This is like Broph.lua but then little bit more edited
-
..... LoL!
-
I cannot fully understand you?
-
Maybe wrong sided Slient side. Server side
-
read again what he asked please, you are giving a resource that detects acl groups not save his team into his account. Hey i searched 10 secnds for it thats very long man!
-
here is 1: https://community.multitheftauto.com/index.php?p= ... ils&id=612
-
Yh i know, But thats team friendly fire
-
hmm... just a Copyright Have fun with the resource ^^
-
I know. I searched for many hours on this forum or a friendly fire script... I found nothing. So i made 1
-
Hi, I made a new resource called: "Anti-FriendlyFire" Information: Its a anti DM script, If a player tries to kill you, You wont lose any health. Suitable for: [slothman's Zombie Resource] [RolePlay] Etc, DOWNLOAD: https://community.multitheftauto.com/index.php?p= ... ils&id=986 Regards, Jesseunit
-
HAHA! everybody is wrong. He means the object: VGNcarshade1 LoL!
-
Aaight
-
ok... But cant i do like: onClientPedWeaponFire playSound("colt45.mp3",true)
-
Hi, Im trying to replace the " Colt 45's " Gun sound, But i dont know how. Can someone help me with this? Regards, Jesseunit
-
When the zombies are Spawning Random
-
Yes i know its the same here LAGG LAAG AND LAAGG
-
[HELP] Trying to make Friendly Fire script
NotAvailable replied to NotAvailable's topic in Scripting
ok -
Yo maurize do something like: giveWeapon (source, 22, 40)
-
[HELP] Trying to make Friendly Fire script
NotAvailable replied to NotAvailable's topic in Scripting
hey i made a bulletproof script.. But i only want that 1 car has it Ex. a "Enforcer" here is my script: function enterPlane(theVehicle, seat, jacked) if (getVehicleType(theVehicle) == Helicopter) then setVehicleDoorsUndamageable(theVehicle, true) setVehicleDamageProof(theVehicle, true) outputChatBox("* WARNING: You have entered a VIP / Admin Vehicle EXIT now or you get Kicked / Banned!", source) end end addEventHandler("onPlayerVehicleEnter", getRootElement(), enterPlane) -
[HELP] Trying to make Friendly Fire script
NotAvailable replied to NotAvailable's topic in Scripting
K thankyou -
Hi, Im trying to make a Friendly Fire script So players cannot shoot on they're teammates But i dont know how? Can someone give me a LITTLE start So i can finish it myself so i can learn about it. Regards, Jesseunit
-
Hi, i got an Auto Teamscript And i got 2 teams: VIP & Players But only the VIP people get in the VIP team.. The normal players stay in no teams here is the CONFIG.xml <team name="Players" color="#FFFFFF" tag="[Crew]" aclGroup="Everyone" /> <team name="Admin(s)" color="#FF0000" tag="[Crew]" aclGroup="Admin" /> Here is the lua file: ------------ -- Events -- ------------ function playerJoined() check(source) end addEventHandler("onPlayerJoin",getRootElement(),playerJoined) function playerChangedNick(oldNick,newNick) -- Use timer to wait until the nick really has changed setTimer(check,1000,1,source) end addEventHandler("onPlayerChangeNick",getRootElement(),playerChangedNick) function playerQuit() removePlayerFromTeam(source) end addEventHandler("onPlayerQuit",getRootElement(),playerQuit) -- Check for ACL Groups on login/logout function loggedIn() check(source) end addEventHandler("onPlayerLogin",getRootElement(),loggedIn) function loggedOut() check(source) end addEventHandler("onPlayerLogout",getRootElement(),loggedOut) -- Holds the teams as defined in the settings local teams = {} --- -- Reads the settings and creates the teams if enabled. -- function initiate() local rootNode = getResourceConfig("config.xml") local children = xmlNodeGetChildren(rootNode) if children == false then return end for _,node in pairs(children) do local attributes = xmlNodeGetAttributes(node) local name = attributes.name local color = {getColorFromString(attributes.color)} if not color[1] then color = {255,255,255} end teams[name] = attributes teams[name].color = color if not toboolean(get("noEmptyTeams")) then teams[name].team = createTeam(name,unpack(color)) end end for k,v in pairs(getElementsByType("player")) do check(v) end end addEventHandler("onResourceStart",getResourceRootElement(),initiate) --------------- -- Functions -- --------------- --- -- Checks the player's nick and ACL Groups and sets his team if necessary. -- -- @param player player: The player element -- function check(player) if not isElement(player) or getElementType(player) ~= "player" then debug("No player") return end local nick = getPlayerName(player) local accountName = getAccountName(getPlayerAccount(player)) for name,data in pairs(teams) do local tagMatch = false local aclGroupMatch = false if data.tag ~= nil and string.find(nick,data.tag,1,true) then tagMatch = true end if data.aclGroup ~= nil and accountName and isObjectInACLGroup("user."..accountName,aclGetGroup(data.aclGroup)) then aclGroupMatch = true end if data.required == "both" then if tagMatch and aclGroupMatch then addPlayerToTeam(player,name) return end else if tagMatch or aclGroupMatch then addPlayerToTeam(player,name) return end end end removePlayerFromTeam(player) setPlayerTeam(player,nil) end --- -- Adds a player to the team appropriate for the name. -- It is not checked if the team is really defined in the table, since -- it should only be called if it is. -- -- Creates the team if it doesn't exist. -- -- @param player player: The player element -- @param string name: The name of the team -- function addPlayerToTeam(player,name) local team = teams[name].team if not isElement(team) or getElementType(team) ~= "team" then team = createTeam(teams[name].name,unpack(teams[name].color)) teams[name].team = team end setPlayerTeam(player,team) debug("Added player '"..getPlayerName(player).."' to team '"..name.."'") end --- -- Removes a player from a team. Also checks if any team -- needs to be removed. -- -- @param player player: The player element -- function removePlayerFromTeam(player) setPlayerTeam(player,nil) debug("Removed player '"..getPlayerName(player).."' from team") if toboolean(get("noEmptyTeams")) then for k,v in pairs(teams) do local team = v.team if isElement(team) and getElementType(team) == "team" then if countPlayersInTeam(team) == 0 then destroyElement(team) end end end end end --- -- Converts a string-boolean into a boolean. -- -- @param string string: The string (e.g. "false") -- @return true/false Returns false if the string is "false" or evaluates to false (nil/false), true otherwise -- function toboolean(string) if string == "false" or not string then return false end return true end ----------- -- Debug -- ----------- -- Little debug function to turn on/off debug setElementData(getResourceRootElement(),"debug",true) function debug(string) if getElementData(getResourceRootElement(),"debug") then outputDebugString("autoteams: "..string) end end Regards, Jesseunit
