CS2D
Scripts Say Admin Say Admin
6 replies Please ideas on commands for script. WHERE IS PASTE ???
Comand use Admin
function totable(t,match)
local cmd = {}
if not match then match = "[^%s]+" end
for word in string.gmatch(t, match) do
table.insert(cmd, word)
end
return cmd
end
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
admin = {USGN}
ddhook("say","all_say")
function all_say(id,txt)
for _, usgn in ipairs(admin) do
if player(id,'usgn') == usgn then
local p = totable(txt)
local cmd = tostring(p[1])
local pl = tonumber(p[2])
if cmd == "@elite" then
parse("equip "..pl.." 5")
return 1
elseif cmd == "@m3" then
parse("equip "..pl.." 10")
return 1
elseif cmd == "@laser" then
parse("equip "..pl.." 45")
return 1
elseif cmd == "@flame" then
parse("equip "..pl.." 46")
return 1
elseif cmd == "@rpg" then
parse("equip "..pl.." 47")
return 1
elseif cmd == "@ferramenta" then
parse("equip "..pl.." 74")
return 1
elseif cmd == "@fn" then
parse("equip "..pl.." 91")
return 1
elseif cmd == "@minigun" then
parse("equip "..pl.." 90")
return 1
elseif cmd == "@armor" then
parse("equip "..pl.." 80")
return 1
elseif cmd == "@portal" then
parse("equip "..pl.." 88")
return 1
end
end
end
end Avo User Offline
Code-tags motf, do you use it?
@topic:
There are lots of (even better)scripts posted on forum to equip players by using weapons' names instead of IDs and other. Forum is nice source of knowledge if you search it correctly. You would use some pro admin script, too. but where is paste the folder of the original file which I handed above
pomóżcie polacy Avo User Offline
Pm'ed.
If you have problems to express what you want, just describe it in points. For example:
More I want:
Vips to have some better weapons.
Moderators to have better items than vips.
All items for admins.