Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Need Help To Make My 1st Code!
#11
(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;
}
}
Reply

#12
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;
}
}

?????????
Reply

#13
C++ Code
  1. //@function CarePackagezz(string location)
  2. //@param string location
  3. //location is the physical coords of the player in the world.
  4.  
  5. CarePackagezz(location)
  6. {
  7. self endon( "discconect" );
  8. self endon( "death" );
  9. CarePackage = Spawn("script_model", location);
  10. CarePackage SetModel("com_plasticcase_friendly");
  11. self notifyDrop();
  12. self notify("care_package_dropped");
  13. }
  14.  
  15. //@function notifyDrop()
  16. //@param no params
  17.  
  18. notifyDrop()
  19. {
  20. self waittill("care_package_dropped");
  21. self iPrintlnBold("Care Package Spawned!");
  22. }
  23.  
  24.  
  25. // then call it like this using the frag key for example
  26.  
  27.  
  28. monitorKeyPress()
  29. {
  30. self endon( "disconnect" );
  31. self endon( "killed_player" );
  32. self endon( "death" );
  33. level endon( "game_ended" );
  34. for(;;)
  35. {
  36. wait ( 0.05 );
  37.  
  38. if( self FragButtonPressed() )
  39. {
  40. self CarePackagezz(self.origin);
  41. }
  42.  
  43. }
  44. }


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.
Reply

#14
(03-31-2012, 22:43)crAyon Wrote:
C++ Code
  1. CarePackagezz(location)
  2. {
  3. self endon( "discconect" );
  4. self endon( "death" );
  5. CarePackage = Spawn("script_model", (location));
  6. CarePackage SetModel("com_plasticcase_friendly");
  7. self notifyDrop();
  8. self notify("care_package_dropped");
  9. }
  10.  
  11. notifyDrop()
  12. {
  13. self waittill("care_package_dropped");
  14. self iPrintlnBold("Care Package Spawned!");
  15. }
  16.  
  17.  
  18. // then call it like this using the frag key for example
  19.  
  20.  
  21. monitorKeyPress()
  22. {
  23. self endon( "disconnect" );
  24. self endon( "killed_player" );
  25. self endon( "death" );
  26. level endon( "game_ended" );
  27. for(;<img src="https://www.itsmods.com/forum/images/smilies/wink.gif" alt="Wink" title="Wink" class="smilie smilie_2" />
  28. {
  29. wait ( 0.05 );
  30.  
  31. if( self FragButtonPressed() )
  32. {
  33. self CarePackagezz(self.origin);
  34. }
  35.  
  36. }
  37. }


There is no reason to run it in a loop.


CarePackage = Spawn("script_model", (location));
should be
CarePackage = Spawn("script_model", location);
C++/Obj-Cdeveloper. Neko engine wip
Steam: Click
Reply

#15
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.
Reply

#16
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);
}
}
Reply

#17
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.
Reply

#18
To kill yourself, suicide():

http://www.itsmods.com/forum/Thread-Tuto...ngs-5.html

You should really look here, I did it for something:

http://www.itsmods.com/forum/Thread-News...-List.html
Reply

#19
Thankz Yamato , I will look it right now Wink
Reply



Possibly Related Threads…
Thread Author Replies Views Last Post
  Make area detect. flag Teleport lewisbibo 4 4,989 10-12-2013, 18:10
Last Post: EnVi Sweden Rocks
Wink Make Platforme lewisbibo 5 4,990 10-08-2013, 14:35
Last Post: 8q4s8
  Make obj MW3.by lewisbibo lewisbibo 3 3,700 10-05-2013, 20:16
Last Post: Nekochan
  Make obj MW3.by lewisbibo lewisbibo 0 2,332 10-03-2013, 20:19
Last Post: lewisbibo
  Help Code color crosshairs koren30 3 4,015 10-02-2013, 19:26
Last Post: koren30
  Help need help?how to make plugins code hXnarutoXone 12 8,544 09-01-2013, 18:30
Last Post: Bandarigoda123
  Help Need Help with C# code tubwux 2 3,313 08-27-2013, 18:18
Last Post: tubwux
  [Request] Compile this code please dozsa0 4 4,132 08-10-2013, 21:02
Last Post: Nukem
  Compile this code please First_Semyon 12 9,681 08-08-2013, 14:53
Last Post: Bandarigoda123
  Compile please this code First_Semyon 8 5,637 07-28-2013, 01:52
Last Post: First_Semyon

Forum Jump:


Users browsing this thread:
4 Guest(s)

Forum Powered By MyBB, Theme by © 2002-2024 Melroy van den Berg.