OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting Multiplayer => Topic started by: Acecool on 14 Mar 2005, 16:22:14
-
Is there a way to get the players ID and auto kick that player, or kill the player?
Since there is one guy that plays Nogville that always is unfair, especially if hes admin (Power hungry).
Thanks.
-
I don't think the admin would be making a "admin-Kickable" devise if it was his server...
Although a voting system would be nice were using the radio you could bring up an RSC voting system that counted the number of yeses versus the number of nos...
-
there are many systems out there for punishing players for say multi tk's etc
the best punishment is to script in a system that places the culprit into a cutscene then disableuserinput him.
he then has to shut down and reboot ofp to sort it out
it would use a combination of hit eventhandlers and publicvariable'ing an object, eg the shooter together with a tk counter or some other form of global variable increment
-
Ok the disableuserinput seems good, using that might be a bit harsh..
Is there a way to see if a player is a specific id?
if true, exec some script..?
Thanks
-
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.sqs
player 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 Bug
if 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
-
Ive got another idea, spawn kill protection :-)
Spawn protection is on, for 30 seconds :-)
if somone kills the player in that time, they get a warning, at 2 they get punished :-)
Already working on this part, thanks for all the ideas