0 Members and 1 Guest are viewing this topic.
procedure OnPlayerKill(Killer, Victim: byte;Weapon: string);beginif GetPlayerStat(Victim,'alive') then Writeln('hehe');end;
procedure OnPlayerKill(Killer, Victim: byte;Weapon: string);beginWriteln('hehe');end;
Just a note: I had times which Victim is alive, and victim is dead when OnPlayerKill is called (had something to due with explosions) so it may become of use if you figure out specifically when its true or false.
procedure ChangeProfession(ID,option:byte);beginif GetPlayerStat(ID, 'alive') = false then begin Players[ID].profession := option; WriteConsole(ID,'Your profession has been changed!',$FF001122); endelse begin Players[ID].changeafterdead := true; Players[ID].changeto := option; WriteConsole(ID,'Your profession will be changed at the next respawn',$FF001122);end;end; procedure OnPlayerKill(Killer, Victim: byte;Weapon: string);beginif Players[Victim].changeafterdead = true then beginChangeProfession(ID,Players[ID].changeto);Players[Victim].changeafterdead := false;Players[Victim].changeto := -1;end;end;
Use if GetPlayerStat(ID,'Health') > 0.
Quote from: DorkeyDear on December 24, 2009, 12:39:58 amJust a note: I had times which Victim is alive, and victim is dead when OnPlayerKill is called (had something to due with explosions) so it may become of use if you figure out specifically when its true or false.Very interesting, this may solve my problem with M79/LAW.
...health: -139 Damage: 80health: -400 Damage: 75health: -219 Damage: 80health: -400 Damage: 75health: -400 Damage: 16566health: -400 Damage: 82health: -400 Damage: 292health: -400 Damage: 82health: -400 Damage: 139health: -140 Damage: 80health: -220 Damage: 48health: -400 Damage: 82health: -400 Damage: 18828health: 150 Damage: 600health: -400 Damage: 17908health: 150 Damage: 48health: -400 Damage: 18health: -389 Damage: 23health: -400 Damage: 46health: -400 Damage: 72health: 150 Damage: 50health: 150 Damage: 55health: -400 Damage: 20168health: 150 Damage: 109health: 150 Damage: 126...