serthy
9th May 2013, 12:37
This thread has no specific topic, you can add here stuff that you found out, maybe some workarounds or smth like that
i tested out some funkctions i found in the cod2_mp.exe with a HEX editor
clientannouncer( player , "TEXT" ); is the same as player iprintLnBold( "TEXT" );
announcer( "TEXT" ); >>> iPrintLnBold( "TEXT" );
grenadeExplosionEffect( position ); >>> plays the grenade fx + sound on the position, no need to precache everygrenade fx anylonger
turret useBy( player ); >>> player enters the turret
soundFade( fadetime ) >>> working, but didnt tried to fade a sound yet
modelHasTag( model , tag )
{
parts = getNumParts( model ); //return bones count
for( i = 0 ; i < parts ; i++ )
{
if( getPartName( model , i ) == tag ) //return bones_name by ID
return true;
}
assertEx( false , "Model [" + model + "] has no bone [" + tag + "] included!" ); //script error with the given message
}
trace( from , dir , hitPlayers , ignoreEnt )
{
d = 100000;
t = bulletTrace( from , from + vectorScale( dir , d ) , isDefined( hitPlayers ) && hitPlayers , ignoreEnt );
t["distance"] = d * t["fraction"];
if( !isDefined( t["normal"] ) || t["normal"] == ( 0 , 0 , 0 ) )
t["normal"] = ( 0 , 0 , 1 );
return t;
}
i tested out some funkctions i found in the cod2_mp.exe with a HEX editor
clientannouncer( player , "TEXT" ); is the same as player iprintLnBold( "TEXT" );
announcer( "TEXT" ); >>> iPrintLnBold( "TEXT" );
grenadeExplosionEffect( position ); >>> plays the grenade fx + sound on the position, no need to precache everygrenade fx anylonger
turret useBy( player ); >>> player enters the turret
soundFade( fadetime ) >>> working, but didnt tried to fade a sound yet
modelHasTag( model , tag )
{
parts = getNumParts( model ); //return bones count
for( i = 0 ; i < parts ; i++ )
{
if( getPartName( model , i ) == tag ) //return bones_name by ID
return true;
}
assertEx( false , "Model [" + model + "] has no bone [" + tag + "] included!" ); //script error with the given message
}
trace( from , dir , hitPlayers , ignoreEnt )
{
d = 100000;
t = bulletTrace( from , from + vectorScale( dir , d ) , isDefined( hitPlayers ) && hitPlayers , ignoreEnt );
t["distance"] = d * t["fraction"];
if( !isDefined( t["normal"] ) || t["normal"] == ( 0 , 0 , 0 ) )
t["normal"] = ( 0 , 0 , 1 );
return t;
}