Remove Frag! za pomoc reput!!!!

Status
Zamknięty.

Szpaku17

Advanced User
Zarejestrowany
Dołączył
Sierpień 14, 2008
Posty
313
Liczba reakcji
5
Witam mam problem z frag removerem ot?? gdy go u?yje red skull mi znika, ale po relogu mi sie znowu pojawia!! :(( prosz? o pomoc tfs to 0.4_DEV, pod 8.6
Skrypt wygl?da tak

<?xml version="1.0" encoding="UTF-8"?>
<mod name="Frag Remover" version="1.1" author="Hermes" contact="otland.net" enabled="yes">
<action itemid="9969" event="script"><![CDATA[
local noRemove = {SKULL_WHITE, SKULL_YELLOW}
local playerSkull = getPlayerSkullType(cid)
if isInArray(noRemove, playerSkull) then
doPlayerSendCancel(cid, "You can't remove this type of skull.")
doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF)
return true
elseif playerSkull == SKULL_NONE then
doPlayerSendCancel(cid, "You don't have skull.")
doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF)
return true
else
db.query("UPDATE `killers` SET `unjustified` = 0 WHERE `id` IN (SELECT `kill_id` FROM `player_killers` WHERE `player_id` = " .. getPlayerGUID(cid) .. ")")
doPlayerSendTextMessage(cid, 27, "Your frags & your skull have been removed!")
doSendMagicEffect(getPlayerPosition(cid), CONST_ME_MAGIC_RED)
doSendAnimatedText(getPlayerPosition(cid), "POFF!", 180)
doCreatureSetSkullType(cid,0)
doPlayerSetSkullEnd(cid, 0, playerSkull)
doRemoveItem(item.uid, 1)
end
return true
]]></action>
</mod>
 
Odp: Remove Frag! za pomoc reput!!!!

Spr?buj u?y? tego skryptu do actions:

Zr?b plik w /data/actions/scripts o nazwie frag.lua i wklej to tam:

Kod:
function onUse(cid, item)

local noRemove = {SKULL_WHITE, SKULL_YELLOW}
		local playerSkull = getPlayerSkullType(cid)
		if isInArray(noRemove, playerSkull) then
			doPlayerSendCancel(cid, "You can't remove this type of skull.")
			doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF)
			return true
		elseif playerSkull == SKULL_NONE then
			doPlayerSendCancel(cid, "You don't have skull.")
			doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF)
			return true
		else
			db.executeQuery("UPDATE `killers` SET `unjustified` = 0 WHERE `id` IN (SELECT `kill_id` FROM `player_killers` WHERE `player_id` = " .. getPlayerGUID(cid) .. ")")
			doPlayerSendTextMessage(cid, 27, "Your frags & your skull have been removed!")
			doSendMagicEffect(getPlayerPosition(cid), CONST_ME_MAGIC_RED)
			doSendAnimatedText(getPlayerPosition(cid), "POFF!", 180)
			doCreatureSetSkullType(cid,0)
			doPlayerSetSkullEnd(cid, 0, playerSkull)
			doRemoveItem(item.uid, 1)
		end
		return true

end

teraz do pliku actions.xml dodaj linie:
Kod:
	<action itemid="9969" event="script" value="frag.lua"/>
 
Odp: Remove Frag! za pomoc reput!!!!

W actions mam taki sam problem :(
ale dzi?ki, za to ?e si? starasz za poprawn? pomoc wynagradzam reputem!!
 
Odp: Remove Frag! za pomoc reput!!!!

Mo?e nie bardzo si? znam na tych nowych otsach ale mo?e nie masz takiej tabeli w PhpMyAdmin jak jest wypisana w skrypcie?
I wygl?da?o by to tak jakby nie mia? gdzie zapisa? tego
 
Odp: Remove Frag! za pomoc reput!!!!

Mam tabele killers to chyba ona jest potrzebna tak?;d
 
Status
Zamknięty.
Back
Do góry