Files

> > CS2D > Lua Scripts > Hats Mod
Files overviewCS2D overviewLua Scripts overview

English Hats Mod >

58 comments4 kb, 3,071 Downloads

old Hats Mod

RyceR
User Off Offline

===> Hats Mod <===
> Small mod by RyceR
Here is commands:
!phoenix
!corner
!helmet
!spikes
!tyrans
!nohat

Have Fun
edited 1×, last 27.09.10 08:30:14 pm
Approved by Yates

Download Download

4 kb, 3,071 Downloads

Comments

58 comments
Page
To the start Previous 1 2 3 Next To the start

Log in!

You need to log in to be able to write comments!Log in

old

Nahuelpet
User Off Offline

Good Scrip but you can make it better , make a menu , or add more hats
I like it!

old

stealth_killer
User Off Offline

hey 1 time i putted a hat then i wirte !nohat and the hat dint disapear ??? i think that is a bug
I like it!

old

Metalious
User Off Offline

wow nice! but idk how to wear the helmet and its not working x_x
I like it!

old HaLuK

qHaZi
User Off Offline

yes good.but should be better ; )
I like it!

old

hantor
User Off Offline

is good why? hats :6hats equip
I like it!

old

zwinky207
User Off Offline

Dosent work for me please help me!!!

old

Robotic-Brain
User Off Offline

Good script but it probably won't work with other scripts
here is the updated version:

local imgArray={}

for i=1, 32 do
     imgArray[i]=0
end

addhook("say","say_hat")
function say_hat(id,txt)
     if (txt=="!helmet") then
          if(imgArray[id]~=0 and imgArray[id]~=nil) then freeimage(imgArray[id]) end
          imgArray[id]=image("gfx/hats/helmet.bmp",1,1,200+id)
     end
     if (txt=="!spikes") then
          if(imgArray[id]~=0 and imgArray[id]~=nil) then freeimage(imgArray[id]) end
          imgArray[id]=image("gfx/hats/spikes.png",1,1,200+id)
     end
     if (txt=="!phoenix") then
          if(imgArray[id]~=0 and imgArray[id]~=nil) then freeimage(imgArray[id]) end
          imgArray[id]=image("gfx/hats/phoenix.png",1,1,200+id)
     end
     if (txt=="!corner") then
          if(imgArray[id]~=0 and imgArray[id]~=nil) then freeimage(imgArray[id]) end
          imgArray[id]=image("gfx/hats/wing5.bmp",1,1,200+id)
     end
     if (txt=="!nohat") then
          if(imgArray[id]~=0 and imgArray[id]~=nil) then freeimage(imgArray[id]) end
     end
     if (txt=="!tyrans") then
          if(imgArray[id]~=0 and imgArray[id]~=nil) then freeimage(imgArray[id]) end
          imgArray[id]=image("gfx/hats/tyrans.bmp",1,1,200+id)
     end
end
I like it!

old

hun
User Off Offline

MS Paint or Adobe Photoshop.

old

Crash13
User Off Offline

What program do you use to make hats? Good hats

old

PbBOKAN
User Off Offline

just add return 1, like:
if (txt=="!spikes") then
freeimage(id)
id=image("gfx/hats/spikes.png",1,1,200+id)
parse("speedmod "..id.." -100")
timer(1000,"parse","speedmod "..id.." 0")
     return 1
end
I like it!

old

Mechanolith
User Off Offline

I love and use it, it's so simple, and fun
How can i make the message like: !spike don't appears? Only the hat, and the return value be nil (i think it's that)
Like, i type: !spike
and the helmet appears, without the message on the chat.
I like it!

old

RyceR
User Off Offline

@furkangoktas why you spam your file here?!
P.S: I dont do double-post, furkangoktas post is removed and my post is near my old post
edited 3×, last 26.12.10 04:08:54 pm

old

RyceR
User Off Offline

@PbBOKAN This mode is from CS2D 1.1.6 and it can have some bugs... Ok, I will fix and re-upload it.

old

PeterToman
COMMUNITY BANNED Off Offline

Off topic: the first and second maps on pictures are Banaan's map for Fruitpapje >'<
I think I saw it somewhere...
I like it!

old Solved

PbBOKAN
User Off Offline

There is bug, what ever hat you choose only player with ID=1 will have it. Soo here is fixed all(including !nohat)
addhook("say","say_hat")
function say_hat(id,txt)
     if (txt=="!helmet") then
     freeimage(id)
id=image("gfx/hats/helmet.bmp",1,1,200+id)
          parse("speedmod "..id.." -100")
          timer(1000,"parse","speedmod "..id.." 0")
          end
     if (txt=="!spikes") then
     freeimage(id)
     id=image("gfx/hats/spikes.png",1,1,200+id)
          parse("speedmod "..id.." -100")
          timer(1000,"parse","speedmod "..id.." 0")
          end
     if (txt=="!phoenix") then
     freeimage(id)
     id=image("gfx/hats/phoenix.png",1,1,200+id)
          parse("speedmod "..id.." -100")
          timer(1000,"parse","speedmod "..id.." 0")
          end
     if (txt=="!corner") then
     freeimage(id)
     id=image("gfx/hats/wing5.bmp",1,1,200+id)
          parse("speedmod "..id.." -100")
          timer(1000,"parse","speedmod "..id.." 0")
          end
     if (txt=="!nohat") then
     freeimage(id)
          end
     if (txt=="!tyrans") then
     freeimage(id)
     id=image("gfx/hats/tyrans.bmp",1,1,200+id)
          parse("speedmod "..id.." -100")
          timer(1000,"parse","speedmod "..id.." 0")
          end
     end

I even added timer so when you change hat you will stay still for a second.
I like it!

old

ManuCrazy
User Off Offline

hi RyceR
I loved your script
I edited it to put on my server
I always use your script, because I find it very funny
there is only one problem
function !nohat not working
I would ask you to see this
Thanks

Signed ManuCrazy
I like it!

old

ihtizar
User Off Offline

its okay ...(min. 20 chars)!
edited 1×, last 04.11.10 04:19:53 pm

old

ManuCrazy
User Off Offline

I Really Liked
Make more more more
I like it!

old

Danikah
User Off Offline

Needs moar comments with the following words:
"EPIC" "AWESOME" "EPIC & AWESOME" "GOOD" "REALLY GOOD"

Also, can I have a permission to modify it? I'll give credit.
I like it!
To the start Previous 1 2 3 Next To the start