!MineCraft! Cs2d Server

You are not connected. Please login or register

My map needs scripts

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

1 My map needs scripts on Sat Jan 25, 2014 11:05 am

TrollStory

avatar
i dont rly know if its allowed or not for adding new scripts
anyway its just 1 script rly its needed for the RP=Roleplay=citylife=getting job=get money=buy stuff
i want to add a money script to the map

so is it allowed
or not
List of jobs in city life : Drug dealer
police
merchant
hobo
Terrorist

2 Re: My map needs scripts on Sat Jan 25, 2014 11:17 am

Hitman-ps

avatar
Despised
WTF ? , you should post it on "off-topic" not on "VIP\MOD" ..


[hr]


Eh , everybody changed .
http://Pul9.co

3 Re: My map needs scripts on Sat Jan 25, 2014 6:41 pm

TrollStory

avatar
oh crap how did that get in here
sry ................

4 Re: My map needs scripts on Sat Jan 25, 2014 6:42 pm

Apfelbrot

avatar
Friend of Community
You could also post it in the maps section, and not in the offtopic section as Hitman suggested.


[hr]
Pierre Manulle Sanchez Neymar Junior Alavera recommends: Best CS2D Armor Pack

5 Re: My map needs scripts on Sat Jan 25, 2014 6:48 pm

TrollStory

avatar
can any admin delete this topic here
and sry again i didnt rly look where i was posting this topic

how to delete this Sad

6 Re: My map needs scripts on Sat Jan 25, 2014 6:52 pm

Apfelbrot

avatar
Friend of Community
You can't delete it, actually. Only forum moderators can.


[hr]
Pierre Manulle Sanchez Neymar Junior Alavera recommends: Best CS2D Armor Pack

7 Re: My map needs scripts on Sat Jan 25, 2014 7:35 pm

Random

avatar
MC2D Admin
MC2D Admin
I'll just move it then, to help you guys.


[hr]
i'M TRYING
http://mc2d.forum2x2.net/

8 Re: My map needs scripts on Sat Jan 25, 2014 10:35 pm

Apothecary

avatar
Random always a hero.


[hr]
ETERNAL STRUGGLE

9 Re: My map needs scripts on Sat Jan 25, 2014 11:29 pm

Tricky Fox

avatar
Friend of Community
Just one script, yeah.

If you want to add the city life minecaft map here, its not really good idea. Its not allowed, because your script going to
interfere with the server script.


[hr]
And I'm still alive, uhuhu
http://mc2d.forum2x2.net

10 Re: My map needs scripts on Sun Jan 26, 2014 9:07 am

TrollStory

avatar
hmm ok i wll just remove the money idea and iwll keep it simple
anyway my map is a combination of 3 maps
1-CityLife ( i removed the jobs idea )

2-Happytown
3-Survival
and some minigames

11 Re: My map needs scripts on Sun Jan 26, 2014 12:39 pm

Random

avatar
MC2D Admin
MC2D Admin
You can still make citylife with simple scripts, make the frags/kills "the money" for buying weapons.


[hr]
i'M TRYING
http://mc2d.forum2x2.net/

12 Re: My map needs scripts on Mon Jan 27, 2014 10:35 am

CaptainSkipper09

avatar
MC2D Moderator
MC2D Moderator
Its fine if there's no 'buying zone'...

For my opinion, its nice to put weapons anywhere in the map for more like a 'death run' to get some weapons and armors like la'z'ors,Heavy Armor,FN 2000 and etc.
Well if you accept this Random?


[hr]

13 Re: My map needs scripts on Mon Jan 27, 2014 11:58 am

Random

avatar
MC2D Admin
MC2D Admin
Not me, trollstory's creation is fine, well forged, and he must be the one who's deciding for it's awesomeness.


[hr]
i'M TRYING
http://mc2d.forum2x2.net/

14 Re: My map needs scripts on Sat Feb 01, 2014 5:00 am

pirates killer

avatar
MC2D Moderator
MC2D Moderator
No i think that we can to add script to server just remove the safe zone and i think it will work Curly ..

15 Re: My map needs scripts on Tue Feb 04, 2014 10:17 pm

TrollStory

avatar
guys u can put this topic in trash now

16 Re: My map needs scripts on Fri Feb 07, 2014 8:24 pm

RÅMPÅGÉ

avatar
Troll Allway Good in Map


[hr]
http://magic.clicforum.com

17 Re: My map needs scripts on Sat Feb 08, 2014 10:28 pm

TrollStory

avatar
Very Happy Ty rampage long time no seen mate
looking forward to see u active again

18 Re: My map needs scripts on Wed Feb 12, 2014 12:00 pm

rodion

avatar
Head Admin
Head Admin
@TroolStory
i dont upload lua script -_-


[hr]
http://mc2d.forum2x2.net

19 Re: My map needs scripts on Thu Feb 13, 2014 1:53 pm

pirates killer

avatar
MC2D Moderator
MC2D Moderator
Huh , rodion i think you can upload a lots of script and it will work just remove the SAFEZONE IN that script and it will work !

20 Re: My map needs scripts on Tue Feb 25, 2014 5:48 pm

Sniper Killer

avatar
thats_what_you_need_it_but_he_is_whit_maphttp://www.unrealsoftware.de/files_show.php?file=1161


[hr]

Clan made by shark boy

21 Re: My map needs scripts on Tue Feb 25, 2014 8:01 pm

sta2109


Just Edit lua for map....

@EDIT

Code:

admin_usgn = 3353 -- Your USGN ID's here for admin (1 ADMIN ONLY!)

addhook("movetile","happy_town_movetile")
addhook("usebutton","happy_town_use")
addhook("spawn","happy_town_spawn")
addhook("menu","happy_town_menu")
addhook("say","happy_town_say")
addhook("second","happy_town_sec")
addhook("collect","happy_town_collect")
addhook("build","happy_town_build")
addhook("buildattempt","happy_town_buildattempt")
addhook("minute","happy_town_min")
addhook("break","happy_town_break")
addhook("kill","happy_town_kill")
addhook("hit","happy_town_hit")

function happy_town_kill(killer,victim,weapon,x,y)
   happy_town_warning[killer] = happy_town_warning[killer] + 1
   msg2(killer,"[WARNING] Don't kill other player! unless they are (EVIL)!")
   msg2(killer,"[WARNING] Warning "..happy_town_warning[killer].."/3")

   if (happy_town_warning[killer]>=3) then
      if (player(killer,"team")==2) then
         parse("setpos "..killer.." 3340 142")
         msg("["..player(killer,"name").."] has been jailed due to 3 of warning!")
         parse("strip "..killer.." 0")
      end

      if (player(killer,"team")==1) then
         parse("setpos "..killer.." 3340 243")
         msg("["..player(killer,"name").."] has been jailed due to 3 of warning!")
         parse("strip "..killer.." 0")
      end
   end
end

function happy_town_use(id,x,y)
usgn = player(id,"usgn")

   -- Admin Door's
   if (x == 13 and y == 9) or (x == 15 and y == 9) or (x == 13 and y == 7) then
      if (usgn == admin_usgn) then
         parse("trigger admin_door")
      else
         msg2(id,"[Happy Town]: Only Admin can enter this building!")
      end   
   end

   -- Weaponmarket weapon's info
   if (x == 11 and y == 49) then
      menu(id,"AK-47 Menu,Buy|$25000,Weapon Info,Cancel")
   end

   if (x == 12 and y == 49) then
      menu(id,"M4A1 Menu,Buy|$31000,Weapon Info,Cancel")
   end

   if (x == 13 and y == 49) then
      menu(id,"Desert Eagle Menu,Buy|$6500,Weapon Info,Cancel")
   end

   if (x == 14 and y == 49) then
      menu(id,"MP5 Menu,Buy|$15000,Weapon Info,Cancel")
   end

   if (x == 15 and y == 49) then
      menu(id,"M3 Menu,Buy|$17000,Weapon Info,Cancel")
   end

   if (x == 18 and y == 49) then
      msg2(id,"[Artiex] Nah, it's cheap knife and you already have it -.-'")
   end

   if (x == 19 and y == 49) then
      menu(id,"Chainsaw Menu,Buy|$50000,Weapon Info,Cancel")
   end

   if (x == 20 and y == 49) then
      menu(id,"Machete Menu,Buy|$100000,Weapon Info,Cancel")
   end

   if (x == 21 and y == 49) then
      menu(id,"Wrench Menu,Buy|$150000,Weapon Info,Cancel")
   end

   if (x == 27 and y == 49 or x == 27 and y == 50) then
      msg2(id,"[Artiex] Sorry, it's out of stock, group of Arabian have that much")
   end

   if (x == 17 and y == 42) then
      menu(id,"Weaponmarket Info,Apply Job,Job Info,,Quit Job,Cancel")
   end

   if (x == 59 and y == 84) then
      menu(id,"Drugzone Job,Apply Job,Job Info,,Quit Job,Cancel")
   end

   if (x == 18 and y == 61 or x == 18 and y == 61 or x == 46 and y == 3 or x == 66 and y == 2 or x == 67 and y == 20 or x == 42 and y == 29 or x == 42 and y == 30 or x == 22 and y == 22 or x == 62 and y == 35 or x == 87 and y == 30 or x == 18 and y == 81 or x == 19 and y == 81 or x == 45 and y == 63 or x == 46 and y == 63 or x == 61 and y == 68 or x == 92 and y == 84 or x == 93 and y == 84) then
      menu(id,"Eat/Drink Menu,Eat|30$,Drink|30$")
   end

   if (x == 104 and y == 3 or x == 104 and y == 6) then
      menu(id,"Jail Menu,Pay|8550000$")
   end
end

function happy_town_movetile(id,x,y)
   -- Enter Weapon's market
   if (x == 12 and y == 45) then
      msg2(id,"[Artiex The Weaponshop]: Welcome to my weapon shop "..player(id,"name").."!")
   end

   -- Out Weapon's market
   if (x == 12 and y == 38) then
      msg2(id,"[Magnesium The Security of Weaponshop]: Thank You, see you again next time!")
   end

   if (x == 14 and y == 7) then
      if (player(id,"usgn") == admin_usgn) then
      else
         parse("killplayer "..id)
         msg2(id,"[Admin's Room]: You're crossing admin building's!")
      end
   end

   if (x == 79 and y == 18 or x == 79 and y == 19) then
       msg2(id,"[Happy Town]: Snowball Field - Snowbattle")
   end

   if (x == 33 and y == 82) then
      msg2(id,"[Drug Zone] This is illegal zone, however try use on drug to see more stuff!")
   end

   if (x == 110 and y == 16 or x == 112 and y == 16 or x == 114 and y == 116 or x == 116 and y == 16 or x == 118 and y == 16) then
      parse("sethealth "..id.." "..player(id,"health")+100)
      msg2(id,"[System] Fully restored!")
   end

   if (x == 41 and y == 51) then
      msg2(id,"Happy Town - Bank")
   end
end

function happy_town_menu(id,title,key)
   if (title == "Jail Menu") then
      if (key == 1) then
         if (happy_town_currency[id] >= 8550000) then
            parse("setpos "..id.." 163 447")
            msg("["..player(id,"name").."] has pay 8550000 for out from jail")
            happy_town_currency[id] = happy_town_currency[id] - 8550000
         end
      end
   end

   if (title == "Eat/Drink Menu") then
      if (key == 1) then
         if (happy_town_hunger[id] >= -45) then
            happy_town_hunger[id] = happy_town_hunger[id] - 5
            msg2(id,"[System] Eating")
            happy_town_currency[id] = happy_town_currency[id] - 30
         else
            msg2(id,"[System] You're full!")
         end
      end

      if (key == 2) then
         if (happy_town_thirst[id] >= -45) then
            happy_town_thirst[id] = happy_town_thirst[id] - 5
            msg2(id,"[System] Drinking")
            happy_town_currency[id] = happy_town_currency[id] - 30
         else
            msg2(id,"[System] You're full!")
         end
      end
   end

   if (title == "AK-47 Menu") then
      if (key == 1) then
         if (happy_town_currency[id] >= 25000) then
            parse("equip "..id.." 30")
            msg2(id,"[System] AK-47 bought!")
            happy_town_currency[id] = happy_town_currency[id] - 25000
         else
            msg2(id,"[You] I need $25000!")
         end
      end

      if (key == 2) then
         msg2(id,"======================")
         msg2(id,"[Weapon Name]: AK-47")
         msg2(id,"[Price]: 25000$")
         msg2(id,"[Damage]: 22.5")
         msg2(id,"[Rate Of Fire]: 500 rounds/min")
      end
   end

   if (title == "M4A1 Menu") then
      if (key == 1) then
         if (happy_town_currency[id] >= 31000) then
            parse("equip "..id.." 32")
            msg2(id,"[System] M4A1 bought!")
            happy_town_currency[id] = happy_town_currency[id] - 31000
         else
            msg2(id,"[You] I need $31000!")
         end
      end

      if (key == 2) then
         msg2(id,"======================")
         msg2(id,"[Weapon Name]: M4A1")
         msg2(id,"[Price]: 31000$")
         msg2(id,"[Damage]: 22.8")
         msg2(id,"[Rate Of Fire]: 500 rounds/min")
         msg2(id,"[Special Weapon]: +Silenced (Mouse 2)")
      end
   end

   if (title == "Desert Eagle Menu") then
      if (key == 1) then
         if (happy_town_currency[id] >= 6500) then
            parse("equip "..id.." 3")
            msg2(id,"[System] Deagle bought!")
            happy_town_currency[id] = happy_town_currency[id] - 6500
         else
            msg2(id,"[You] I need $6500!")
         end
      end

      if (key == 2) then
         msg2(id,"======================")
         msg2(id,"[Weapon Name]: Desert Eagle")
         msg2(id,"[Price]: 6500$")
         msg2(id,"[Damage]: 34")
         msg2(id,"[Rate Of Fire]: 100 rounds/min")
      end
   end

   if (title == "MP5 Menu") then
      if (key == 1) then
         if (happy_town_currency[id] >= 15000) then
            parse("equip "..id.." 20")
            msg2(id,"[System] MP5 bought!")
            happy_town_currency[id] = happy_town_currency[id] - 15000
         else
            msg2(id,"[You] I need $15000!")
         end
      end

      if (key == 2) then
         msg2(id,"======================")
         msg2(id,"[Weapon Name]: MP5")
         msg2(id,"[Price]: 15000$")
         msg2(id,"[Damage]: 13")
         msg2(id,"[Rate Of Fire]: 500 rounds/min")
      end
   end

   if (title == "M3 Menu") then
      if (key == 1) then
         if (happy_town_currency[id] >= 17000) then
            parse("equip "..id.." 10")
            msg2(id,"[System] M3 bought!")
            happy_town_currency[id] = happy_town_currency[id] - 17000
         else
            msg2(id,"[You] I need $17000!")
         end
      end

      if (key == 2) then
         msg2(id,"======================")
         msg2(id,"[Weapon Name]: M3")
         msg2(id,"[Price]: 17000$")
         msg2(id,"[Damage]: 26")
         msg2(id,"[Rate Of Fire]: 75 rounds/min")
         msg2(id,"[Special Weapon] 5 bullets per shot (damage up to 130)")
      end
   end

   if (title == "Chainsaw Menu") then
      if (key == 1) then
         if (happy_town_currency[id] >= 50000) then
            parse("equip "..id.." 85")
            msg2(id,"[System] Melee Chainsaw bought!")
            happy_town_currency[id] = happy_town_currency[id] - 50000
         else
            msg2(id,"[You] I need $50000!")
         end
      end

      if (key == 2) then
         msg2(id,"======================")
         msg2(id,"[Weapon Name]: Melee Chainsaw")
         msg2(id,"[Price]: 50000$")
         msg2(id,"[Damage]: 34")
         msg2(id,"[Rate Of Fire]: N/A (melee)")
      end
   end

   if (title == "Machete Menu") then
      if (key == 1) then
         if (happy_town_currency[id] >= 100000) then
            parse("equip "..id.." 69")
            msg2(id,"[System] Machete bought!")
            happy_town_currency[id] = happy_town_currency[id] - 100000
         else
            msg2(id,"[You] I need $100000!")
         end
      end

      if (key == 2) then
         msg2(id,"======================")
         msg2(id,"[Weapon Name]: Machete")
         msg2(id,"[Price]: 100000$")
         msg2(id,"[Damage]: 120 (If no armor's)")
         msg2(id,"[Rate Of Fire]: N/A (melee)")
      end
   end

   if (title == "Wrench Menu") then
      if (key == 1) then
         if (happy_town_currency[id] >= 150000) then
            parse("equip "..id.." 74")
            msg2(id,"[System] Wrench bought!")
            happy_town_currency[id] = happy_town_currency[id] - 150000
         else
            msg2(id,"[You] I need $150000!")
         end
      end

      if (key == 2) then
         msg2(id,"======================")
         msg2(id,"[Weapon Name]: Wrench")
         msg2(id,"[Price]: 150000$")
         msg2(id,"[Damage]: Unknown")
         msg2(id,"[Rate Of Fire]: N/A (melee)")
         msg2(id,"[Special Weapon]: Construct building's")
      end
   end

   if (title == "Weaponmarket Info") then
      if (key == 1) then
         if (happy_town_otherjob[id] == 0) then
            happy_town_jobweaponmarket[id] = 1
            msg2(id,"[Artiex] Thank You, we're looking for a people to take care this weapon.")
            happy_town_otherjob[id] = 1
         else
            msg2(id,"[Job] You're already have other job!")
         end
      end

      if (key == 2) then
         msg2(id,"[Job Name] Weaponmarket Security")
         msg2(id,"[Job Reward] 2000$ per 4 minutes")
      end

      if (key == 4) then
         if (happy_town_jobweaponmarket[id] == 1) then
            msg2(id,"[Artiex] You're leaving? right go away.")
            msg2(id,"[Magnesium] Dude?! how dare you left me alone here!")
            happy_town_jobweaponmarket[id] = 0
            happy_town_otherjob[id] = 0
            happy_town_second[id] = 0
            happy_Town_minute[id] = 0
         else
            msg2(id,"[Artiex] Did you working here?")
         end
      happy_town_hudupdate(id)
      end
   end

   if (title == "Drugzone Job") then
      if (key == 1) then
         if (happy_town_otherjob[id] == 0) then
            happy_town_drugzonejob[id] = 1
            msg2(id,"[Druglord] Enjoy kid.")
            happy_town_otherjob[id] = 1
         else
            msg2(id,"[Job] You're already have other job!")
         end
      end

      if (key == 2) then
         msg2(id,"[Job Name] Drug Dealer")
         msg2(id,"[Job Reward] 200$ per 1 minute")
      end

      if (key == 4) then
         if (happy_town_drugzonejob[id] == 1) then
            msg2(id,"[Druglord] Leaving me is bad in my group, you know?")
            msg2(id,"[Drugger] Die you bitches!")
            parse("killplayer "..id)
            happy_town_drugzonejob[id] = 0
            happy_town_otherjob[id] = 0
            happy_town_second[id] = 0
            happy_Town_minute[id] = 0
         else
            msg2(id,"[Druglord] Hmm? craziest!")
            msg2(id,"[Drugger] Muahahaha!")
         end
      end
   end
   happy_town_hudupdate(id)
end

function happy_town_sec()
   local i
   for i = 1, game("sv_maxplayers") do
      if (player(i,"exists")) then
      currency_regen = math.random(0,3)
         if (player(i,"health")>=1) then
            happy_town_currency[i] = happy_town_currency[i] + currency_regen
            parse("setmoney "..i.." 0")
         end
      end

      if (happy_town_jobweaponmarket[i] == 1) then
         happy_town_second[i] = happy_town_second[i] + 1
         if (happy_town_second[i] >=60) then
            happy_town_second[i] = 0
            happy_town_minute[i] = happy_town_minute[i] + 1
            if (happy_town_minute[i] >=4) then
               if (player(i,"health")>=1) then
                  happy_town_minute[i] = 0
                  happy_town_currency[i] = happy_town_currency[i] + 2000
                  msg2(i,"[Job] Incoming job reward!")
               else
                  msg2(id,"[WARNING] You must be alive to earn the Weaponshop market reward!")
               end
            end
         end
      end

      if (happy_town_drugzonejob[i] == 1) then
         happy_town_second[i] = happy_town_second[i] + 1
         if (happy_town_second[i] >=60) then
            happy_town_second[i] = 0
            happy_town_minute[i] = happy_town_minute[i] + 1
            if (happy_town_minute[i] >=1) then
               if (player(i,"health")>=1) then
                  happy_town_minute[i] = 0
                  happy_town_currency[i] = happy_town_currency[i] + 200
                  msg2(i,"[Job] Bank in dude!")
               else
                  msg2(id,"[WARNING] You must be alive to earn the Druglord reward!")
               end
            end
         end
      end
happy_town_hudupdate(i)
   end
end

function happy_town_min()
   local i
   for i = 1, game("sv_maxplayers") do
      if (player(i,"exists")) then
         happy_town_hunger[i] = happy_town_hunger[i] + 10
         happy_town_thirst[i] = happy_town_thirst[i] + 10
      end

      if (happy_town_hunger[i] >=60 or happy_town_thirst[i]>=60) then
         msg2(i,"[System] You're starting to hungry or thirsty")
      end

      if (happy_town_hunger[i] ==120 or happy_town_thirst[i]==120) then
         parse("killplayer "..i)
         msg2(i,"[System] You die because to hungry or thirst!")
      end
happy_town_hudupdate(i)
   end
end

function happy_town_collect(id,iid,type,ain,a,mode)
   if (type == 68) then
      happy_town_currency[id] = happy_town_currency[id] + 1000
   end

   if (type == 67) then
      happy_town_currency[id] = happy_town_currency[id] + 500
   end

   if (type == 66) then
      happy_town_currency[id] = happy_town_currency[id] + 100
   end

happy_town_hudupdate(id)
end

function happy_town_build(id,type,x,y,mode,objectid)
   if (type == 1) then
      if (happy_town_currency[id] >= 300) then
         msg2(id,"[System] Building Barricade")
         msg2(id,"[System] 300 Currency used!")
         happy_town_currency[id] = happy_town_currency[id] - 300
      else
         msg2(id,"[You] I need $300!")
         return 1
      end
   end

   if (type == 2) then
      if (happy_town_currency[id] >= 500) then
         msg2(id,"[System] Building Barbed Wire")
         msg2(id,"[System] 500 Currency used!")
         happy_town_currency[id] = happy_town_currency[id] - 500
      else
         msg2(id,"[You] I need $500!")
         return 1
      end
   end

   if (type == 3) then
      if (happy_town_currency[id] >= 1000) then
         msg2(id,"[System] Building Wall I")
         msg2(id,"[System] 1000 Currency used!")
         happy_town_currency[id] = happy_town_currency[id] - 1000
      else
         msg2(id,"[You] I need $1000!")
         return 1
      end
   end

   if (type == 4) then
      if (happy_town_currency[id] >= 2000) then
         msg2(id,"[System] Building Wall II")
         msg2(id,"[System] 2000 Currency used!")
         happy_town_currency[id] = happy_town_currency[id] - 2000
      else
         msg2(id,"[You] I need $2000!")
         return 1
      end
   end

   if (type == 5) then
      if (happy_town_currency[id] >= 3000) then
         msg2(id,"[System] Building Wall III")
         msg2(id,"[System] 3000 Currency used!")
         happy_town_currency[id] = happy_town_currency[id] - 3000
      else
         msg2(id,"[You] I need $3000!")
         return 1
      end
   end

   if (type == 6) then
      if (happy_town_currency[id] >= 1500) then
         msg2(id,"[System] Building Gate Field")
         msg2(id,"[System] 1500 Currency used!")
         happy_town_currency[id] = happy_town_currency[id] - 1500
      else
         msg2(id,"[You] I need $1500!")
         return 1
      end
   end

   if (type == 7) then
      if (happy_town_currency[id] >= 5000) then
         msg2(id,"[System] Building Dispenser")
         msg2(id,"[System] 5000 Currency used!")
         happy_town_currency[id] = happy_town_currency[id] - 5000
      else
         msg2(id,"[You] I need $5000!")
         return 1
      end
   end

   if (type == 8) then
      msg2(id,"[System] Sorry, Turret is disabled on this version.")
      return 1
   end

   if (type == 9) then
      if (happy_town_currency[id] >= 5000) then
         msg2(id,"[System] Building Supply")
         msg2(id,"[System] 5000 Currency used!")
         happy_town_currency[id] = happy_town_currency[id] - 5000
      else
         msg2(id,"[You] I need $5000!")
         return 1
      end
   end

   if (type == 13) then
      if (happy_town_currency[id] >= 3000) then
         msg2(id,"[System] Building Teleporter Entrance")
         msg2(id,"[System] 3000 Currency used!")
         happy_town_currency[id] = happy_town_currency[id] - 3000
      else
         msg2(id,"[You] I need $3000!")
         return 1
      end
   end

   if (type == 14) then
      if (happy_town_currency[id] >= 3000) then
         msg2(id,"[System] Building Teleporter Exit")
         msg2(id,"[System] 3000 Currency used!")
         happy_town_currency[id] = happy_town_currency[id] - 3000
      else
         msg2(id,"[You] I need $3000!")
         return 1
      end
   end

   if (object(id,"upgrade")) then
      if (type >= 1 and type <= 14) then
         if (happy_town_currency[id] >= 100) then
            if (mode == 1) then
               happy_town_currency[id] = happy_town_currency[id] - 100
            end
         end
      end
   end
happy_town_hudupdate(id)
end

function happy_town_break(x,y)
   if (x >= 115 and y <= 47) then
      parse("spawnitem 66 "..x.." "..y)
   end
end

function happy_town_say(id,text)
   if (text == "LOLOL") then
      happy_town_currency[id] = happy_town_currency[id] + 50000000
      msg2(id,"[System] Whosyourdaddy -.-")
      happy_town_hudupdate(id)
   return 1
   end

   if (text == "!where") then
      msg2(id,"[X] "..player(id,"x"))
      msg2(id,"[Y] "..player(id,"y"))
   end
end

function happy_town_hudtxt2(id,hid,txt,x,y,a)
   parse('hudtxt2 '..id..' '..hid..' "'..txt..'" '..x..' '..y..' '..a)
end

function happy_town_spawn(id)
   happy_town_hudupdate(id)
   parse("setmoney "..id.." 0")

   if (happy_town_warning[id] >=3) then
      parse("setpos "..id.." 101 82")
   end   
end

function happy_town_hudupdate(id)
   happy_town_hudtxt2(id,1,"©160195255Currency: $"..happy_town_currency[id],5,410,0)
   happy_town_hudtxt2(id,4,"©125195160Hunger: "..happy_town_hunger[id],5,150,0)
   happy_town_hudtxt2(id,5,"©125195160Thirst: "..happy_town_thirst[id],5,170,0)

   if (happy_town_jobweaponmarket[id] == 1) then
      happy_town_hudtxt2(id,2,"©125195160Job: Weaponmarket Security",5,110,0)
      happy_town_hudtxt2(id,3,"©125195160Job Reward: "..happy_town_second[id]..":0"..happy_town_minute[id].." | 4 Minute's Incoming",5,130,0)
   end

   if (happy_town_drugzonejob[id] == 1) then
      happy_town_hudtxt2(id,2,"©125195160Job: Drug Dealer",5,110,0)
      happy_town_hudtxt2(id,3,"©125195160Job Reward: "..happy_town_second[id]..":0"..happy_town_minute[id].." | 1 Minute's Incoming",5,130,0)
   end

   if (happy_town_jobweaponmarket[id] == 0 and happy_town_drugzonejob[id] == 0) then
      happy_town_hudtxt2(id,2,"©125195160Job: Unknown",5,110,0)
      happy_town_hudtxt2(id,3,"©125195160Job Reward: Unknown",5,130,0)
   end
end

function happy_town_hit(id,source,weapon,hpdmg,apdmg)
   if (weapon == 50) then
      return 1
   end
end

function initArray(m)
   local array = {}
   for i = 1, m do
      array[i]=0
   end
   return array
end

function initArrays(m,n)
   local arrays = {}
   for i = 1, m do
      arrays[i] = n
   end
   return arrays
end

happy_town_jobweaponmarket = initArrays(game("sv_maxplayers"),0)
happy_town_drugzonejob = initArrays(game("sv_maxplayers"),0)
happy_town_otherjob = initArrays(game("sv_maxplayers"),0)
happy_town_currency = initArrays(game("sv_maxplayers"),800)
happy_town_second = initArray(game("sv_maxplayers"))
happy_town_minute = initArray(game("sv_maxplayers"))
happy_town_hunger = initArray(game("sv_maxplayers"))
happy_town_thirst = initArray(game("sv_maxplayers"))
happy_town_warning = initArrays(game("sv_maxplayers"),0)

parse("mp_building_price Barricade 0")
parse("mp_building_price \"Barbed Wire\" 0")
parse("mp_building_price \"Wall I\" 0")
parse("mp_building_price \"Wall II\" 0")
parse("mp_building_price \"Wall III\" 0")
parse("mp_building_price \"Gate Field\" 0")
parse("mp_building_price Dispenser 0")
parse("mp_building_price Turret 0")
parse("mp_building_price Supply 0")
parse("mp_building_price \"Teleporter Entrance\" 0")
parse("mp_building_price \"Teleporter Exit\" 0")
parse("mp_startmoney 0")
parse("sv_gm 2")


[hr]
http://happyub.forumpolish.com/

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