Forum

> > CS2D > Scripts > Money Candy Buying :)
ForenübersichtCS2D-Übersicht Scripts-ÜbersichtEinloggen, um zu antworten

Englisch Money Candy Buying :)

2 Antworten
Zum Anfang Vorherige 1 Nächste Zum Anfang

alt Money Candy Buying :)

Precel97
User Off Offline

Zitieren
hi all ! i want ask something about candy script
1
2
3
4
5
6
7
8
9
10
local mon=player(id,"money")
if m=="Shop" then
if b==1 and mon>5000 then
parse("sethealth "..id.." "..player(id,"health")+5)
parse("setmoney "..id.." "..player(id,"money")-5000)
elseif mon<5000 then
msg("©000255255You Don't Have Money To Buy A Candy!")
end
end
end
I want to create script - buying candy but when i have my max health = 100 then hp is not growing but money is lose!
and plz don't say change sethealth to setmaxhealth but i want only hp grow! When i have 100 hp and candy buyed i want to create msg - You have your maximum health and candy is don't need! this is example

plz help

alt Re: Money Candy Buying :)

Yates
Reviewer Off Offline

Zitieren
Well, I don't know anything about lua.
But I must comment on the english, use this instead:

You don't have enough money to buy candy

alt Re: Money Candy Buying :)

Danikah
User Off Offline

Zitieren
1
2
3
4
5
6
7
8
9
10
11
local mon=player(id,"money")
  if m=="Shop" then
    if b==1 and mon>5000 and (player(id,"health")<100) then
      parse("sethealth "..id.." "..player(id,"health")+5)
      parse("setmoney "..id.." "..player(id,"money")-5000)
    elseif mon<5000 then
      msg("©000255255You Don't Have Money To Buy A Candy!")
    elseif (player(id,"health")=100)
      msg("©000255255You don't need a Candy!")
    end
  end
Zum Anfang Vorherige 1 Nächste Zum Anfang
Einloggen, um zu antworten Scripts-ÜbersichtCS2D-ÜbersichtForenübersicht