GSC SCRIPT - KILLED CAMPER

xBeaTzMoDz™

Modder
Messages
12
Reaction score
14
Points
368
Hello CabConModding Members

GSC Script Killed Camper
1 BUG; The camping player can be killed 1 time only (I dont know why i tried all to fix it but it wont work)

  • Video :
Pc Version :
Ps3 Version :

Script - Killed Camper :
Code:
#include maps\mp\_utility;
#include common_scripts\utility;
#include maps\mp\gametypes\_hud_util;
#include maps\mp\gametypes\_hud_message;

init()
{
    level thread onPlayerConnect();
}

onPlayerConnect()
{
    for(;;)
    {
        level waittill("connected", player);
        player thread onPlayerSpawned();
    }
}

onPlayerSpawned()
{
    self endon("disconnect");
    level endon("game_ended");
    for(;;)
    {
        self waittill("spawned_player");
        self iprintln("Black Ops 2 - GSC Script | Project : ^5Killed Camper");
        wait 0.5;
        self thread toggle_KilledCamper();
    }
}

toggle_KilledCamper()
{
    self thread KilledCamper();
    self iprintln("Killed Camper ^2Enabled");
    return thread KilledCamper();
}

KilledCamper()
{  
        level waittill( "prematch_over" );
        self endon("disconnect");
        self endon( "death" );
        my_camp_time = 0;
        have_i_been_warned = false;
        max_distance = 80;
        camp_time = 10;
        while( true )
        {
            old_position = self.origin;
            wait 1;

            new_position = self.origin;
            distance = distance2d( old_position, new_position );

            if( distance < max_distance )
            my_camp_time++;
            else
            {
                my_camp_time = 0;
                have_i_been_warned = false;
            }

            if( my_camp_time == camp_time && !have_i_been_warned )
            {
                self IprintLnBold( "^0Please ^1Stop ^0camping | ^110 ^0seconds ^0to ^1move" );
                have_i_been_warned = true;
            }

            if( my_camp_time == ( camp_time + 10 ) && have_i_been_warned )
            {
                self IprintLnBold( "^0You ^0will ^0be ^1killed ^0for ^1camping!");
                wait 2;
                self suicide();
               
            }
           
    }
}

Credits :
proper - Making Mw2 Script
EGnuhZX.gif



 
Top