English !say equip icon

21 comments
23.06.11 03:16:43 am
like 11 like it!
705 b, 515 Downloads
Nicok
User
Offline Off
This is my first lua script.
I hope you like.

the script is say a name of a weapon (example "!aug" or "!deagle") gives the gun mentioned.

×Coins
×Money
×Gold

the names are:
!usp=USP
!glock=Glock
!deagle=Deagle
!p228=P228
!elite=elite
!fiv-sev=Five-Seven
!m3=M3
!xm1014=XM1014
!mp5=MP5
!tpm=TMP
!p90=P90
!mac=Mac 10
!ump45=UMP45
!ak=AK-47
!sg552=SG552
!m4=M4A1
!aug=AUG
!scout=Scout
!awp=AWP
!g3sg1=G3SG1
!sg550=SG550
!galil=Galil
!famas=Famas
!m249=M249
!tactical=Tactical Shield
!laser=Laser
!flame=FlameThrower
!rpg=RPG Launcher
!rocket=Rocket Launcher
!granade=Grenade Launcher
!he=HE
!flash=FlashBang
!smoke=SmokeGrenade
!flare=Flare
!defuse=Defuse Kit
!kevlar=Kevlar
!kevlar+=Kevlar+Helm
!night=Night Vision
!primary=Primary Ammo
!secundary=Secundary Ammo
!medikit=Medikit
!bendage=Bendage
!machete=Machete
!gas=Gas Grenade
!molotov=Molotov Cocktail
!wrench=Wrench
!snowball=Snowball
!air=Air Strike
!mine=Mine
!claw=Claw
!light=Light Armor
!armor=Armor
!heavy=Heavy Armor
!medic=Medic Armor
!super=Super Armor
!stealth=Stealth Suit
!chainsaw=ChainSaw
!gut=Gut Bomb
!laserm=Laser Mine
!portal=PortalGun

∗Have Fun!!!
imageimageimageimageimage
edited 2×, last 23.06.11 07:15:26 pm
ok This file has been reviewed and approved by Sparty (04.12.15 10:25:10 am)

Comments

21 comments
Goto Page
To the start Previous 1 2 Next To the start

Log in!

You need to log in to be able to write comments!Log in
30.12.11 01:47:08 pm
like I like it!
Up
KOMENDANT
User
Offline Off
I not understand! How it works?

WoW! I understand! 10/5!!! It's cool!
edited 1×, last 30.12.11 01:58:53 pm
20.11.11 08:53:16 pm
like I like it!
Up
sheeL
User
Offline Off
Good script
19.07.11 07:09:07 am
Up
Apache uwu
User
Offline Off
@nicok, optimized code.

Code:
1
2
3
4
5
6
7
8
9
10
11
wep={}                                                                                               
for i = 1,89 do                                                                                       
     wep[i]=string.lower(itemtype(i,"name"))
end

addhook("say","equip")
function equip(id,text)
     if string.sub(string.lower(text),2)==wep[i] then                                   
          parse("equip "..id.." "..i.."")                     
     end
end
18.07.11 12:42:58 am
Up
Nicok
User
Offline Off
This is the new !say equip. Is shorter than the last LOL.
Only says: [!] + Name [full] of the weapon. Example !rpg launcher.

Code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
wep = {}                                                   
i = 0                                                        
while (i < 88) do                                         
i = i + 1                                                   
wep[i] = "!"..string.lower(itemtype(i,"name")).."" 
end

addhook("say","equip")
function equip(id,text)
text = string.lower(text)                                    
i = 0                                                        
while (i < 88) do                                         
i = i + 1                                                  
if text == wep[i] then                                   
parse("equip "..id.." "..i.."")                     
end
end
end


Thank you very much to user EnderCrypt
edited 1×, last 18.07.11 01:02:43 am
17.07.11 06:25:11 pm
like I like it!
Up
Mantasz
User
Offline Off
Simple, but verry good
17.07.11 06:19:00 pm
like I like it!
Up
Spartan2D
User
Offline Off
add this:
!AWESOME 5/5
30.06.11 01:36:42 am
like I like it!
Up
Itibere10
User
Offline Off
nice work man! is une big work and a big inventory!
this is amazing!
27.06.11 03:46:42 am
like I like it!
Up
walter ivan
User
Offline Off
good job create more luas plss
24.06.11 08:19:28 am
Up
biohzrd
User
Offline Off
i'm rate 2/5 , use please FULL names of weapons !!
what is fiv-sev?? tactical?? more simple five-seven and shield (laserm?? mb lm?)
23.06.11 07:51:11 pm
like I like it!
Up
Sebax
User
Offline Off
LOL,this is awesome lua,i download it.
23.06.11 06:14:38 pm
like I like it!
Up
itsoxymoron
User
Offline Off
Yeah,you see,..
oh niko,dont use it translator,..no se entiende ni J, lol
23.06.11 06:03:11 pm
Up
Nicok
User
Offline Off
not steal the idea for the lua script. which he had not even a sap like that.
and what he says is correct @Aizajar not resemble the luas.

forgive, but my English is bad... lol
23.06.11 05:12:52 pm
Up
Vetle
BANNED
Offline Off
Great for uber nubnubs, lol.
23.06.11 05:11:05 pm
like I like it!
Up
itsoxymoron
User
Offline Off
user ArChaLV

Look at the niko's code

Code:
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
addhook("say","equip")
function equip(id,env)
if (env=="!usp") then
parse("equip "..id.." 1")
end
if (env=="!glock") then
parse("equip "..id.." 2")
end
if (env=="!deagle") then
parse("equip "..id.." 3")
end
if (env=="!p228") then
parse("equip "..id.." 4")
end
if (env=="!elite") then
parse("equip "..id.." 5")
end
if (env=="!fiv-sev") then
parse("equip "..id.." 6")
end
if (env=="!m3") then
parse("equip "..id.." 10")
end
if (env=="!xm1014") then
parse("equip "..id.." 11")
end
if (env=="!mp5") then
parse("equip "..id.." 20")
end
if (env=="!tpm") then
parse("equip "..id.." 21")
end
if (env=="!p90") then
parse("equip "..id.." 22")
end
if (env=="!mac") then
parse("equip "..id.." 23")
end
if (env=="!ump45") then
parse("equip "..id.." 24")
end
if (env=="!ak") then
parse("equip "..id.." 30")
end
if (env=="!sg552") then
parse("equip "..id.." 31")
end
if (env=="!m4") then
parse("equip "..id.." 32")
end
if (env=="!aug") then
parse("equip "..id.." 33")
end
if (env=="!scout") then
parse("equip "..id.." 34")
end
if (env=="!awp") then
parse("equip "..id.." 35")
end
if (env=="!g3sg1") then
parse("equip "..id.." 36")
end
if (env=="!sg550") then
parse("equip "..id.." 37")
end
if (env=="!galil") then
parse("equip "..id.." 38")
end
if (env=="!famas") then
parse("equip "..id.." 39")
end
if (env=="!m249") then
parse("equip "..id.." 40")
end
if (env=="!tactical") then
parse("equip "..id.." 41")
end
if (env=="!laser") then
parse("equip "..id.." 45")
end
if (env=="!flame") then
parse("equip "..id.." 46")
end
if (env=="!rpg") then
parse("equip "..id.." 47")
end
if (env=="!rocket") then
parse("equip "..id.." 48")
end
if (env=="!granade") then
parse("equip "..id.." 49")
end
if (env=="!he") then
parse("equip "..id.." 51")
end
if (env=="!flash") then
parse("equip "..id.." 52")
end
if (env=="!smoke") then
parse("equip "..id.." 53")
end
if (env=="!flare") then
parse("equip "..id.." 54")
end
if (env=="!defuse") then
parse("equip "..id.." 56")
end
if (env=="!kevlar") then
parse("equip "..id.." 57")
end
if (env=="!kevlar+") then
parse("equip "..id.." 58")
end
if (env=="!night") then
parse("equip "..id.." 59")
end
if (env=="!primary") then
parse("equip "..id.." 61")
end
if (env=="!secundary") then
parse("equip "..id.." 62")
end
if (env=="!medikit") then
parse("equip "..id.." 64")
end
if (env=="!bendage") then
parse("equip "..id.." 65")
end
if (env=="!machete") then
parse("equip "..id.." 69")
end
if (env=="!gas") then
parse("equip "..id.." 72")
end
if (env=="!molotov") then
parse("equip "..id.." 73")
end
if (env=="!wrench") then
parse("equip "..id.." 74")
end
if (env=="!snowball") then
parse("equip "..id.." 75")
end
if (env=="!air") then
parse("equip "..id.." 76")
end
if (env=="!mine") then
parse("equip "..id.." 77")
end
if (env=="!claw") then
parse("equip "..id.." 78")
end
if (env=="!light") then
parse("equip "..id.." 79")
end
if (env=="!armor") then
parse("equip "..id.." 80")
end
if (env=="!heavy") then
parse("equip "..id.." 81")
end
if (env=="!medic") then
parse("equip "..id.." 82")
end
if (env=="!super") then
parse("equip "..id.." 83")
end
if (env=="!stealth") then
parse("equip "..id.." 84")
end
if (env=="!chainsaw") then
parse("equip "..id.." 85")
end
if (env=="!gut") then
parse("equip "..id.." 86")
end
if (env=="!laserm") then
parse("equip "..id.." 87")
end
if (env=="!portal") then
parse("equip "..id.." 88")
end
end


now look

the other "stolen" script that you say

Code:
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
point.sayfuncs={}
addhook("say","point.sayfuncs.say")
function point.sayfuncs.say(p,txt)
if (txt=="!usp") then parse("equip "..p.." 1"); return 1 end
if (txt=="!glock") then parse("equip "..p.." 2"); return 1 end
if (txt=="!deagle") then parse("equip "..p.." 3"); return 1 end
if (txt=="!p228") then parse("equip "..p.." 4"); return 1 end
if (txt=="!elite") then parse("equip "..p.." 5"); return 1 end
if (txt=="!fiveseven") then parse("equip "..p.." 6"); return 1 end
if (txt=="!m3") then parse("equip "..p.." 10"); return 1 end
if (txt=="!xm1014") then parse("equip "..p.." 11"); return 1 end
if (txt=="!mp5") then parse("equip "..p.." 20"); return 1 end
if (txt=="!tmp") then parse("equip "..p.." 21"); return 1 end
if (txt=="!p90") then parse("equip "..p.." 22"); return 1 end
if (txt=="!mac10") then parse("equip "..p.." 23"); return 1 end
if (txt=="!ump45") then parse("equip "..p.." 24"); return 1 end
if (txt=="!ak47") then parse("equip "..p.." 30"); return 1 end
if (txt=="!sg552") then parse("equip "..p.." 31"); return 1 end
if (txt=="!m4a1") then parse("equip "..p.." 32"); return 1 end
if (txt=="!aug") then parse("equip "..p.." 33"); return 1 end
if (txt=="!scout") then parse("equip "..p.." 34"); return 1 end
if (txt=="!awp") then parse("equip "..p.." 35"); return 1 end
if (txt=="!g3sg1") then parse("equip "..p.." 36"); return 1 end
if (txt=="!sg550") then parse("equip "..p.." 37"); return 1 end
if (txt=="!galil") then parse("equip "..p.." 38"); return 1 end
if (txt=="!famas") then parse("equip "..p.." 39"); return 1 end
if (txt=="!m249") then parse("equip "..p.." 40"); return 1 end
if (txt=="!tactical") then parse("equip "..p.." 41"); return 1 end
if (txt=="!flame") then parse("equip "..p.." 46"); return 1 end
if (txt=="!rpg") then parse("equip "..p.." 47"); return 1 end
if (txt=="!rocket") then parse("equip "..p.." 48"); return 1 end
if (txt=="!launcher") then parse("equip "..p.." 49"); return 1 end
if (txt=="!he") then parse("equip "..p.." 51"); return 1 end
if (txt=="!flash") then parse("equip "..p.." 52"); return 1 end
if (txt=="!smoke") then parse("equip "..p.." 53"); return 1 end
if (txt=="!flare") then parse("equip "..p.." 54"); return 1 end
if (txt=="!laserm") then parse("equip "..p.." 87"); return 1 end
if (txt=="!medica") then parse("equip "..p.." 82"); return 1 end
if (txt=="!portal") then parse("equip "..p.." 88"); return 1 end
if (txt=="!speed20") then parse("speedmod "..p.." 20"); return 1 end
if (txt=="!heal") then parse("equip "..p.." 64"); return 1 end
end

-- Projectile --

addhook("projectile","point.pro")
function point.pro(id,weapon,x,y)
if (weapon==53) then
parse("setweapon "..id.." 53")
parse("setpos "..id.." "..x.." "..y.."")
end
end

-- Spawn --

addhook("spawn","point.spawn")
function point.spawn(id)
parse("equip "..id.." 53")
end

-- Msg --

addhook("minute","point.msg")
function point.msg(id)
msg("Simply Lite Script v.1")
msg("Made by Hund <3")
end


it's not the same! -.-
try to find the difference before!
too easy rate 1/5 to people if you dont download the script
23.06.11 04:40:26 pm
like I like it!
Up
kkkkkkk
User
Offline Off
good like first lua script 3/5
+1 only becouse first 4/5
23.06.11 11:36:55 am
Up
ArChaLV
User
Offline Off
STOLEN SCRIPT

http://unrealsoftware.de/files_show.php?file=1454

just added two weapons that all!

@nicok: it's easy to steal for beginners and hard to make scripts for beginners ! so don't steal enymore
23.06.11 09:37:00 am
like I like it!
Up
EP
User
Offline Off
That's a great script for noobs player (no me :_D)
Muy bien nico jeje,pense que iba a ser una mierda lol.
23.06.11 07:39:58 am
Up
Banaan
User
Offline Off
Eww this code is way too resource intensive for what you want to achieve.

What it does is that it checks, for every single thing that is said, 62 times if the said thing possible equals a certain string.

rather use elseif, for it will stop checking once it has found a match. And only start checking if the first character of the said text is an exclamation mark (!)

Code:
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
dofile("sys/lua/weapons.lua") -- This contains a table of all weapon id's with matching names, and the other way around. Too lazy to look it up and too large to post here though.

addhook("say", "SayEquip") -- just "equip" will give trouble when wrapper is enabled

function SayEquip(p, t)
     if t:sub(1,1)=="!" then -- Check for the first character
          local w = t:sub(2):lower()
          if WNameToID[w]~=nil then -- Check if the string after the !, converted to lowercase (for those who accidentally have caps lock on) is present in the table WNameToID
               parse("equip " .. p .. WNameToID[w])
          end
     end
end



--[[

WNameToID looks something like this:

WNameToID = {
     "usp" = 1,
     "glock" = 2,
     "deagle" = 3,
     etc.
}
23.06.11 03:51:35 am
like I like it!
Up
itsoxymoron
User
Offline Off
Bien Niko!,i going to use it in my server
23.06.11 03:43:23 am
Up
dizziness
User
Offline Off
Nice job for your first lua script, nicok
To the start Previous 1 2 Next To the start