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)"

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted

my script or xD ?

i still need those guns that all im asking :D

and an ingame acl editor lol xD

My friends and my girlfriend come before anything else ! :)

Zombie nombie apocalypse <3

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

lawl thanks :D

should i make an new script for this or add it into the same script ?

My friends and my girlfriend come before anything else ! :)

Zombie nombie apocalypse <3

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

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

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

My friends and my girlfriend come before anything else ! :)

Zombie nombie apocalypse <3

Posted

YAY :D

it worked guys :)

my script is finally done :P

for making more teams ill just have to dublicate the script ill guess :D ?

My friends and my girlfriend come before anything else ! :)

Zombie nombie apocalypse <3

Posted

ima thank you both :P

well ima make a new thread about gatesystem xD

My friends and my girlfriend come before anything else ! :)

Zombie nombie apocalypse <3

Posted
ima thank you both :P

well ima make a new thread about gatesystem xD

lol okay, im off soon anyway :P

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

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

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted

BTW guys :D

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

My friends and my girlfriend come before anything else ! :)

Zombie nombie apocalypse <3

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

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

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

    • No registered users viewing this page.

×
×
  • Create New...