qwasniak
Advanced User
- Joined
- May 9, 2013
- Messages
- 302
- Reaction score
- 7
No to zaczynamy.
Do Data/Talkactions/Scripts robimy Support.lua, i wklejamy to :
Mozemy tez zmienic ten skrypt, wchodzac w data/xml/groups i wpisujac groupid.
Teraz Talkactions.xml
No to chyba tyle ;P
Do Data/Talkactions/Scripts robimy Support.lua, i wklejamy to :
PHP:
function onSay(cid, words, param, channel)
local Info = db.getResult("SELECT * FROM `players` WHERE `online` = '1' AND `group_id` > 1")
local PlayerString = "Osoby online z administracji:\n"
if Info:getID() ~= -1 then
local count, i = Info:getRows(false), 0
repeat
PlayerString = PlayerString .. Info:getDataString("name") .. " - "
if Info:getDataInt("group_id") == 2 then
PlayerString = PlayerString .. "Helper"
elseif Info:getDataInt("group_id") == 3 then
PlayerString = PlayerString .. "Junior Tutor"
elseif Info:getDataInt("group_id") == 4 then
PlayerString = PlayerString .. "Tutor"
elseif Info:getDataInt("group_id") == 5 then
PlayerString = PlayerString .. "JGM"
elseif Info:getDataInt("group_id") == 6 then
PlayerString = PlayerString .. "GM"
elseif Info:getDataInt("group_id") == 7 then
PlayerString = PlayerString .. "Administrator"
end
PlayerString = PlayerString .. "\n"
until not(Info:next())
Info:free()
else
PlayerString = PlayerString .. "Nikt z administracji nie jest online."
end
doPlayerPopupFYI(cid, PlayerString);
return true
end
Teraz Talkactions.xml
PHP:
<talkaction words="!support" event="script" value="support.lua"/>