Forum

> > CS2D > Scripts > Lua say function reset score
Forums overviewCS2D overview Scripts overviewLog in to reply

English Lua say function reset score

5 replies
To the start Previous 1 Next To the start

old Lua say function reset score

_Ultimate_
User Off Offline

Quote
Hey all i truyed to make my first lua today but it does not work please help

1
2
3
4
5
6
7
8
9
10
addhook("say", "sayfunction")

function sayfunction(id, txt)
if(txt=="!resetscore") then
parse("setscore  "..id.." 0"
parse("setdeaths "..id.." 0"
msg("You have RESETED SCORE"
return 1
end
end

and if some body has time can he explain me where is the error ty

old Re: Lua say function reset score

JONY
User Off Offline

Quote
you forgot to close the brackets
addhook("say", "sayfunction")

function sayfunction(id, txt)
if(txt=="!resetscore") then
parse("setscore "..id.." 0")
parse("setdeaths "..id.." 0")
msg("You have RESETED SCORE")
return 1
end
end
To the start Previous 1 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview