Im making new map and need some help about script
I dont know how to set spawn hp 250
And how to make a trigger shop?
plzzz help
I got this so far with my frend
parse("mp_wpndmg wrench 0")
parse("mp_wpndmg knife 0")
addhook("say","say_drop")
function say_drop(id,txt)
if (txt=="!drop 100") or (txt=="!drop 100") then
if (player(id,"money")>99) then
parse("spawnitem 66 "..player(id,"tilex").." "..player(id,"tiley").."")
parse("setmoney "..id.." "..player(id,"money")-100)
end
end
if (txt=="!drop 500") or (txt=="!drop 500") then
if (player(id,"money")>499) then
parse("spawnitem 67 "..player(id,"tilex").." "..player(id,"tiley").."")
parse("setmoney "..id.." "..player(id,"money")-500)
end
end
if (txt=="!drop 1000") or (txt=="!drop 1000") then
if (player(id,"money")>999) then
parse("spawnitem 68 "..player(id,"tilex").." "..player(id,"tiley").."")
parse("setmoney "..id.." "..player(id,"money")-1000)
end
end
if (txt=="!drop 2000") or (txt=="!drop 2000") then
if (player(id,"money")>1999) then
parse("spawnitem 68 "..player(id,"tilex").." "..player(id,"tiley").."")
parse("spawnitem 68 "..player(id,"tilex").." "..player(id,"tiley").."")
parse("setmoney "..id.." "..player(id,"money")-2000)
end
end
if (txt=="!drop 5000") or (txt=="!drop 5000") then
if (player(id,"money")>4999) then
parse("spawnitem 68 "..player(id,"tilex").." "..player(id,"tiley").."")
parse("spawnitem 68 "..player(id,"tilex").." "..player(id,"tiley").."")
parse("spawnitem 68 "..player(id,"tilex").." "..player(id,"tiley").."")
parse("spawnitem 68 "..player(id,"tilex").." "..player(id,"tiley").."")
parse("spawnitem 68 "..player(id,"tilex").." "..player(id,"tiley").."")
parse("setmoney "..id.." "..player(id,"money")-5000)
end
end
if (txt=="!drop 10000") or (txt=="!drop 10000") then
if (player(id,"money")>9999) then
parse("spawnitem 68 "..player(id,"tilex").." "..player(id,"tiley").."")
parse("spawnitem 68 "..player(id,"tilex").." "..player(id,"tiley").."")
parse("spawnitem 68 "..player(id,"tilex").." "..player(id,"tiley").."")
parse("spawnitem 68 "..player(id,"tilex").." "..player(id,"tiley").."")
parse("spawnitem 68 "..player(id,"tilex").." "..player(id,"tiley").."")
parse("spawnitem 68 "..player(id,"tilex").." "..player(id,"tiley").."")
parse("spawnitem 68 "..player(id,"tilex").." "..player(id,"tiley").."")
parse("spawnitem 68 "..player(id,"tilex").." "..player(id,"tiley").."")
parse("spawnitem 68 "..player(id,"tilex").." "..player(id,"tiley").."")
parse("spawnitem 68 "..player(id,"tilex").." "..player(id,"tiley").."")
parse("setmoney "..id.." "..player(id,"money")-10000)
end
end
if (txt=="!drop 16000") or (txt=="!drop 16000") then
if (player(id,"money")>15999) then
parse("spawnitem 68 "..player(id,"tilex").." "..player(id,"tiley").."")
parse("spawnitem 68 "..player(id,"tilex").." "..player(id,"tiley").."")
parse("spawnitem 68 "..player(id,"tilex").." "..player(id,"tiley").."")
parse("spawnitem 68 "..player(id,"tilex").." "..player(id,"tiley").."")
parse("spawnitem 68 "..player(id,"tilex").." "..player(id,"tiley").."")
parse("spawnitem 68 "..player(id,"tilex").." "..player(id,"tiley").."")
parse("spawnitem 68 "..player(id,"tilex").." "..player(id,"tiley").."")
parse("spawnitem 68 "..player(id,"tilex").." "..player(id,"tiley").."")
parse("spawnitem 68 "..player(id,"tilex").." "..player(id,"tiley").."")
parse("spawnitem 68 "..player(id,"tilex").." "..player(id,"tiley").."")
parse("spawnitem 68 "..player(id,"tilex").." "..player(id,"tiley").."")
parse("spawnitem 68 "..player(id,"tilex").." "..player(id,"tiley").."")
parse("spawnitem 68 "..player(id,"tilex").." "..player(id,"tiley").."")
parse("spawnitem 68 "..player(id,"tilex").." "..player(id,"tiley").."")
parse("spawnitem 68 "..player(id,"tilex").." "..player(id,"tiley").."")
parse("spawnitem 68 "..player(id,"tilex").." "..player(id,"tiley").."")
parse("setmoney "..id.." "..player(id,"money")-16000)
end
end
end
addhook("join","bank_join")
addhook("menu","bank_menu")
addhook("serveraction","bank_serveraction")
function array(m)
local array = {}
for i = 1, m do
array[i] = 0
end
return array
end
bank_money_player = array(32)
bank_table = {100,200,500,1000,2000,5000,10000,16000}
function bank_join(p)
bank_money_player[p] = 0
end
function bank_serveraction(p)
menu(p,"Bank Menu (Your Cash: "..bank_money_player[p].."),Add Cash To Bank,Take Cash From Bank")
end
function bank_cash_add(p)
menu(p,"Add Cash To Bank? (Bank: "..bank_money_player[p].."),$100,$200,$500,$1000,$2000,$5000,$10000,$16000")
end
function bank_cash_take(p)
menu(p,"Take Cash From Bank? (Bank: "..bank_money_player[p].."),$100,$200,$500,$1000,$2000,$5000,$10000,$16000")
end
function bank_menu(p,t,s)
if ("Bank Menu" == string.sub(t, 1, 9)) then
if (s == 1) then
bank_cash_add(p)
elseif (s == 2) then
bank_cash_take(p)
end
end
if ("Add" == string.sub(t, 1, 3)) then
if (bank_table[s] < player(p,"money")) then
bank_money_player[p] = bank_money_player[p] + bank_table[s]
parse('setmoney '..p..' '..player(p,"money") - bank_table[s])
msg2(p,'©000255000You Added '..bank_table[s]..'$ To Bank!@C')
bank_cash_add(p)
else
msg2(p,'©255000000You Added '..player(p,"money")..'$ To Bank!@C')
msg2(p,'©255000000You Dont Have More Money To Add!@C')
bank_money_player[p] = bank_money_player[p] + player(p,"money")
parse('setmoney '..p..' 0')
end
end
if ("Take" == string.sub(t, 1, 4)) then
if (bank_money_player[p] > 0) then
if (player(p,"money") + bank_table[s] < 16001) then
bank_money_player[p] = bank_money_player[p] - bank_table[s]
parse('setmoney '..p..' '..player(p,"money") + bank_table[s])
msg2(p,'©000255000You Took '..bank_table[s]..'$ From Bank!@C')
bank_cash_take(p)
else
msg2(p,'©255000000You Cant Have More Than 16000$ In Hand!@C')
end
else
msg2(p,'©255000000Your Bank Is Empty!@C')
end
end
end
addhook("usebutton","COLA1")
function COLA1(id,x,y)
if x==12 and y==36 then
if player(id, "money")>=49 then
parse("setmoney "..id.." "..player(id, "money")-50)
parse("equip "..id.." 65")
msg2(id, "You buyed a cola!")
else
msg2(id, "Sorry but you do not have enough money. (50$ cost)")
end
end
end
addhook("usebutton","COLA2")
function COLA2(id,x,y)
if x==24 and y==29
if player(id, "money")>=49 then
parse("setmoney "..id.." "..player(id, "money")-50)
parse("equip "..id.." 65")
msg2(id, "You buyed a cola!")
else
msg2(id, "Sorry but you do not have enough money. (50$ cost)")
end
end
end
addhook("usebutton","COLA3")
function COLA3(id,x,y)
if x==39 and y==30 then
if player(id, "money")>=49 then
parse("setmoney "..id.." "..player(id, "money")-50)
parse("equip "..id.." 65")
msg2(id, "You buyed a cola!")
else
msg2(id, "Sorry but you do not have enough money. (50$ cost)")
end
end
end
addhook("usebutton","COLA4")
function COLA4(id,x,y)
if x==56 and y==36 then
if player(id, "money")>=49 then
parse("setmoney "..id.." "..player(id, "money")-50)
parse("equip "..id.." 65")
msg2(id, "You buyed a cola!")
else
msg2(id, "Sorry but you do not have enough money. (50$ cost)")
end
end
end
addhook("usebutton","COLA5")
function COLA5(id,x,y)
if x==66 and y==70 then
if player(id, "money")>=49 then
parse("setmoney "..id.." "..player(id, "money")-50)
parse("equip "..id.." 65")
msg2(id, "You buyed a cola!")
else
msg2(id, "Sorry but you do not have enough money. (50$ cost)")
end
end
end