Jump to content

[Help]Autoteaming


Recommended Posts

Posted
o cmon let me make that snake!:D

Make it if u got problems call me xD

o.. okay ill just try it,

watch the biggest fail, never worked with acl's before xD

ill just take your script and add some lines :)

  • Replies 75
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Posted
o cmon let me make that snake!:D

Make it if u got problems call me xD

o.. okay ill just try it,

watch the biggest fail, never worked with acl's before xD

ill just take your script and add some lines :)

He asked for give weapons if im right then add lines "giveWeapon(source,weaponid,ammo)"

Posted

i already did add them :P

function isZarAccount(account)
 local nick = ""
 local group = aclGetGroup("[Z.A.R.S]")
 if (account and group) then
   nick = string.lower(getAccountName(account) or "")
   for _, object in ipairs(aclGroupListObjects(group) or {}) do
     if (gettok(object, 1, string.byte('.')) == "user") then
       if (nick == string.lower(gettok(object, 2, string.byte('.')))) then
         return true
	  giveWeapon (source, 3, 1)
	  giveWeapon (source, 24, 500)
	  giveWeapon (source, 29, 500)
	  giveWeapon (source, 31, 500)
	  giveWeapon (source, 17, 500)
       end
     end
   end
 end
 return false
end

i added:

- nightstick

- desert eagle

- mp5

- m4

- tear gass

Posted

replace it with the other one.

lol

its made by snake,

but i just edited it alitle so you get weps, :)

99% credits to him for making the script

1% to me for adding the weps

Posted
i already did add them :P

function isZarAccount(account)
 local nick = ""
 local group = aclGetGroup("[Z.A.R.S]")
 if (account and group) then
   nick = string.lower(getAccountName(account) or "")
   for _, object in ipairs(aclGroupListObjects(group) or {}) do
     if (gettok(object, 1, string.byte('.')) == "user") then
       if (nick == string.lower(gettok(object, 2, string.byte('.')))) then
         return true
	  giveWeapon (source, 3, 1)
	  giveWeapon (source, 24, 500)
	  giveWeapon (source, 29, 500)
	  giveWeapon (source, 31, 500)
	  giveWeapon (source, 17, 500)
       end
     end
   end
 end
 return false
end

i added:

- nightstick

- desert eagle

- mp5

- m4

- tear gass

I dont think this will work :P, maybe u should try like this,

local root = getRootElement()
 
addEventHandler("onResourceStart", root,
function()
team = createTeam ("Z.A.R.S.", 0, 0, 255)
end
)
 
function login()
local taccount = getPlayerAccount ( source )
if isZarAccount(taccount) then
setPlayerTeam ( source, team)
outputChatBox ("Welcome to Zombie Apocalypse Rescue Squad HQ", source)
spawnPlayer (source, -2246.7751464844, 2283.3193359375, 5, 90, math.random(0,264), team )
giveWeapon (source, 3, 1)
giveWeapon (source, 24, 500)
giveWeapon (source, 29, 500)
giveWeapon (source, 31, 500)
giveWeapon (source, 17, 500)
fadeCamera (source, true)
setCameraTarget (source, true)
else
end
end
addEventHandler("onPlayerLogin", root,login)
 
function isZarAccount(account)
local nick = ""
local group = aclGetGroup("[Z.A.R.S]")
if (account and group) then
   nick = string.lower(getAccountName(account) or "")
for _, object in ipairs(aclGroupListObjects(group) or {}) do
if (gettok(object, 1, string.byte('.')) == "user") then
if (nick == string.lower(gettok(object, 2, string.byte('.')))) then
return true
end
end
end
end
return false
end

Posted

allright so the code would look like this or ?

local root = getRootElement()
 
addEventHandler("onResourceStart", root,
function()
team = createTeam ("Z.A.R.S", 0, 0, 255)
end
)
 
function login()
local taccount = getPlayerAccount ( source )
 if isZarAccount(taccount) then
  setPlayerTeam ( source, team)
  outputChatBox ("Welcome to Zombie Apocalypse Rescue Squad HQ", source)
  spawnPlayer (source, -2246.7751464844, 2283.3193359375, 5, 90, 281, team )
  fadeCamera (source, true)
  setCameraTarget (source, true)
  else
  end
end
addEventHandler("onPlayerLogin", root,login)
 
function isZarAccount(account)
 local nick = ""
 local group = aclGetGroup("[Z.A.R.S]")
 if (account and group) then
   nick = string.lower(getAccountName(account) or "")
   for _, object in ipairs(aclGroupListObjects(group) or {}) do
     if (gettok(object, 1, string.byte('.')) == "user") then
       if (nick == string.lower(gettok(object, 2, string.byte('.')))) then
         return true
       giveWeapon (source, 3, 1)
       giveWeapon (source, 24, 500)
       giveWeapon (source, 29, 500)
       giveWeapon (source, 31, 500)
       giveWeapon (source, 17, 500)
       end
     end
   end
 end
 return false
end

Posted
solid? want to help me rewriting a fuel system?xD

if i get stuck.

50p helps me too, (some times :))

Sure dude, this is a help forum. :D btw u have a msn or somthing? to dont post like 100 post :P

Posted
BTW guys :D

how can i do so if an zars member is killed he will be respawned at hes base again ?

local root = getRootElement()
 
addEventHandler("onResourceStart", root,
function()
team = createTeam ("Z.A.R.S.", 0, 0, 255)
end
)
 
function login()
local taccount = getPlayerAccount ( source )
if isZarAccount(taccount) then
setPlayerTeam ( source, team)
outputChatBox ("Welcome to Zombie Apocalypse Rescue Squad HQ", source)
spawnPlayer (source, -2246.7751464844, 2283.3193359375, 5, 90, math.random(0,264), team )
giveWeapon (source, 3, 1)
giveWeapon (source, 24, 500)
giveWeapon (source, 29, 500)
giveWeapon (source, 31, 500)
giveWeapon (source, 17, 500)
fadeCamera (source, true)
setCameraTarget (source, true)
else
end
end
addEventHandler("onPlayerLogin", root,login)
 
function isZarAccount(account)
local nick = ""
local group = aclGetGroup("[Z.A.R.S]")
if (account and group) then
   nick = string.lower(getAccountName(account) or "")
for _, object in ipairs(aclGroupListObjects(group) or {}) do
if (gettok(object, 1, string.byte('.')) == "user") then
if (nick == string.lower(gettok(object, 2, string.byte('.')))) then
return true
end
end
end
end
return false
end
 
function spawn(source)
spawnPlayer (source, -2246.7751464844, 2283.3193359375, 5, 90, math.random(0,264), team )
giveWeapon (source, 3, 1)
giveWeapon (source, 24, 500)
giveWeapon (source, 29, 500)
giveWeapon (source, 31, 500)
giveWeapon (source, 17, 500)
fadeCamera (source, true)
setCameraTarget (source, true)
end
 
addEventHandler("onPlayerWasted", root,
function()
local taccount = getPlayerAccount ( source )
if isZarAccount(taccount) then
setTimer(spawn, 1800, 1, source)
end
end
)

this should work, at least works for me :D

  • 3 months later...
Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.

×
×
  • Create New...