Jump to content
  • 0

OnPCKillEvent & OnPCDieEvent:


Question

Posted

Guys question how can i transefer the "killerrid" & "killedrid" to a variable?

 

//*OnPCDieEvent:

This special label triggers when a player dies. The variable 'killerrid'
is set to the ID of the killer.

OnPCKillEvent:

This special label triggers when a player kills another player. The
variable 'killedrid' is set to the ID of the player killed.*//

 

Thanks :)

9 answers to this question

Recommended Posts

  • 0
Posted
7 minutes ago, NotKappa said:

-	script	simple	-1,{
OnPCKillEvent:
	.@killer_rid = killerrid;
	.@killed_rid = killedrid;
    // do your stuff
end;
}

both of these variables are available in both events

One more question.

 

 //*OnPCDieEvent:

This special label triggers when a player dies. The variable 'killerrid'
is set to the ID of the killer.

OnPCKillEvent:

This special label triggers when a player kills another player. The
variable 'killedrid' is set to the ID of the player killed.*// 

Base on my understanding. The label OnPCDieEvent can only use the variable KILLERRID not the KILLEDRID vice versa.

Am i correct? or even your not using OnPCKillEvent you can use the variable KILLEDRID?

  • 0
Posted
8 minutes ago, Nerks said:

One more question.

 


 //*OnPCDieEvent:

This special label triggers when a player dies. The variable 'killerrid'
is set to the ID of the killer.

OnPCKillEvent:

This special label triggers when a player kills another player. The
variable 'killedrid' is set to the ID of the player killed.*// 

Base on my understanding. The label OnPCDieEvent can only use the variable KILLERRID not the KILLEDRID vice versa.

Am i correct? or even your not using OnPCKillEvent you can use the variable KILLEDRID?

well as I said both of the variables are available in both events

killerrid holds the killer ID

and killedrid holds the killed target rid

both killerrid and killedrid are in the events OnPCDieEvent and OnPCKillEvent

  • 0
Posted
OnPCDieEvent:
	.@new_variable_1 = killerrid;
	dispbottom ".@new_variable_1 = " + .@new_variable_1;
	end;

OnPCKillEvent:
	.@new_variable_2 = killedrid;
	dispbottom ".@new_variable_2 = " + .@new_variable_2;
	end;

 

  • 0
Posted
53 minutes ago, NotKappa said:

well as I said both of the variables are available in both events

killerrid holds the killer ID

and killedrid holds the killed target rid

both killerrid and killedrid are in the events OnPCDieEvent and OnPCKillEvent

For clarification.

So i can use both variable even i use OnPCDieEvent only and vice versa?

Right?

 

19 minutes ago, Emistry said:

OnPCDieEvent:
	.@new_variable_1 = killerrid;
	dispbottom ".@new_variable_1 = " + .@new_variable_1;
	end;

OnPCKillEvent:
	.@new_variable_2 = killedrid;
	dispbottom ".@new_variable_2 = " + .@new_variable_2;
	end;

 

can i use this?

OnPCDieEvent:
	.@new_variable_1 = killerrid;
	.@new_variable_2 = killedrid;
	dispbottom ".@new_variable_1 = " + .@new_variable_1;
	dispbottom ".@new_variable_2 = " + .@new_variable_2;
	end;

OnPCKillEvent:
	.@new_variable_1 = killerrid;
	.@new_variable_2 = killedrid;
	dispbottom ".@new_variable_1 = " + .@new_variable_1;
	dispbottom ".@new_variable_2 = " + .@new_variable_2;
	end;
  • 0
Posted

Not directly.

OnPCKillEvent attaches the player which killed someone, while setting the variable  killedrid to the player who died, in case you want to use the rid.

 

OnPCDieEvent attaches the player which died, while setting the variable killerrid to the killer(can be a monster too)

  • 0
Posted
9 hours ago, llchrisll said:

Not directly.

OnPCKillEvent attaches the player which killed someone, while setting the variable  killedrid to the player who died, in case you want to use the rid.

 

OnPCDieEvent attaches the player which died, while setting the variable killerrid to the killer(can be a monster too)

Base on your answer so i can't use the killerrid in OnPCKillEvent label?

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...