I have made and re-made this script 20 times, 20 different ways and I cant get this thing to work. The issue is local, global. At this point every single thing works perfect on my PC. When I upload it to the server the version below doesn't work at all. None of it!?
I can not figure out what is going on here. I know its not a that it wont work cause Ive had it working with some bugs.
How it works.....
The player units have a trigger grouped to them set to vehicle present and OnActivation they exec this script.
"ffzone" is a trigger in the mission covering the neutral zone.
"sfwest" is a trigger in the mission covering W spwan.
"sfeast" is a trigger in the mission covering E spawn.
The script is called "noob.sqs"
?(firsttime == 1) : goto "count"
spawnkill = 0
friendlyfire = 0
firsttime = 1
#count
_hit = _this select 0
?(count _this) > 1 : _shooter = _this select 1
?(count _this) > 2 : _damage = _this select 2
?(count _this) > 2 : goto "who"
_hit addeventhandler ["hit",{_this exec "noob.sqs"}]
exit
#who
~.001
?(_shooter == _hit) : exit
?(vehicle player == _shooter) && (_shooter == _hit) : exit
;friendlyfire////////////////////////////////////////////////////////////////////
?(side _shooter == west && side _hit == west ) : _shooterff = ffzone
?(side _hit == west && side _shooter == west) : _hitff = ffzone
?(side _shooter == east && side _hit == east ) : _shooterff = ffzone
?(side _hit == east && side _shooter == east) : _hitff = ffzone
?(_shooter in list _shooterff) : _mesg = format["%1 will be dealt with for shooting Team Mate %2.",name _shooter,name _hit]; goto "punishmentff"
?(_hit in list _hitff) : _mesg = format["%1 will be dealt with for shooting Team Mate %2.",name _shooter,name _hit]; goto "remove"
;spawnfire///////////////////////////////////////////////////////////////////////
?(side _shooter == west) : _shootersf = sfwest
?(side _shooter == east) : _shootersf = sfeast
?(side _shooter == west) : _shooterff = ffzone
?(side _shooter == east) : _shooterff = ffzone
?(side _hit == west) : _hitsf = sfwest
?(side _hit == east) : _hitsf = sfeast
?(side _hit == west) : _hitff = ffzone
?(side _hit == east) : _hitff = ffzone
?(_shooter in list sfwest) : _mesg = format["%1 will be dealt with for shooting %2 from spawn.",name _shooter,name _hit]; goto "punishmentsf"
?(_shooter in list sfeast) : _mesg = format["%1 will be dealt with for shooting %2 from spawn.",name _shooter,name _hit]; goto "punishmentsf"
?(_shooter in list ffzone) : _mesg = format["%1 will be dealt with for shooting %2 in spawn.",name _shooter,name _hit]; goto "punishmentsf"
?(_hit in list sfwest) : _mesg = format["%1 will be dealt with for shooting %2 in spawn.",name _shooter,name _hit]; goto "remove"
?(_hit in list sfeast) : _mesg = format["%1 will be dealt with for shooting %2 in spawn.",name _shooter,name _hit]; goto "remove"
?(_hit in list ffzone) : _mesg = format["%1 will be dealt with for shooting %2 from spawn.",name _shooter,name _hit]; goto "remove"
goto "who"
#remove
_name = name _hit
hint _mesg
exit
#punishmentff
~.1
?(_shooter == Player) : friendlyfire = friendlyfire + 1
~.5
?(_shooter == player) && friendlyfire == 3 : goto "loop1"
?(_shooter == player) && spawnkill + friendlyfire == 3 : goto "loop3"
_name = name _shooter
hint _mesg
_shooter Addscore -10
[_shooter] exec "punishment.sqs"
~1
exit
#punishmentsf
~.1
?(_shooter == Player) : spawnkill = spawnkill + 1
~.5
?(_shooter == player) && spawnkill == 3 : goto "loop2"
?(_shooter == player) && spawnkill + friendlyfire == 3 : goto "loop3"
_name = name _shooter
hint _mesg
_shooter Addscore -10
[_shooter] exec "punishment.sqs"
~1
exit
#loop1
~.5
titletext ["You have shot a Team Mate 3 times.\nYour game is over!","plain",1]
removeallweapons _shooter
_shooter setposasl [(getmarkerPos "die" select 0),(getmarkerPos "die" select 1),1000]
~5
goto "loop1"
#loop2
~.5
titletext ["You have shot someone in, or from spawn 3 times.\nYour game is over!","plain",1]
removeallweapons _shooter
_shooter setposasl [(getmarkerPos "die" select 0),(getmarkerPos "die" select 1),1000]
~5
goto "loop2"
#loop3
~.5
titletext ["You have violated the engagement rules 3 times.\nYour game is over!","plain",1]
removeallweapons _shooter
_shooter setposasl [(getmarkerPos "die" select 0),(getmarkerPos "die" select 1),1000]
~5
goto "loop3"
And this is "punishment.sqs"
?! local player : exit
~.01
titletext ["You have violated the engagement rules.","plain",1]
~.01
removeallweapons player
~.01
player setpos [(getmarkerPos "die" select 0),(getmarkerPos "die" select 1)]
~3
player setvelocity [0, 0, 1000]
~30
titleText ["And here comes your spanking!","plain",1]
~1
exit
I have had this up on the BIS forum for weeks and noone seems to know. Can someone PLEASE! tell me why this doesn't work on a server?