Is there a way to see if a player is a specific id?
if true, exec some script..?
Thanks
not without doing a mod and i believe you need coc network services also
***********************************************************
what you can do is the following
a killed eventhandler returns 2 elements of an array
a) the victim
b) the shooter
If you attach a killed eventhandler to every player, then every time a player is killed, you can start up a system to check who killed him and punish the culprit when you want
slight problem is that a "killed" event handler only runs a script on the machine that the player is using, so you have to create a system that will allow another machine to know that he is the shooter
what you need is the following
Init.sqsplayer addEventHandler ["killed", {_this exec "killed.sqs"}]
shooter = objnull
? (local Player): [] exec "monitor.sqs"
killed.sqs#START
_victim = _this select 0
_shooter = _this select 1
?(_shooter == _victim): exit
?(side _shooter != side _victim): exit
shooter = _shooter; publicvariable "shooter"
exit
the above script will broadcast the variable "Shooter" to every machine when someone has been killed by a teamate
now the receiving clients need the following to activate the system
Monitor.sqs#PRESTART
teamkills = 0
#START
~0.5
? (player in crew shooter): goto "PUNISH"
shooter = objnull
goto "START"
#PUNISH
teamkills = teamkills + 1
;;;; when the number of teamkills is greater than 4 the player will be punished
?(teamkills <4): goto "START
enableradio false
removeallweapons player
[player] join grpnull
titlecut ["You are being punished for poor play","black in",0.1]
;;; create a marker called "Punishzone" on a small island out of the playing area
player Setpos (getmarkerpos "punishzone")
disableuserinput true
~5
titletext[format["We dont accept that form of gameplay\n\n It spoils others enjoyment",name Player],"PLAIN"]
~5
titletext[format["Enjoy this period of darkness\n\n and take the time to reflect on your behaviour"],"PLAIN"]
exit
***************************************************************
NB>>>> OFP Bugif you use disableuserinput true
you cannot guarantee to reinitiate the users keyboard with disableuserinput false
so only use it as a definite punishment with no return to normal play