Nerks Posted September 19, 2017 Group: Members Topic Count: 22 Topics Per Day: 0.01 Content Count: 135 Reputation: 4 Joined: 07/29/17 Last Seen: December 5, 2017 Share Posted September 19, 2017 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 Quote Link to comment Share on other sites More sharing options...
0 NotKappa Posted September 19, 2017 Group: Members Topic Count: 15 Topics Per Day: 0.00 Content Count: 52 Reputation: 37 Joined: 06/28/13 Last Seen: April 5, 2023 Share Posted September 19, 2017 - script simple -1,{ OnPCKillEvent: .@killer_rid = killerrid; .@killed_rid = killedrid; // do your stuff end; } both of these variables are available in both events Quote Link to comment Share on other sites More sharing options...
0 Nerks Posted September 19, 2017 Group: Members Topic Count: 22 Topics Per Day: 0.01 Content Count: 135 Reputation: 4 Joined: 07/29/17 Last Seen: December 5, 2017 Author Share Posted September 19, 2017 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? Quote Link to comment Share on other sites More sharing options...
0 NotKappa Posted September 19, 2017 Group: Members Topic Count: 15 Topics Per Day: 0.00 Content Count: 52 Reputation: 37 Joined: 06/28/13 Last Seen: April 5, 2023 Share Posted September 19, 2017 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 Quote Link to comment Share on other sites More sharing options...
0 Emistry Posted September 19, 2017 Group: Forum Moderator Topic Count: 93 Topics Per Day: 0.02 Content Count: 10018 Reputation: 2369 Joined: 10/28/11 Last Seen: 23 hours ago Share Posted September 19, 2017 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; Quote Link to comment Share on other sites More sharing options...
0 Nerks Posted September 19, 2017 Group: Members Topic Count: 22 Topics Per Day: 0.01 Content Count: 135 Reputation: 4 Joined: 07/29/17 Last Seen: December 5, 2017 Author Share Posted September 19, 2017 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; Quote Link to comment Share on other sites More sharing options...
0 llchrisll Posted September 20, 2017 Group: Members Topic Count: 12 Topics Per Day: 0.00 Content Count: 626 Reputation: 189 Joined: 11/19/11 Last Seen: March 25 Share Posted September 20, 2017 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) Quote Link to comment Share on other sites More sharing options...
0 Nerks Posted September 21, 2017 Group: Members Topic Count: 22 Topics Per Day: 0.01 Content Count: 135 Reputation: 4 Joined: 07/29/17 Last Seen: December 5, 2017 Author Share Posted September 21, 2017 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? Quote Link to comment Share on other sites More sharing options...
0 llchrisll Posted September 21, 2017 Group: Members Topic Count: 12 Topics Per Day: 0.00 Content Count: 626 Reputation: 189 Joined: 11/19/11 Last Seen: March 25 Share Posted September 21, 2017 Nope because the player who killed someone is already attached to the script. Which means you can call other commands like strcharinfo() and so on Quote Link to comment Share on other sites More sharing options...
0 Nerks Posted September 21, 2017 Group: Members Topic Count: 22 Topics Per Day: 0.01 Content Count: 135 Reputation: 4 Joined: 07/29/17 Last Seen: December 5, 2017 Author Share Posted September 21, 2017 1 hour ago, llchrisll said: Nope because the player who killed someone is already attached to the script. Which means you can call other commands like strcharinfo() and so on @llchrisll @Emistry @NotKappa Thank you for your answers Till next time Quote Link to comment Share on other sites More sharing options...
Question
Nerks
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
Link to comment
Share on other sites
9 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.