Forum

> > CS2D > Scripts > Only hats for a menu
ForenübersichtCS2D-Übersicht Scripts-ÜbersichtEinloggen, um zu antworten

Englisch Only hats for a menu

43 Antworten
Seite
Zum Anfang Vorherige 1 2 3 Nächste Zum Anfang

alt Re: Only hats for a menu

GeoB99
Moderator Off Offline

Zitieren
I don't have so much time currently so at the moment use this piece of code until user Rainoth comes and gives you a better way. Note that you must add
"say"
first in
hats.hooks
table and add this at the nearly end of your code.
1
2
3
4
5
6
7
8
9
10
11
12
function h_say(id, message)
   if string.sub(message, 1, 10) == "!removehat" then
      if hats.player[id] then
         freeimage(hats.player[id])
         hats.player[id] = nil
         msg2(id, "Your hat has been successfully removed!")
      else
         msg2(id, "You don't have any hat!")
      end
   return 1
   end
end

alt Re: Only hats for a menu

Rainoth
Moderator Off Offline

Zitieren
You don't even need that. I already defined a separate function 'removeHat' if you want to remove a hat.
My code in user GeoB99's post contains what you wanted. Check line 67 and line 105. It will remove hat if the player is a terrorist. That's what you asked me for before.
Zum Anfang Vorherige 1 2 3 Nächste Zum Anfang
Einloggen, um zu antworten Scripts-ÜbersichtCS2D-ÜbersichtForenübersicht