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

Actions Script- problem

widnet

Banned User
Joined
Apr 11, 2009
Messages
920
Reaction score
3
Location
Poland/Cracow
Mam problem z skryptem:

ziom = {
[1212] = {stor = 21444, pos = {x=3557 ,y=4887 ,z=6}, text = "Milego pobytu w krainie VIPow"},
[1213] = {stor = 21445, pos = {x=4720 ,y=5178 ,z=6}, text = "Milego pobytu w krainie SUPER VIPow"}
}

function onUse(cid, item, fromPosition, itemEx, toPosition)

if getPlayerStorageValue(cid,ziom.stor) == 1 then
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESC, ziom.text)
doTeleportThing(cid, ziom.pos)
else
doPlayerSendCancel(cid,"Nie możesz tam wejsc.")
end
return true
end

actiionID- 1212 ( na mapie )
w mysql w storage mam 21444 - 1
A jak klikam na to "1212" to pisze mi "Nie możesz tam wejsc."

Co jest nie tak?
 
Code:
local ziom = {
	[1212] = {stor = 21444, pos = {x=3557 ,y=4887 ,z=6}, text = "Milego pobytu w krainie VIPow"},
	[1213] = {stor = 21445, pos = {x=4720 ,y=5178 ,z=6}, text = "Milego pobytu w krainie SUPER VIPow"}
}

function onUse(cid, item, fromPosition, itemEx, toPosition)
	local v = ziom[item.actionid]
	if v and getCreatureStorage(cid, v.stor) == 1 then
		doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, v.text)
		doTeleportThing(cid, v.pos)
	else
		doPlayerSendCancel(cid, 'Nie mozesz tam wejsc.')
	end
	return true
end
 
Back
Top