[A2]Clan
x
We need to recruit a host of direct program cs2d and we will create a live broadcast on cs2d. Who can do it please tell me or you can post topic...
Austin is Smod Now
Quincy~ and Worapat is trainee now ..

Latest topics

Clan Closing AnnoucementPartir[VN]
Tue Nov 28, 2017 8:06 pm

Need some help...rockmanvnx6
Sun Sep 06, 2015 6:59 pm

Lolicon Videos 3gp Movil GratisGuest
Sat Sep 05, 2015 8:10 pm

An Important announcementForce[VN]
Thu Jun 18, 2015 8:53 am

We'll really leave A2 Clan like this?Guest
Thu Mar 05, 2015 6:29 pm

Some of my Signature that I createdKakarat
Fri Oct 10, 2014 10:55 pm

Bad newsForce[VN]
Sat Sep 27, 2014 5:21 pm

[A2]Public will be hosted by mehSharul321
Tue Aug 05, 2014 8:50 pm

[A2] TibiaGuest
Thu Jul 24, 2014 10:12 pm

Register as Trainee |CTF| Camper ng Pinas
Thu Jul 17, 2014 4:22 pm

[Villager]House Event.Guest
Wed Jul 16, 2014 9:39 pm

[A2]CityLife Sometimes Offline?Guest
Wed Jul 16, 2014 9:36 pm

Register as Trainee Guest
Wed Jul 16, 2014 9:35 pm

[SaZ] Vs [A2] --Hostility WarGuest
Fri Jul 11, 2014 2:15 pm

Report someone in admin group abuse powerGuest
Fri Jul 11, 2014 2:02 pm

Apply For Trainee/HelperDARKPULSE73
Thu Jul 10, 2014 5:58 am

Free Request Signature Here !MuhdAqil
Sun Jul 06, 2014 4:01 pm

Make APplyMuhdAqil
Sat Jul 05, 2014 2:15 pm

Who's still online?|CTF| Camper ng Pinas
Wed Jul 02, 2014 6:59 pm

New Citylife addons|CTF| Camper ng Pinas
Tue Jun 24, 2014 5:46 pm

[ISF]XPr0JrX(Vice) Apply Admin/Moderatorrockmanvnx6
Sat Jun 21, 2014 11:04 pm

Plooker's Application For [Membre]Guest
Sun Jun 15, 2014 6:26 pm

decrease job on [A2] citylifeBatman Toy
Sat Jun 14, 2014 5:28 pm

I ReturnedKakarat
Thu Jun 12, 2014 1:29 pm

Request training server!Guest
Sun Jun 08, 2014 5:17 pm

Apply Trainee By The CompanyThe Company
Wed Jun 04, 2014 10:20 am

Java Apply For traineeJava!
Wed Jun 04, 2014 10:04 am

Fucking force[Sorry force]Partir[VN]
Sun Jun 01, 2014 11:57 pm

Leaving CS2D until done school daysGuest
Sat May 24, 2014 6:08 pm

What do you think about our clan?Guest
Thu May 08, 2014 12:00 pm

[A2]Zombies lua complete!Partir[VN]
Sat May 03, 2014 10:07 pm

Server register(Example)(VN)Loster
Sat May 03, 2014 5:20 pm

Being inactive(VN)Loster
Sat May 03, 2014 5:19 pm

Skype AGAINGuest
Mon Apr 21, 2014 2:05 pm

Agen Bola, Bandar Bola Online, Situs Taruhan Bola, 7meterPartir[VN]
Fri Apr 18, 2014 12:09 pm

CS2D update!Guest
Thu Apr 17, 2014 11:01 am

When a2 citylife re-openPartir[VN]
Mon Mar 31, 2014 12:47 am

Be S-ModPartir[VN]
Mon Mar 31, 2014 12:40 am

Stranger server again -.-Guest
Sat Feb 15, 2014 1:37 pm

[Announcement]About CS2D skill .Guest
Mon Feb 10, 2014 7:24 pm

Need LUA files.-DIE Wolf-
Tue Feb 04, 2014 9:14 pm

make me trinee pleseGuest
Tue Feb 04, 2014 6:39 pm

Idea of lua'sGuest
Tue Feb 04, 2014 6:38 pm

Need City Life LUA scripts-DIE Wolf-
Sun Feb 02, 2014 12:08 pm

[A2]Villager update skill and moreGuest
Sat Feb 01, 2014 7:50 pm

Offical close - open timed for [A2]Citylife!Guest
Sat Feb 01, 2014 7:46 pm

A2 Members Fighting Skills Guest
Sat Feb 01, 2014 7:44 pm

I can't login A2 villageGuest
Sat Feb 01, 2014 7:42 pm

Hedge ShearsForce[VN]
Tue Jan 28, 2014 8:26 pm

Clan reopen!Guest
Sun Jan 26, 2014 2:06 pm

Me , First member who return to A2 ClanPartir[VN]
Sat Jan 11, 2014 11:27 am

[Annoucement] Close Clan(VN)Loster
Sat Nov 23, 2013 7:23 pm

miss me? guys?payback132
Thu Oct 10, 2013 12:27 am

The Next Smodpayback132
Tue Oct 08, 2013 10:53 pm

[A2]Happytown and draftcityForgotten MOD
Mon Oct 07, 2013 9:54 pm

Villager Is Back To Life 24/7Forgotten MOD
Mon Oct 07, 2013 9:52 pm

Don't let our clan IDLE!Guest
Thu Oct 03, 2013 4:28 pm

Me , Worapat , Inactive again!Guest
Sat Sep 21, 2013 10:19 pm

About [A2]Shark serverGuest
Sat Sep 21, 2013 1:53 pm

Payback Recruitment again xD!!!Kakarat
Wed Sep 18, 2013 6:57 pm

Payback birthday!!!Guest
Tue Sep 17, 2013 9:25 pm

a2 city (new) wait wuut?payback132
Mon Sep 16, 2013 11:23 pm

report from yashu a traitorpayback132
Sun Sep 15, 2013 6:18 am

About Kakaratpayback132
Sun Sep 15, 2013 6:14 am

a2.. suggestionpayback132
Sun Sep 15, 2013 6:12 am

Payback making animation...payback132
Sun Sep 15, 2013 6:09 am

ComouFlage is back :Dpayback132
Sun Sep 15, 2013 6:03 am

Admin's new imagepayback132
Sat Sep 14, 2013 1:08 am

Registration payback132
Sat Sep 14, 2013 1:04 am

Kakarat IM BACK!!! >:]payback132
Sat Sep 14, 2013 12:54 am

about [A2]CitylifePartir[VN]
Tue Sep 10, 2013 10:48 pm

[]DT[] VS [A2] {}FRIENDLY WAR{}pjtheboss
Mon Sep 09, 2013 1:11 pm

About [A2-Clan]SkarkMachu[TakA]
Fri Sep 06, 2013 7:06 pm

TibiaForce[VN]
Tue Sep 03, 2013 6:43 pm

Machu Joins ClanWar GroupMachu[TakA]
Tue Sep 03, 2013 1:11 pm

[A2]Citylife Close for a timeKakarat
Mon Sep 02, 2013 6:02 pm

please make me moderatorMachu[TakA]
Sat Aug 31, 2013 4:57 pm

Machu Back to being TraineeForce[VN]
Fri Aug 30, 2013 8:56 pm

my first stupid creationGuest
Fri Aug 30, 2013 7:14 pm

ContactPartir[VN]
Sun Aug 25, 2013 9:34 pm

Free VPS (Link)paregonnam
Sun Aug 25, 2013 4:42 pm

Worapat apply for moderatorForce[VN]
Sat Aug 24, 2013 8:09 pm

A2 Clan new leaderGuest
Thu Aug 22, 2013 8:20 pm

ComouFlage leaving.pjtheboss
Thu Aug 22, 2013 4:23 pm

New LeaderForce[VN]
Tue Aug 20, 2013 7:02 pm

citylife new openedpjtheboss
Mon Aug 19, 2013 12:06 pm

My idea for citylife new map!Guest
Sun Aug 18, 2013 9:25 pm

Something..pjtheboss
Sun Aug 18, 2013 12:29 pm

want join clan A2Guest
Sun Aug 18, 2013 12:13 pm

Standard Server!!!!!tungbatuoc12
Sat Aug 17, 2013 9:16 pm

I have host a free member war for everyone.tungbatuoc12
Fri Aug 16, 2013 5:58 pm

Your GMT[A2]-AkIrAm
Wed Aug 14, 2013 5:23 pm

TIBIA LUA[A2]-AkIrAm
Wed Aug 14, 2013 5:21 pm

how to be admin[A2]-AkIrAm
Wed Aug 14, 2013 5:19 pm

Citynew music request[A2]-AkIrAm
Wed Aug 14, 2013 5:17 pm

BANNEDGuest
Sat Aug 10, 2013 10:17 pm

Clan War: Atomic 2 Vs. F@CO!DComouFlage.
Sat Aug 10, 2013 2:33 pm

What is your favorite server stlyGuest
Thu Aug 08, 2013 7:19 pm

[X-team], my memorable time :DKakarat
Sun Aug 04, 2013 3:46 pm

Top posting users this month

Top posting users this week


You are not connected. Please login or register

View previous topic View next topic Go down  Message [Page 1 of 1]

1Car Mod By Deathliger Empty Car Mod By Deathliger Wed Feb 13, 2013 9:34 pm

Deathliger


Deathliger
SuperModerator
SuperModerator
This is Money lua :

Code:
local dir = "sys/lua/saves/"
PLAYERS = {}

function addmoney(id, amount)
    if PLAYERS[id].money + amount >= 0 then
          parse(string.format("setmoney %i 0", id))
          PLAYERS[id].money = PLAYERS[id].money + amount
          parse(string.format("hudtxt2 %i 49 \"©255100100Money : %i\" 0 100", id, PLAYERS[id].money))
          return true
    end
    return false
end

function getmoney(id)
    return PLAYERS[id].money
end

addhook("join", "RPjoin")
function RPjoin(id)
    local playerfile = io.open(dir..player(id,"usgn")..".txt","r")
    if playerfile then
          PLAYERS[id] = {}
          for v in playerfile:lines() do
              local find = v:find"="
              key = v:sub(1,find-1)
              key = tonumber(key) or key
              val = v:sub(find+1)
              val = tonumber(val) or val
              PLAYERS[id][key] = val
          end
          playerfile:close()
    else
          PLAYERS[id] = {
              money = 0,
          }
    end
end

addhook("second", "RPsecond")
function RPsecond()
    for _, id in ipairs(player(0, "table")) do
          parse(string.format("setmoney %i 0", id))
          if PLAYERS[id] then
              parse(string.format("hudtxt2 %i 49 \"Money : %i\" 0 0", id, PLAYERS[id].money))
          end
    end
end

addhook("leave", "RPleave")
function RPleave(id)
    if PLAYERS[id] and player(id,"usgn") ~= 0 then
          local playerfile = io.open(dir .. player(id,"usgn") .. ".txt","w+") or io.tmpfile()
          local text = ""
          for i, v in pairs(PLAYERS[id]) do
              text = text .. i .. "=" .. tostring(v) .. "\n"
          end
          text = text:sub(1,-2)
          playerfile:write(text)
          playerfile:close()
    end
    PLAYERS[id] = nil
end

addhook("collect", "RPcollect")
function RPcollect(id,iid,type,ain,a,mode)
    if type == 66 then
          addmoney(id, 100)
    elseif type == 67 then
          addmoney(id, 1000)
    elseif type == 68 then
          addmoney(id, 10000)
    end
end

addhook("menu", "RPmenu")
function RPmenu(id, title, button)
    if title == "Drop Money" then
          if button == 0 then
              return
          end
          menu(id, "Drop Money,10,500,1000,5000,10000,50000,100000")
          if button == 1 then
              if addmoney(id, -100) then
                    parse(string.format("spawnitem 66 %i %i", player(id, "tilex"), player(id, "tiley")))
              end
          elseif button == 2 then
              if addmoney(id, -500) then
                    local spawn = string.format("spawnitem 66 %i %i", player(id, "tilex"), player(id, "tiley"))
                    for i = 1, 5 do
                        parse(spawn)
                    end
              end
          elseif button == 3 then
              if addmoney(id, -1000) then
                    parse(string.format("spawnitem 67 %i %i", player(id, "tilex"), player(id, "tiley")))
              end
          elseif button == 4 then
              if addmoney(id, -5000) then
                    local spawn = string.format("spawnitem 67 %i %i", player(id, "tilex"), player(id, "tiley"))
                    for i = 1, 5 do
                        parse(spawn)
                    end
              end
          elseif button == 5 then
              if addmoney(id, -10000) then
                    parse(string.format("spawnitem 68 %i %i", player(id, "tilex"), player(id, "tiley")))
              end
          elseif button == 6 then
              if addmoney(id, -50000) then
                    local spawn = string.format("spawnitem 68 %i %i", player(id, "tilex"), player(id, "tiley"))
                    for i = 1, 5 do
                        parse(spawn)
                    end
              end
          elseif button == 7 then
              if addmoney(id, -100000) then
                    local spawn = string.format("spawnitem 68 %i %i", player(id, "tilex"), player(id, "tiley"))
                    for i = 1, 10 do
                        parse(spawn)
                    end
              end
          end
    end
end

addhook("serveraction", "RPserveraction")
function RPserveraction(id,action)
    if action == 2 then
          menu(id, "Drop Money,10,500,1000,5000,10000,50000,100000")
    end
end

addhook("movetile", "RPmovetile")
function RPmovetile(id,x,y)
    if PLAYERS[id].x and PLAYERS[id].y and entity(x, y, "typename") ~= "Info_T" and entity(x, y, "typename") ~= "Info_CT" then
          PLAYERS[id].x, PLAYERS[id].y = x, y
    end
end

addhook("spawn", "RPspawn")
function RPspawn(id)
    if PLAYERS[id].x and PLAYERS[id].y then
          parse(string.format("setpos %i %i %i", id, PLAYERS[id].x*32+16, PLAYERS[id].y*32+16))
    end
    return ""
end

addhook("die", "RPdie")
function RPdie(victim,killer,weapon,x,y)
    PLAYERS[victim].x, PLAYERS[victim].y = nil, nil
end

And This is Car Lua :

Code:
CARS = {}
CARS_MAXSPEED = 25
CARS_ACCELERATION = function(speed) return speed/2 + 1 end
CARS_DECELERATION = function(speed) return -speed/2 - 1 end
CARS_IMAGEPATH = "gfx/weiwen/car.png"
CARS_PRICE = 10000

if not addmoney then
    function addmoney(id, amount)
          if player(id, 'money') >= amount then
              parse(string.format("setmoney %i %i", id, player(id, 'money') - amount))
              return true
          end
          return false
    end
end

function addcar(x, y)
    table.insert(CARS, {x = x, y = y, speed = 0, image = image(CARS_IMAGEPATH, x, y, 0), rot = 0})
end

function carpos(car, x, y)
    local tilex, tiley = math.floor(car.x/32), math.floor(car.y/32)
    if not tile(tilex, tiley, 'walkable') then
          return false
    end
    for _, id in ipairs(player(0, 'table')) do
          if car.driver and car.driver ~= id and player(id, 'health') > 0 and math.abs(x - player(id, 'x')) < 16 and math.abs(y - player(id, 'y')) < 16 then
              parse(string.format("customkill %i Car %i", car.driver, id))
          end
    end
    car.x, car.y = x, y
    if car.driver then
          parse(string.format("setpos %i %i %i", car.driver, x, y))
    else
          imagepos(car.image, x, y, car.rot)
    end
    return true
end

addhook("ms100", "CARms100")
function CARms100()
    for id, car in pairs(CARS) do
          if car.driver then
              if not player(car.driver, 'exists') or player(car.driver, 'health') <= 0 then
                    car.driver = nil
                    car.speed = math.min(CARS_MAXSPEED, car.speed + CARS_DECELERATION(car.speed))
              else
                    car.rot = player(car.driver, 'rot')
                    car.speed = math.min(CARS_MAXSPEED, car.speed + CARS_ACCELERATION(car.speed))
              end
          elseif car.speed > 0 then
              car.speed = math.min(CARS_MAXSPEED, car.speed + CARS_DECELERATION(car.speed))
          end
          if car.speed > 0 then
              local rot = math.rad(car.rot - 180)
              if not carpos(car, car.x - math.sin(rot)*car.speed, car.y + math.cos(rot)*car.speed) then
                    if car.driver then
                        parse(string.format("customkill %i Car %i", car.driver, car.driver))
                    end
                    freeimage(car.image)
                    parse(string.format("explosion %i %i 128 250 %i", car.x, car.y, car.driver or 0))
                    parse(string.format("effect \"fire\" %i %i 256 128", car.x, car.y))
                    CARS[id] = nil
              end
          end
    end
end

addhook("use", "CARuse")
function CARuse(id,event,data,x,y)
    x, y = player(id, 'x'), player(id, 'y')
    for _, car in pairs(CARS) do
          if not car.driver and math.abs(car.x - x) < 32 and math.abs(car.y - y) < 32 then
              car.speedmod = player(id, 'speedmod')
              parse(string.format("speedmod %i 0", id))
              car.driver = id
              freeimage(car.image)
              car.image = image(CARS_IMAGEPATH, 1, 0, 200+id)
                  break
          elseif car.driver == id then
              parse(string.format("speedmod %i %i", id, car.speedmod))
              car.driver = nil
              freeimage(car.image)
              car.image = image(CARS_IMAGEPATH, player(id, 'x'), player(id, 'y'), 0)
                  break
          end
    end
end

addhook("die", "CARdie")
function CARdie(id,killer,weapon,x,y)
    x, y = player(id, 'tilex'), player(id, 'tiley')
    for id, car in pairs(CARS) do
          if car.driver == id then
              freeimage(car.image)
              parse(string.format("explosion %i %i 128 250 %i", car.x, car.y, car.driver))
              parse(string.format("effect \"fire\" %i %i 256 128", car.x, car.y))
              CARS[id] = nil
                  break
          end
    end
end

local bought, nomoney = "You have bought a car for $" .. CARS_PRICE .. ".", "You do not have enough money to buy a car. ($" .. CARS_PRICE .. ")"
addhook("say", "CARsay")
function CARsay(id,message)
    if message == "!car" then
          if addmoney(id, -CARS_PRICE) then
              addcar(player(id, 'x'), player(id, 'y'))
              msg2(id, bought)
          else
              msg2(id, nomoney)
          end
          return 1
    end
end

https://a2clan.forumid.net

2Car Mod By Deathliger Empty Re: Car Mod By Deathliger Wed Feb 13, 2013 9:44 pm

rockmanvnx6


rockmanvnx6
Administrator
Administrator
GOOD lua

http://rockmanvnx6.tk/

3Car Mod By Deathliger Empty Re: Car Mod By Deathliger Wed Feb 13, 2013 9:51 pm

Deathliger


Deathliger
SuperModerator
SuperModerator
thx lol

https://a2clan.forumid.net

4Car Mod By Deathliger Empty Re: Car Mod By Deathliger Thu Feb 14, 2013 11:25 pm

Kakarat


Kakarat
SuperModerator
SuperModerator
It will be good but i crash A lot sad so plz XD im not trying to be mean but idk make it more easy to drive

5Car Mod By Deathliger Empty Re: Car Mod By Deathliger Mon Feb 25, 2013 11:16 pm

payback132


payback132
Moderator
Moderator
can i post it at unreal software? xD

6Car Mod By Deathliger Empty Re: Car Mod By Deathliger Mon Feb 25, 2013 11:45 pm

payback132


payback132
Moderator
Moderator
hey can i also edit the mod cuz i feel bored with only a little bit cars pls say yes

-Prince Vegeta.

7Car Mod By Deathliger Empty Re: Car Mod By Deathliger Tue Feb 26, 2013 12:04 am

TARTAR


Member
Member
YES ! YES ! YES !

8Car Mod By Deathliger Empty Re: Car Mod By Deathliger Tue Feb 26, 2013 2:07 pm

payback132


payback132
Moderator
Moderator
big grin im gonna add alot of cars like ferrari and stuff happy

9Car Mod By Deathliger Empty Re: Car Mod By Deathliger Tue Feb 26, 2013 8:45 pm

payback132


payback132
Moderator
Moderator
i made my own ferrari lol rolling on the floor but it look's very cool

10Car Mod By Deathliger Empty Re: Car Mod By Deathliger Wed Feb 27, 2013 11:59 am

TARTAR


Member
Member
yes i see it tongue

11Car Mod By Deathliger Empty Re: Car Mod By Deathliger Fri Mar 08, 2013 1:13 am

payback132


payback132
Moderator
Moderator
actually you dont see it >sad

Sponsored content


View previous topic View next topic Back to top  Message [Page 1 of 1]

Permissions in this forum:
You cannot reply to topics in this forum

 
  • Free forum hosting | ©phpBB | Free forum support | Report an abuse | Forumotion.com