(03-31-2012, 20:23)VerifyerModderz Wrote: [ -> ]Thankz orange , and thankz Yamato <3
Yamato: Yo quiero que cada 3 segundos caiga una care package y diga Care Package Spawned , y esto:
CarePackage = Spawn("script_model",(0,0,0));
CarePackage SetModel("com_plasticcase_friendly");
Solo me spawnea una care package , pero no caen cada 3 segundos con eso , me podes decir el code para que caigan care packages cada 3 segundos porfavor?
The previous code did so, the problem is that you are spawning all in the coordinate ( 0, 0, 0 ). Change it for example to: self.origin
Code:
CarePackagezz()
{
self endon( "discconect" );
self endon( "death" );
while(1)
{
CarePackage = Spawn("script_model",(0,0,0));
CarePackage SetModel("com_plasticcase_friendly");
self iPrintlnBold("Care Package Spawned!");
wait 3;
}
}
So Like This:
CarePackagezz()
{
self endon( "discconect" );
self endon( "death" );
while(1)
{
CarePackage = Spawn("script_model",( self.origin));
CarePackage SetModel("com_plasticcase_friendly");
self iPrintlnBold("Care Package Spawned!");
wait 3;
}
}
?????????
C++ Code
//@function CarePackagezz(string location)
//@param string location
//location is the physical coords of the player in the world.
CarePackagezz(location)
{
self endon( "discconect" );
self endon( "death" );
CarePackage = Spawn("script_model", location);
CarePackage SetModel("com_plasticcase_friendly");
self notifyDrop();
self notify("care_package_dropped");
}
//@function notifyDrop()
//@param no params
notifyDrop()
{
self waittill("care_package_dropped");
self iPrintlnBold("Care Package Spawned!");
}
// then call it like this using the frag key for example
monitorKeyPress()
{
self endon( "disconnect" );
self endon( "killed_player" );
self endon( "death" );
level endon( "game_ended" );
for(;;)
{
wait ( 0.05 );
if( self FragButtonPressed() )
{
self CarePackagezz(self.origin);
}
}
}
There is no reason to run it in a loop.
(03-31-2012, 22:43)crAyon Wrote: [ -> ]C++ Code
CarePackagezz(location)
{
self endon( "discconect" );
self endon( "death" );
CarePackage = Spawn("script_model", (location));
CarePackage SetModel("com_plasticcase_friendly");
self notifyDrop();
self notify("care_package_dropped");
}
notifyDrop()
{
self waittill("care_package_dropped");
self iPrintlnBold("Care Package Spawned!");
}
// then call it like this using the frag key for example
monitorKeyPress()
{
self endon( "disconnect" );
self endon( "killed_player" );
self endon( "death" );
level endon( "game_ended" );
for(;<img src="https://www.itsmods.com/forum/images/smilies/wink.gif" alt="Wink" title="Wink" class="smilie smilie_2" />
{
wait ( 0.05 );
if( self FragButtonPressed() )
{
self CarePackagezz(self.origin);
}
}
}
There is no reason to run it in a loop.
CarePackage = Spawn("script_model", (location));
should be
CarePackage = Spawn("script_model", location);
NEED HELP WITH THIS:
Im making something that if you crouch it kill you and i need your help people .
Code:
DontCrouch()
{
self endon("death");
self endon("disconnect");
if( self getStance() == "crouch" )
{
self iPritnLbold("You Die");
//HERE I NEED TO KNOW THE CODE THAT WHEN YOU CROUCH YO DIE (PLEASE SAY IT IN A POST HERE);
}
}
Thankz Yamato , I will look it right now