• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

I need /makesay commands for tfs 3

quinkan

New Member
Joined
Mar 15, 2009
Messages
125
Reaction score
0
rep++ if you give me /makesay commands for tfs3;)
 
Last edited:
/makesay player,message
PHP:
<talkaction access="5" words="/makesay" event="script" value="makesay.lua"/>
PHP:
function onSay(cid, words, param)
    if(param == "") then
        doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Command param required.")
        return TRUE
    end
    
    local t = string.explode(param, ",")
    doCreatureSay(getPlayerByName(t[1]), t[2])
    return TRUE    
end
 
:thumbup:
/makesay player,message
PHP:
<talkaction access="5" words="/makesay" event="script" value="makesay.lua"/>
PHP:
function onSay(cid, words, param)
    if(param == "") then
        doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Command param required.")
        return TRUE
    end
    
    local t = string.explode(param, ",")
    doCreatureSay(getPlayerByName(t[1]), t[2])
    return TRUE    
end

thank you! but can you tell me how i should type in-game?
 
by lolandus
Code:
function onSay(cid, words, param)
    if getPlayerGroupId(cid) >= 3 then
        if #param > 0 then
            local data = string.explode(param, "|")
            if data[2] ~= nil then
                local player = getPlayerByName(data[1])
                if player ~= FALSE then
                    local talkType = tonumber(data[3])
                    if talkType ~= nil then
                        doCreatureSay(player, data[2], talkType)
                    else
                        warnPlayer(cid, "Please specify a talk type.")
                    end
                else
                    warnPlayer(cid, "Player is not online.")
                end
            else
                warnPlayer(cid, "Please enter a text and a talk type.")
            end
        else
            warnPlayer(cid, "Please enter a name, text and a talk type.")
        end
    else
        doPlayerSendCancel(cid, "You cannot execute this command.")
    end
    return FALSE
end 

function warnPlayer(cid, text)
    doPlayerSendCancel(cid, text)
    doSendMagicEffect(getCreaturePosition(cid), CONST_ME_POFF)
end
execute:
/makeSay quinkan|hello, my name is adolf :D:D|1

use | is smarter because with makr0mango's script u cant write , in text!!

and that last 1 means it say in normal text, u can make he yell, orange text etc!
 
Last edited:
by lolandus
Code:
function onSay(cid, words, param)
    if getPlayerGroupId(cid) >= 3 then
        if #param > 0 then
            local data = string.explode(param, "|")
            if data[2] ~= nil then
                local player = getPlayerByName(data[1])
                if player ~= FALSE then
                    local talkType = tonumber(data[3])
                    if talkType ~= nil then
                        doCreatureSay(player, data[2], talkType)
                    else
                        warnPlayer(cid, "Please specify a talk type.")
                    end
                else
                    warnPlayer(cid, "Player is not online.")
                end
            else
                warnPlayer(cid, "Please enter a text and a talk type.")
            end
        else
            warnPlayer(cid, "Please enter a name, text and a talk type.")
        end
    else
        doPlayerSendCancel(cid, "You cannot execute this command.")
    end
    return FALSE
end

execute:
/makeSay quinkan|hello, my name is adolf :D:D|1

use | is smarter because with makr0mango's script u cant write , in text!!

and that last 1 means it say in normal text, u can make he yell, orange text etc!

warnPlayer? o.0

PHP:
function onSay(cid, words, param)
	local t = string.explode(param, ",")
	local target = getPlayerByNameWildcard(t[1])
	local check = TRUE
	if param == "" then
		doPlayerSendTextMessage(cid, MESSAGE_STATUS_DEFAULT, "You must type a player and some text")
		check = FALSE
	elseif t[1] == nil or t[2] == nil then
		doPlayerSendTextMessage(cid, MESSAGE_STATUS_DEFAULT, "Wrong format, type: /say player,text")
		check = FALSE
	elseif isPlayer(target) == FALSE then
		doPlayerSendTextMessage(cid, MESSAGE_STATUS_DEFAULT, "A player with that name does not exist")
		check = FALSE
	elseif target == FALSE then
		doPlayerSendTextMessage(cid, MESSAGE_STATUS_DEFAULT, "A player with that name is not online")
		check = FALSE
	elseif t[1] == "" then
		doPlayerSendTextMessage(cid, MESSAGE_STATUS_DEFAULT, "You must type a player")
		check = FALSE
	elseif t[2] == "" then
		doPlayerSendTextMessage(cid, MESSAGE_STATUS_DEFAULT, "You must type some text")
		check = FALSE
	end

	if t[3] == nil then
		t[3] = 1
	end

	if check ~= FALSE then
		doCreatureSay(target, t[2], t[3])
		doPlayerSendTextMessage(cid, MESSAGE_STATUS_DEFAULT, t[1].." has said: "..t[2])
	end
	return TRUE
end
 
Back
Top