• 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!
  • New resources must be posted under Resources tab. A discussion thread will be created automatically, you can't open threads manually anymore.

TalkAction What is Wrong?

Yony

New Member
Joined
Sep 7, 2007
Messages
318
Reaction score
0
Location
Israel
PHP:
function onSay(cid, words, param)
	local cities = 
    {
        ["wall"] = { x=983, y=1007, z=7},
        ["wall2"] = { x=1009, y=1060, z=7},
        ["pvp"] = { x=1009, y=1092, z=7}
    }
		-- example
		-- ["NAME OF CITY"] = {x=POSITION X, y=POSITION Y, z=POSITION Z} 		
		if isPlayer(cid) == TRUE then
		doTeleportThing(cid,cities.param, TRUE)
		end
					return 1

end
 
Last edited:
Try..
Lua:
function onSay(cid, words, param)
    local cities = 
    {
        ["wall"] = { x=983, y=1007, z=7},
        ["wall2"] = { x=1009, y=1060, z=7},
        ["pvp"] = { x=1009, y=1092, z=7}
    }
        -- example
        -- ["NAME OF CITY"] = {x=POSITION X, y=POSITION Y, z=POSITION Z}         
        if isPlayer(cid) == TRUE then
        doTeleportThing(cid,cities[param], TRUE)
        end
         return 1
end
 
Now console isn't showing bugs.. but the talkaction isn't working

edit: got it to work.. thx! rep~
 
Try this.
Lua:
local cities = 
{
	["wall"] = {x = 983, y = 1007, z = 7}, 
	["wall2"] = {x = 1009, y = 1060, z = 7}, 
	["pvp"] = {x = 1009, y = 1092, z = 7}
}
function onSay(cid, words, param)
	local city = cities[param]
	if(not city) then
		return true
	end
	
	doTeleportThing(cid, city, TRUE)
	return true
end
 
Back
Top Bottom