What's new

Skull Remover - dziwny b??d w silniku

Status
Not open for further replies.

klapaucius94

Active User
Joined
Oct 31, 2010
Messages
74
Reaction score
0
Mam tfs 0.3.6 i taki oto skrypt na skull remove:
Code:
function onUse(cid, item, frompos, item2, topos)

local zabieraLadunki = "tak"   -- Czy zabiera ladunki runy
local usuwaRedSkulla = "tak"   -- Czy usuwa red skulla
if((getPlayerSkullType(cid) ~= SKULL_RED or usuwaRedSkulla == "tak") or getPlayerSkullType(cid) ~= SKULL_GREEN) then
	doCreatureSetSkullType(cid, SKULL_NONE)
	doPlayerSendTextMessage(cid,MESSAGE_STATUS_CONSOLE_BLUE,"You don't have any skull now.")
	doSendMagicEffect(getPlayerPosition(cid),CONST_ME_MAGIC_RED)
	doRemoveItem(item.uid, 1)
else
	doPlayerSendCancel(cid,"You can't remove red or green skull.")
end
if(zabieraLadunki == "tak") then
	if(item.type > 1) then
		doChangeTypeItem(item.uid, item.type-1)
	else
		doRemoveItem(item.uid,1)
	end
end
end
I co prawda skrypt dzia?a, jednak w silniku wyskakuje taki b??d:
screenwtu.jpg

Czemu? Jak sobie z tym poradzi??
 

Unass

Active User
Joined
Jul 21, 2010
Messages
123
Reaction score
22
Odp: Skull Remover - dziwny b??d w silniku

function onUse(cid, item, frompos, item2, topos)
local zabieraLadunki = "tak" -- Czy zabiera ladunki runy
local usuwaRedSkulla = "tak" -- Czy usuwa red skulla
if((getPlayerSkullType(cid) ~= SKULL_RED or usuwaRedSkulla == "tak") or getPlayerSkullType(cid) ~= SKULL_GREEN) then
doCreatureSetSkullType(cid, SKULL_NONE)
doPlayerSendTextMessage(cid,MESSAGE_STATUS_CONSOLE_BLUE,"You don't have any skull now.")
doSendMagicEffect(getPlayerPosition(cid),CONST_ME_MAGIC_RED)
else
doPlayerSendCancel(cid,"You can't remove red or green skull.")
end
if(zabieraLadunki == "tak") then
if(item.type > 1) then
doChangeTypeItem(item.uid, item.type-1)
else
doRemoveItem(item.uid,1)
end
end
end

sprobuj teraz
 

Hitsugaya

Active User
Joined
Apr 4, 2008
Messages
114
Reaction score
3
Odp: Skull Remover - dziwny b??d w silniku

spr?buj tym :

Code:
function onUse(cid, item, frompos, item2, topos)
		local zabieraLadunki = "tak" -- Czy zabiera ladunki runy
		local usuwaRedSkulla = "tak" -- Czy usuwa red skulla
		if((getPlayerSkullType(cid) ~= SKULL_RED or usuwaRedSkulla == "tak") or getPlayerSkullType(cid) ~= SKULL_GREEN) then
			doCreatureSetSkullType(cid, SKULL_NONE)
			doPlayerSendTextMessage(cid ,MESSAGE_STATUS_CONSOLE_BLUE ,"You don't have any skull now.")
			doSendMagicEffect(getPlayerPosition(cid),CONST_ME_ MAGIC_RED)
		else
			doPlayerSendCancel(cid,"You can't remove red or green skull.")
		end
		if(zabieraLadunki == "tak") then
			if(item.type > 1) then
				doChangeTypeItem(item.uid, item.type-1)
		else
			doRemoveItem(item.uid,1)
		end
	end
end
 
Status
Not open for further replies.
Top