What's new

Talkactions Komenda afk !

Status
Not open for further replies.

vegetroex

Active User
Joined
Dec 14, 2012
Messages
78
Reaction score
2
[SQL][/SQL]To jest komenda na afk czyli !afk on i !afk off

local time = 5 -- 1 = 1 sec, 2 = 2 sec, ...

local say_events = {}
local function SayText(cid)
if isPlayer(cid) == TRUE then
if say_events[getPlayerGUID(cid)] ~= nil then
if isPlayer(cid) == TRUE then
doSendAnimatedText(getPlayerPosition(cid),"Nieobecny!", math.random(01,255))
end
say_events[getPlayerGUID(cid)] = addEvent(SayText, time * 1000 / 2, cid)
end
end
return TRUE
end
function onSay(cid, words, param, channel)
if(param == '') then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Utilize '!afk on' join '! afk off ", to Segregate.")
return true
end
if param == "on" then
if isPlayer(cid) == TRUE then
doSendAnimatedText(getPlayerPosition(cid),"Nieobecny!", math.random(01,255))
end
say_events[getPlayerGUID(cid)] = addEvent(SayText, time * 1000, cid)
doPlayerSendTextMessage(cid,MESSAGE_STATUS_WARNING,"You are in 'Afk mode'.")
elseif param == "off" then
stopEvent(say_events[getPlayerGUID(cid)])
say_events[getPlayerGUID(cid)] = nil
doPlayerSendTextMessage(cid,MESSAGE_STATUS_WARNING,"You are know in afk mode'.")
end
return TRUE
end
--[[
local function hora ()
if isPlayer(cid) == TRUE then
doPlayerSendCancel(cid,"S\ão: "..os.date("%X")..".")
addEvent(hora, 1000)
end
end
]][SQL][/SQL]
 

Gandhi

Active User
Joined
Aug 7, 2013
Messages
80
Reaction score
19
Odp: Komenda afk !

xd nie wiem, co mi si? uwali?o, ale my?la?em, ?e on pyta jak ten skrypt dzia?a. Tak to jest z samego rana. w

Co do tematu, to dobrze by by?o skrypt w znaczniki code wstawi?.
 
Status
Not open for further replies.
Top