Hello, I've made a action script for my server but when i use it the client crash. The script is based when u click on a lever you will get teleported and it will take money from you. It's working good but the client crash. You get teleported but the client gets debug. Here is the script. I hope someone can help me out.
Thank's
Edit: Im using tfs 0.2 8.22 with the newest rev.
Code:
--SCRIPT BY ASHE
function onUse(cid, item, frompos, item2, topos)
crystalCoins = getPlayerItemCount(cid, 2160)
platinumCoins = getPlayerItemCount(cid, 2152)
goldCoins = getPlayerItemCount(cid, 2148)
money = crystalCoins * 10000 + platinumCoins * 100 + goldCoins
if item.uid == 7035 and item.itemid == 1945 and getPlayerLevel(cid) >= 220 and money >= 100000 then
doPlayerRemoveMoney(cid,100000)
playerpos = {x=238, y=223, z=5, stackpos=253}
player = getThingfromPos(playerpos)
nplayerpos = {x=563, y=457, z=7, stackpos=253}
doSendMagicEffect(playerpos,2)
doTeleportThing(cid,nplayerpos)
doSendMagicEffect(nplayerpos,10)
doPlayerSendTextMessage(cid,18,"Welcome to the Forbidden Kingdom!")
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_LBLUE, "Muahuahau I've taken 100k from you!")
else
doPlayerSendCancel(cid,"You need level 220 and have 100k to use this teleport.")
end
return 1
end
Thank's
Edit: Im using tfs 0.2 8.22 with the newest rev.