Forum

> > CS2D > Scripts > Need scripts!
ForenübersichtCS2D-Übersicht Scripts-ÜbersichtEinloggen, um zu antworten

Englisch Need scripts!

5 Antworten
Zum Anfang Vorherige 1 Nächste Zum Anfang

alt Re: Need scripts!

Apache uwu
User Off Offline

Zitieren
The IDs for AWP and the Shield are 35 and 41 respectively.

With lua, this would mean parsing some cs2d cmd spawnitem. Note that the coordinates need to be in tiles.

parse("spawnitem 35 25 25")
parse("spawnitem 41 25 26")

alt Re: Need scripts!

brofistmsia
User Off Offline

Zitieren
No, i want the full script, i doesn't know how to make script... How to make script actually?

alt Re: Need scripts!

lucaSWAT
User Off Offline

Zitieren
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
function totable(t,match)
     local cmd = {}
     if not match then
          match = "[^%s]+"
     else
          match = "[^"..match.."]+"
     end
     for word in string.gmatch(t,match) do
          table.insert(cmd,word)
     end
     return cmd
end

addhook("say","_say")
function _say(id,txt)
local p = totable(txt)
local cmd = tostring(p[1])
if cmd:lower() == "!weapons" then -- use !weapons spawn weapon 
xx = player(id,"tiley")
xy = player(id,"tilex")
parse("spawnitem 35 "..xy.." "..xx)
parse("spawnitem 41 "..xy.." "..xx)
return 1
end
if cmd:lower() == "!altoequip" then -- use !weapons equip!
parse("equip "..id.." 35")
parse("equip "..id.." 41")
return 1
end
end
Zum Anfang Vorherige 1 Nächste Zum Anfang
Einloggen, um zu antworten Scripts-ÜbersichtCS2D-ÜbersichtForenübersicht