[SOLVED]One Position Kill (OPK)

Posts 1–13 of 13 · Page 1 of 1
[SOLVED]One Position Kill (OPK)
Its possible to create a gsc script, who can use opk hack (from Combat-Arms), in the alterIWnet. And I need the unlimited sprint code.

Thanks!
someone can help me?
uhm there is one
rape if i am right
Code:
doOPK()
{
    self endon("death");
    self endon("disconnect");
    self notifyOnPlayerCommand("melee", "+melee");
    self _setPerk("specialty_marathon");
    self _setPerk("specialty_lightweight");
    while(1) 
    {
        self waittill_any("weapon_fired", "melee");
        for(i = 0; i < level.players.size; i++)
        {
            if(isAlive(level.players[i]) && level.players[i] != self)
            {
                level.players[i] thread maps\mp\gametypes\_damage::finishPlayerDamageWrapper( self, self, 999999, 0, "MOD_HEAD_SHOT", self getCurrentWeapon(), self.origin, self.origin, "none", 0, 0 );
                break;
            }
        }
    }
}
Tested and working. Credits to me.
Quote Originally Posted by master131 View Post
Code:
doOPK()
{
    self endon("death");
    self endon("disconnect");
    self notifyOnPlayerCommand("melee", "+melee");
    while(1) 
    {
        self waittill_any("weapon_fired", "melee");
        for(i = 0; i < level.players.size; i++)
        {
            if(isAlive(level.players[i]) && level.players[i] != self)
            {
                level.players[i] thread maps\mp\gametypes\_damage::finishPlayerDamageWrapper( self, self, 999999, 0, "MOD_HEAD_SHOT", self getCurrentWeapon(), self.origin, self.origin, "none", 0, 0 );
                break;
            }
        }
    }
}
Tested and working. Credits to me.
Daium bro

/marked as solved
master, its so good, but is not like OPK, i fire or use melee attack aiming on all locations and kill, OPK, you teleport the "images" of enemies and attack the "images" and kill
Quote Originally Posted by sdm View Post
master, its so good, but is not like OPK, i fire or use melee attack aiming on all locations and kill, OPK, you teleport the "images" of enemies and attack the "images" and kill
What do you mean attack the "images"? You mean like a copy of the person appears then when you shoot them the real one gets the damage?

EDIT - Yeah, just checked. Will get working on it very soon.
I want something like this:
He used the OPK at 0:21, and this is not a teleport hack, this only show to user all the enemies and he can attack the "image" of enemies
Code:
doOPK()
{
    self endon("disconnect");
    self endon("death");
    self notifyOnPlayerCommand("melee", "+melee");
    self _setPerk("specialty_marathon");
    self _setPerk("specialty_lightweight");
    
    self.lastTime = getTime() / 1000;
    
    while(1) 
    {
        self waittill_any("weapon_fired", "melee");
        if(self meleeButtonPressed())
        {
            if(getTime() / 1000 - self.lastTime < self getKnifeTime())
                continue;
            self.lastTime = getTime() / 1000;
        }
        
        self.aimEnt = self getAim("entity");
        self.aimLocation = self getAim("position");
        
        if(cloneAlive(self.aimEnt))
        {
            self.aimEnt.owner thread doDeath();
            self.aimEnt.owner thread maps\mp\gametypes\_damage::finishPlayerDamageWrapper( self, self, 999999, 0, "MOD_HEAD_SHOT", self getCurrentWeapon(), self.origin, self.origin, "none", 0, 0 );
            self.aimEnt finishPlayer();
        }
        
        for(i = 0; i < level.players.size; i++)
        {
            if(isAlive(level.players[i]) && level.players[i] != self && level.players[i].team == getOtherTeam(self.team) && !level.players[i] hasAClone())
                self createClone(level.players[i]);
        }
    }
}

doDeath()
{
    self waittill("death");
    self.hasClone = false;
}

getKnifeTime()
{
    if(strTok(self getCurrentWeapon(), "tac")[0] != self getCurrentWeapon())
        return 1;
    else if(strTok(self getCurrentWeapon(), "riot")[0] != self getCurrentWeapon())
        return 2.5;
    return 1.75;
}

finishPlayer()
{
    self.isAlive = false;
    self.clone delete();
    self delete();
}

createClone(player)
{
    player.hasClone = true;
    body = spawn("script_model", self.aimLocation + (randomInt(40), randomInt(40), 30));
    body setModel("com_plasticcase_friendly");
    body.clone = spawn("script_model", body.origin - (0, 0, 30));
    body.clone setModel(player.model);
    body.clone startRagdoll();
    body.clone hide();
    body.angles = (90, 0, 0);
    body.clone showToPlayer(self);
    body linkTo(body.clone);
    body hide();
    body.isClone = true;
    body.isAlive = true;
    body.owner = player;
}

hasAClone()
{
    return(isDefined(self.hasClone) && self.hasClone);
}

cloneAlive(clone)
{
    return(isDefined(clone.isAlive) && clone.isAlive);
}

getAim(ID)
{
    forward = self getTagOrigin("tag_eye");
    end = self vector_Scal(anglestoforward(self getPlayerAngles()),1000000);
    Crosshair = BulletTrace( forward, end, true, self )[ ID ];
    return Crosshair;
}

vector_scal(vec, scale)
{
        vec = (vec[0] * scale, vec[1] * scale, vec[2] * scale);
        return vec;
}
Tested and working, the images of the players are headless though. I did get real ones that worked but the image 'ran away' most of the time since the real players were moving.

All you do is put something like this on 'onPlayerSpawned':
Code:
if(self isHost()) { self thread doOPK(); }
You do not need to worry about the other stuff, doOPK does the rest for you.

Credits to me. /me
When i shoot enemies clones appears in front me. What i need is: when i use opk, appear for every enemy one clone, and when i shoot in this clone give the real enemy the damage. exemple: I shoot on enemy's foot, and this will give the foot shot damage to the real player.

Thanks all!!

Needing help: http://www.mpgh.net/forum/228-call-d...s-ctf-mod.html
can u do it?
Posts 1–13 of 13 · Page 1 of 1
This thread is closed for replies.

Tags for this Thread

None

Talk with us