• 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!
  • 2026 staff recruitment is open! Check it out and consider applying!

onDeath - problem

Status
Not open for further replies.

Xadrian

Active Member
Joined
Feb 24, 2008
Messages
905
Reaction score
26
Location
Poland, Stalowa Wola
Witam ponownie.
Mam mały problem z skryptem w creaturescripts, mianowicie w tym skrypcie (którego jeszcze nie skończyłem):
Code:
function onDeath(cid, corpse, lastHitKiller, mostDamageKiller)
print('instrukcja1')
    if(getCreatureName(cid) ~= lastHitKiller) then
    print('instrukcja2')
        if(isPlayer(lastHitKiller)) then
        print('instrukcja3')
            doPlayerBroadcastMessage(cid, ""..getCreatureName(lastHitKiller).." ("..getPlayerLevel(lastHitKiller).." "..getPlayerVocationName(lastHitKiller)..") killed "..getCreatureName(cid).." ("..getPlayerLevel(cid).." "..getPlayerVocationName(cid)..")!")
        end
    end
    return TRUE
end
Skrypt dochodzi tylko do 2 instrukcji. Gdy używałem print(lastHitKiller) skrypt nic nie zwracał..

W silniku nic nie ma, oprócz tych printów w skrypcie:
Code:
[15/09/2009 21:38:11] Xadrian has logged in. //zalogowałem się
[15/09/2009 21:38:12] Noobhar has logged in. //zalogowałem się na noobharze
[15/09/2009 21:38:32] instrukcja1 //tutaj zabiłem xadrian'a, skrypt rozpoczął się
[15/09/2009 21:38:32] instrukcja2
[15/09/2009 21:38:32] Xadrian has logged out. //koniec skryptu
Inne skrypty oparte na onDeath też mi nie działają.
 
Cześć Xadrian.

Jeśli używasz TFS 0.3.5 to zauważ, że ;

function onDeath(cid, corpse, lastHitKiller, mostDamageKiller)

Już nie istnieje, ponieważ player death nie jest już oparte o LUA.
 
Status
Not open for further replies.
Back
Top