• 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!

(Script) Help please

fera holy kina

Ubuntu 10.04
Joined
Jan 27, 2009
Messages
192
Reaction score
5
CODE
PHP:
local destinations = {
	["yalahar"] = {p = {x=585, y=676, z=7}, l = 8, c = 100, v = 12345},
	["carlin"] = {p = {x=32360, y=31782, z=7}, l = 8, c = 100, v = 67891},
	["thais"] = {p = {x=32369, y=32241, z=7}, l = 8, c = 100, v = 12345},
	["galaxy"] = {p = {x=31587, y=32820, z=5}, l = 8, c = 100, v = 12345},
	["ethno"] = {p = {x=32028, y=31918, z=7}, l = 8, c = 100, v = 12345},
	["gengia"] = {p = {x=32035, y=32169, z=5}, l = 8, c = 100, v = 12345},
	["sshunt"] = {p = {x=18658, y=18562, z=7}, l = 8, c = 100, v = 12345},
	["hellhoundhunt"] = {p = {x=18822, y=19219, z=7}, l = 8, c = 100, v = 12345},
	["venore"] = {p = {x=32957, y=32076, z=7}, l = 8, c = 100, v = 23456}
}

function onSay(cid, words, param, channel)
	local tp = destinations[param]
	if(param == "") then
		doPlayerSendCancel(cid, "Command param required.")
		return true
	end
	if(getPlayerMoney(cid) < tp.c) then
		doPlayerSendCancel(cid, "Voce Precisa de 300gps Para se teleportar.")
	elseif(getPlayerLevel(cid) < tp.l) then
		doPlayerSendCancel(cid, "Voce precisa estar Lv8 ou acima para se teleportar.")
	elseif(isPlayerPzLocked(cid) == true) then
		doPlayerSendCancel(cid, "Voce precisa estar sem Batle para se teleportar.")
	elseif(getPlayerStorageValue(cid, 20500) < 1) then
		doPlayerSendCancel(cid, "Apenas Players VIP Pode-se teleportar.")
	else
		doPlayerRemoveMoney(cid, tp.c)
		doTeleportThing(cid, tp.p)
		doSendMagicEffect(getCreaturePosition(cid), CONST_ME_TELEPORT)
		doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You have successfully teleported to ".. param ..".")
	end
	return true
end

problem in line 13 and 19
TFS DEV 0.4

error lines

line 13 - function onSay(cid, words, param, channel)
line 19 - if(getPlayerMoney(cid) < tp.c) then

help please
 
Code:
if(getPlayerMoney(cid) < [COLOR="orange"]tp.c[/COLOR]) then
change to
i
Code:
f(getPlayerMoney(cid) < [COLOR="red"]10000[/COLOR]) then

10000 - money needed
 
Back
Top