![]() |
|
[Request] Spawning a crate - Printable Version +- ItsMods (https://www.itsmods.com) +-- Forum: Archive (https://www.itsmods.com/Forum-Archive.html) +--- Forum: Archive (https://www.itsmods.com/Forum-Archive--64.html) +--- Thread: [Request] Spawning a crate (/Thread-Request-Spawning-a-crate.html) |
Spawning a crate - Vanoq - 12-26-2010 Heyho first of all, hello to everyone ![]() Im new and im planning to release some of my mods here soon. But now i got a problem spawning a crate ... i hope someone can help me? The code for the crates: Code: CreateBlocks(pos, angle)
{
if(!level.CreateBunkers) return;
block = spawn("script_model", pos, 1 );
block setModel( level.crateModelFriendly );
block.angles = angle;
wait 0.01;
}
roundUp( floatVal )
{
if ( int( floatVal ) != floatVal )
return int( floatVal+1 );
else
return int( floatVal );
}And my code to spawn a crate: Code: self CreateBlocks(self.origin, (self getPlayerAngles()));Whats the problem? Vanoq (sry for my bad english, im ger )
RE: Spawning a crate - Killingdyl - 12-26-2010 because ur map functions are jacked up lol remove the if statement line RE: Spawning a crate - master131 - 12-26-2010 *facepalm* Code: self CreateBlocks(self.origin, self getPlayerAngles());
((self getPlayerAngles()) is not a valid vector....
((123,456,789));RE: Spawning a crate - Romuald27 - 12-26-2010 Code: CreateBlocks(pos, angle)
{
block = spawn("script_model", pos, 1 );
block setModel( level.crateModelFriendly );
block.angles = angle;
wait 0.01;
}It's works like this RE: Spawning a crate - d0h! - 12-26-2010 pls use code tags RE: Spawning a crate - Vanoq - 12-26-2010 Thank you, works now RE: Spawning a crate - Killingdyl - 12-26-2010 (12-26-2010, 03:38)master131 Wrote: *facepalm* dude it takes a 3 dimensional vector array, thats wat getPlayerAngles give. You just have to remove the if statement |