| Blockland Forums > Modification Help |
| Making a script ban people for a length of time on death. |
| << < (2/2) |
| DrenDran:
--- Quote from: Destiny/Zack0Wack0 on June 21, 2010, 04:12:31 PM --- --- Code: ---package BanOnDeath { function gameConnection::onDeath(%client,%source,%killer,%type,%location) { Parent::onDeath(%client,%source,%killer,%type,%location); ban(%client.BL_ID,10,"DEFEATED"); //banned for 10 minutes } }; activatePackage(BanOnDeath); --- End code --- Something along the lines of this is what you want. --- End quote --- Awesome! |
| Placid:
--- Quote from: Destiny/Zack0Wack0 on June 21, 2010, 04:12:31 PM --- --- Code: ---package BanOnDeath { function gameConnection::onDeath(%client,%source,%killer,%type,%location) { Parent::onDeath(%client,%source,%killer,%type,%location); ban(%client.BL_ID,10,"DEFEATED"); //banned for 10 minutes } }; activatePackage(BanOnDeath); --- End code --- Something along the lines of this is what you want. --- End quote --- add a check for host or no :s |
| Destiny/Zack0Wack0:
You're the one who said not to spoon feed him.. |
| Placid:
--- Quote from: Destiny/Zack0Wack0 on June 21, 2010, 04:57:43 PM ---You're the one who said not to spoon feed him.. --- End quote --- Am I truly spoonfeeding him by giving him a suggestion? |
| DrenDran:
--- Code: --- $banadmins = false; $banondeath = true; function serverCmdtoggledeathban(%client) { if(%client.isSuperAdmin) { $banondeath = !$banondeath; } } function serverCmdbanadminsondeath(%client) { if(%client.isSuperAdmin) { $banadmins = !$banadmins; } } package BanOnDeath { function gameConnection::onDeath(%client,%source,%killer,%type,%location) { if(!((%client.isAdmin && !$banadmins) || %client.isSuperAdmin) && $banondeath) { Parent::onDeath(%client,%source,%killer,%type,%location); ban(%client.BL_ID,10,"DEFEATED"); //banned for 10 minutes } } }; activatePackage(BanOnDeath); --- End code --- Thanks guys. |
| Navigation |
| Message Index |
| Previous page |