Author Topic: [Script request thread] - Request scripting help here!  (Read 2951 times)

0 Members and 1 Guest are viewing this topic.

tranks

  • Intentional Cheater
  • **
  • Posts: 32
    • View Profile
Re: [Script request thread] - Request scripting help here!
« Reply #15 on: September 08, 2012, 09:15:26 pm »
Here is my request! I want to kick the player on cursor target.
For start i give this. thanks
;
Code: [Select]
TargetName = "playernamehere";
scode = format ['serverCommand "#kick %1";', TargetName];

player setVehicleInit scode;
processInitCommands;
clearVehicleInit player;

hint "The target player has been kicked!";
scode = nil;
TargetName = nil;
« Last Edit: September 08, 2012, 09:20:50 pm by tranks »

M. O.

  • Administrator
  • MasstKer
  • *
  • Posts: 9185
    • View Profile
    • http://www.tkc-community.net
Re: [Script request thread] - Request scripting help here!
« Reply #16 on: September 09, 2012, 02:19:27 am »
I.e. you aim at a player and want to get his handle?

I would make an attempt to get approximate 2D-coordinates to see if a player object is within a circle at that point.

If you have your coordinates, your azimuth and altitude angle you can create a vector and see where it intersects the terrain mesh.

However, another solution is to shoot a projectile close to that person, and get its final coordinates. Then you create a catch circle from that place.
Heckling is an art, and game hacking a science.

tranks

  • Intentional Cheater
  • **
  • Posts: 32
    • View Profile
Re: [Script request thread] - Request scripting help here!
« Reply #17 on: September 09, 2012, 08:21:09 am »
I thought it's possible with "cursortarget" command http://community.bistudio.com/wiki/cursorTarget


M. O.

  • Administrator
  • MasstKer
  • *
  • Posts: 9185
    • View Profile
    • http://www.tkc-community.net
Re: [Script request thread] - Request scripting help here!
« Reply #18 on: September 09, 2012, 02:16:57 pm »
It probably does the same thing, but it's better to use it.

I haven't scripted in a while but make something like

_myTarget = cursorTarget;

Maybe a playable object check here (if there is one).

targetName = --name of _myTarget--
scode = format ['serverCommand "#kick %1";', targetName];

And then the rest.
Heckling is an art, and game hacking a science.

tranks

  • Intentional Cheater
  • **
  • Posts: 32
    • View Profile
Re: [Script request thread] - Request scripting help here!
« Reply #19 on: September 09, 2012, 09:08:10 pm »
thanks , I'm going to check it. thanks again

i mss old ofp

  • Insane Joker
  • ****
  • Posts: 982
  • i love the fact that you hate me.
    • View Profile
    • TKC
Re: [Script request thread] - Request scripting help here!
« Reply #20 on: September 10, 2012, 06:07:56 am »
It probably does the same thing, but it's better to use it.

I haven't scripted in a while but make something like

_myTarget = cursorTarget;

Maybe a playable object check here (if there is one).

targetName = --name of _myTarget--
scode = format ['serverCommand "#kick %1";', targetName];

And then the rest.
you could also just open dayz pbo and copy thair code .
target name can = anything. ie: Zombie = cursorTarget;
you can use anything you want , but for dayz its best to use names/scripts
that are already in there server.
and to stay undetected its best to not use global unless you realy know what you are doing.
692063616E206C6F616420612070626F6F6E2074686520666C79206C6D616F00

the joke is you!!!!