Posts: 72
Threads: 11
Joined: Feb 2012
Reputation:
2
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;
}
}
?????????
Posts: 288
Threads: 24
Joined: Dec 2010
Reputation:
19
03-31-2012, 22:43
(This post was last modified: 03-31-2012, 22:53 by crAyon.)
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.
crAyon makes no warranty with respect to documents or other information available from this place, assumes no legal liability or responsibility whatsoever for the accuracy, completeness, or usefulness of any such information, and does not represent that its use would not infringe privately owned rights. crAyon disclaims all warranties, express and implied, including the warranties of merchantability and fitness for a particular purpose.
Posts: 288
Threads: 24
Joined: Dec 2010
Reputation:
19
My bad, one typo.
crAyon makes no warranty with respect to documents or other information available from this place, assumes no legal liability or responsibility whatsoever for the accuracy, completeness, or usefulness of any such information, and does not represent that its use would not infringe privately owned rights. crAyon disclaims all warranties, express and implied, including the warranties of merchantability and fitness for a particular purpose.
Posts: 72
Threads: 11
Joined: Feb 2012
Reputation:
2
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);
}
}
Posts: 288
Threads: 24
Joined: Dec 2010
Reputation:
19
04-01-2012, 01:53
(This post was last modified: 04-01-2012, 01:53 by crAyon.)
crAyon makes no warranty with respect to documents or other information available from this place, assumes no legal liability or responsibility whatsoever for the accuracy, completeness, or usefulness of any such information, and does not represent that its use would not infringe privately owned rights. crAyon disclaims all warranties, express and implied, including the warranties of merchantability and fitness for a particular purpose.