Farhan Posted August 2, 2018 Share Posted August 2, 2018 Hi guys ! Please give me script for give package weapon and set armor 100% ! Weapon id : 30 - 29 - 32 for acl on group ! command : /package <playername> ---------------------------------------------------------------- chat box for admin: you given package to <playername> ---------------------------------------------------------------------- chat box for player: admin <admin name> given packge to you ! please fast answer me ! thanks ... Link to comment
Dimos7 Posted August 3, 2018 Share Posted August 3, 2018 We are not your selve also you didn't read the forum rules we are here to help you with your code not make it if you want a resource go to community site search it and simple download it Link to comment
Callum Posted August 3, 2018 Share Posted August 3, 2018 It may be worth checking the MTA Community site to see whether such resource already exists. As aforesaid, we are happy to point you in the right direction and fix any minor bugs, but we do not create scripts on demand. Link to comment
Gaborboy95 Posted August 7, 2018 Share Posted August 7, 2018 I should not make a script for you, but here it is --[[ Weapon id : 30 - 29 - 32 for acl on group ! command : /package <playername> ]]-- local aclname = "Admin" function isPlayerInACL(player, acl) local accountName = getAccountName( getPlayerAccount(player) ) if accountName ~= "guest" and type( aclGetGroup(acl) ) == "userdata" then return isObjectInACLGroup( "user."..accountName, aclGetGroup(acl) ) end return false end function getPlayerFromPartialName(name) local name = name and name:gsub("#%x%x%x%x%x%x", ""):lower() or nil if name then for _, player in ipairs(getElementsByType("player")) do local name_ = getPlayerName(player):gsub("#%x%x%x%x%x%x", ""):lower() if name_:find(name, 1, true) then return player end end end end function givePackage(thePlayer, cmd, ...) if isPlayerInACL(thePlayer, aclname) then local targetPlayer = table.concat({...}, " ") local weps = {30, 29, 32} --I dont really understand how you want this.. local target = getPlayerFromPartialName(targetPlayer) if target then for _, k in pairs(weps) do givePedWeapon(target, k) end setPedArmor(target, 100) outputChatBox("Successfully given a package to : ".. getPlayetName(target), thePlayer, 255, 255, 255, true) --Admin chat outputChatBox("You have been given a package by : ".. , getPlayerName(thePlayer), target, 255, 255, 255, true) --Player chat end end end addCommandHandler("package", givePackage, false, false) Not 100% sure if this works, found it in one of my old scripts Link to comment
Mσнαмα∂ Hєℓιѕн Posted August 15, 2018 Share Posted August 15, 2018 On 8/8/2018 at 00:58, Gaborboy95 said: I should not make a script for you, but here it is --[[ Weapon id : 30 - 29 - 32 for acl on group ! command : /package <playername> ]]-- local aclname = "Admin" function isPlayerInACL(player, acl) local accountName = getAccountName( getPlayerAccount(player) ) if accountName ~= "guest" and type( aclGetGroup(acl) ) == "userdata" then return isObjectInACLGroup( "user."..accountName, aclGetGroup(acl) ) end return false end function getPlayerFromPartialName(name) local name = name and name:gsub("#%x%x%x%x%x%x", ""):lower() or nil if name then for _, player in ipairs(getElementsByType("player")) do local name_ = getPlayerName(player):gsub("#%x%x%x%x%x%x", ""):lower() if name_:find(name, 1, true) then return player end end end end function givePackage(thePlayer, cmd, ...) if isPlayerInACL(thePlayer, aclname) then local targetPlayer = table.concat({...}, " ") local weps = {30, 29, 32} --I dont really understand how you want this.. local target = getPlayerFromPartialName(targetPlayer) if target then for _, k in pairs(weps) do givePedWeapon(target, k) end setPedArmor(target, 100) outputChatBox("Successfully given a package to : ".. getPlayetName(target), thePlayer, 255, 255, 255, true) --Admin chat outputChatBox("You have been given a package by : ".. , getPlayerName(thePlayer), target, 255, 255, 255, true) --Player chat end end end addCommandHandler("package", givePackage, false, false) Not 100% sure if this works, found it in one of my old scripts this code is very easy Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now