ok i started trying to import the old teleport function into black ops and hope i posted all needed code to understand the problem, i precached the location selector in init etc...but when i try to call my teleport via the melee button nothing happens ingame. just nothing.
perhaps someone can look into and give me a good advice where the error is
+ i am not sure about the level.mapSize
perhaps someone can look into and give me a good advice where the error is
+ i am not sure about the level.mapSize
PHP Code:
init()
{
precacheModel( "projectile_cbu97_clusterbomb" );
precacheItem ( "airstrike_mp" );
level.airstrikeModel = "t5_veh_air_b52";
precacheModel( level.airstrikeModel );
PrecacheRumble("rolling_thunder_rumble");
PrecacheRumble("artillery_rumble");
precacheLocationSelector( "map_airstrike_selector" );
// register the radar hardpoint
if ( mapsmpgametypes_tweakables::getTweakableValue( "killstreak", "allowairstrike" ) )
{
mapsmpgametypes_hardpoints::registerKillstreak("airstrike_mp", "airstrike_mp", "killstreak_airstrike", "airstrike_used", ::useKillstreakAirstrike, true);
mapsmpgametypes_hardpoints::registerKillstreakStrings("airstrike_mp", &"KILLSTREAK_EARNED_AIRSTRIKE", &"KILLSTREAK_AIRSTRIKE_NOT_AVAILABLE",&"KILLSTREAK_AIRSTRIKE_INBOUND", &"KILLSTREAK_AIRSTRIKE_INBOUND_NEAR_YOUR_POSITION");
mapsmpgametypes_hardpoints::registerKillstreakDialog("airstrike_mp", "mpl_killstreak_air", "kls_airstrike_used", "","kls_airstrike_enemy", "", "kls_airstrike_ready");
mapsmpgametypes_hardpoints::registerKillstreakDevDvar("airstrike_mp", "scr_giveairstrike");
}
}
PHP Code:
{
self endon ( "disconnect" );
for(;;)
{
if(self MeleeButtonPressed())
airstrikeSelectorSize = getDvarIntDefault( #"scr_airstrikeSelectorSize", 3000 );
self beginLocationAirstrikeSelection( "map_airstrike_selector", airstrikeSelectorSize, true ( level.mapSize / 5.625 ) );
self.selectingLocation = true;
self thread endSelectionThink();
self waittill( "confirm_location", location, yaw );
newLocation = PhysicsTrace( location + ( 0, 0, 10000 ), location - ( 0, 0, 10000 ) );
self SetOrigin( newLocation );
self SetPlayerAngles( yaw );
self endLocationselection();
self.selectingLocation = undefined;
}
}