| Blockland Forums > Modification Help |
| Death and item detection |
| (1/2) > >> |
| mp7964:
I am trying to do a script that will detect when a player was killed, and if that player was holding an item, mainly for a autokick system i'm doing, how would I do this? |
| jes00:
--- Quote from: jes00 on August 31, 2011, 08:22:04 AM ---Someone should make a script that does the following: * When a player dies it checks if they had an item(or weapon) on hand * If they did not it kicks the person that killed them from the serverThis would stop free killing a little in jail RPs --- End quote --- Lol |
| mp7964:
--- Quote from: jes00 on August 31, 2011, 09:12:31 PM ---Lol --- End quote --- Shaddap. Lol. |
| Placid:
package function GameConnection::onDeath(%client,%obj,%killer,%type,%area). %client will be the client of the person killed, %killer will be the killer. to kick them just delete their client (not to be confused with the player) |
| dUMBELLS:
As for checking whether the player is holding an item, use if(isObject(%client.player.getMountedImage(SLOT))). |
| Navigation |
| Message Index |
| Next page |