i have this script for a spar arena and it will not place the bomb on player chats start. and i need help with the disabling weapons when not in spar and re-enabling them when the player says 'start' so they can spar!
here is the script if you could please help me get this script working that would be great thanks
-Joker
PHP Code:
//#CLIENTSIDE
function onCreated() {
setTimer(0.05);
}
function onPlayerChats() {
if (player.chat == "start") {
if (this.sparring.size() == 2) putbomb(0, 31, 35);
}
elseif (player.chat == "join") {
if (this.sparring.size < 3) {
player.x = 30;
player.y = 30;
}
}
}
function onTimeout() {
temp.sparAreaX = 0;
temp.sparAreaY = 0;
temp.sparAreaWidth = 10;
temp.sparAreaHeight = 10
if (player.x in |temp.sparAreaX, temp.sparAreaX + temp.sparAreaWidth|
&& player.y in |temp.sparAreaY, temp.sparAreaY + temp.sparAreaHeight|) {
if (!(player.account in this.sparring)) {
if (this.sparring.size() < 3) {
this.sparring.add(player.account);
}
else {
player.x = 30;
player.y = 30;
}
}
}
else {
if (player.account in this.sparring) this.sparring.remove(player.account);
}
setTimer(0.05);
}