Gamestudio Links
Zorro Links
Newest Posts
Zorro 2.70
by jcl. 09/29/25 09:24
optimize global parameters SOLVED
by dBc. 09/27/25 17:07
ZorroGPT
by TipmyPip. 09/27/25 10:05
assetHistory one candle shift
by jcl. 09/21/25 11:36
Plugins update
by Grant. 09/17/25 16:28
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
2 registered members (TipmyPip, 1 invisible), 18,731 guests, and 7 spiders.
Key: Admin, Global Mod, Mod
Newest Members
krishna, DrissB, James168, Ed_Love, xtns
19168 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
[C-Script] Weapon Changing Code #245478
01/10/09 08:45
01/10/09 08:45
Joined: Dec 2008
Posts: 93
YOU AINT GONNA NEED THAT!
M
MAGA Offline OP
Junior Member
MAGA  Offline OP
Junior Member
M

Joined: Dec 2008
Posts: 93
YOU AINT GONNA NEED THAT!
Please can you give me a simple gun changing code with 3guns. I found it for Lite-C in AUM81, but my knowledge not good enough to convert it.

Re: [C-Script] Weapon Changing Code [Re: MAGA] #245759
01/11/09 18:48
01/11/09 18:48
Joined: Dec 2008
Posts: 93
YOU AINT GONNA NEED THAT!
M
MAGA Offline OP
Junior Member
MAGA  Offline OP
Junior Member
M

Joined: Dec 2008
Posts: 93
YOU AINT GONNA NEED THAT!
Damn frown what mo one can help me? frown

Re: [C-Script] Weapon Changing Code [Re: MAGA] #245763
01/11/09 19:09
01/11/09 19:09
Joined: Oct 2007
Posts: 5,211
İstanbul, Turkey
Quad Offline
Senior Expert
Quad  Offline
Senior Expert

Joined: Oct 2007
Posts: 5,211
İstanbul, Turkey
hmm it have been alot since i didnt looked in to cscript, but ill se if i can convert it.

(you started new? why didnt you started with lite-c >.<?)

Code:
ENTITY weapon1 = // first weapon
{

       type = "zombie.mdl";

       layer = 5;

       x = 145; // place this gun 145 quants ahead of the view

       y = -70; // 70 quants to the right

       z = -30; // and 30 quants below the center of the screen

       pan = 7;

       tilt = 10;

       flags = VISIBLE; // the first weapon is visible by default

}

 

ENTITY weapon2 = // second weapon

{

       type = "zombie.mdl";

       layer = 5;

       x = 135; // place this gun 135 quants ahead of the view

       y = -30; // 30 quants to the right

       z = -20; // and 20 quants below the center of the screen

       pan = 3;

       tilt = 10;

}

 

ENTITY weapon3 = // third weapon

{

       type = "zombie.mdl";

       layer = 5;

       x = 150; // place this gun 150 quants ahead of the view

       y = 20; // 20 quants to the right

       z = 10; // and 10 quants above the center of the screen

       pan = -4;

       tilt = -10;

}

 

function weapons_startup()

{

       var weapon_number = 1;

       while (1)

       {

               if (mickey.z < -1)

               {

                       weapon_number %=3;                

                       weapon_number += 1; // don't allow weapon_number to be smaller than 1 or bigger than 3

                       if (weapon_number == 1)

                       {

                               weapon1.VISIBLE = on;

                               weapon2.VISIBLE = off;

                               weapon3.VISIBLE = off;

                       }

                       if (weapon_number == 2)

                       {

                               weapon1.VISIBLE = off;

                               weapon2.VISIBLE = on;

                               weapon3.VISIBLE = off;

                       }

                       if (weapon_number == 3)

                       {

                               weapon1.VISIBLE = off;

                               weapon2.VISIBLE = off;

                               weapon3.VISIBLE = on;

                       }

               }

               if (mickey.z > 1)

               {

                       weapon_number %=3;                

                       weapon_number += 1; // don't allow weapon_number to be smaller than 1 or bigger than 3

                      if (weapon_number == 1)

                       {

                               weapon1.VISIBLE = off;

                               weapon2.VISIBLE = off;

                               weapon3.VISIBLE = on;

                       }

                       if (weapon_number == 2)

                       {

                               weapon1.VISIBLE = off;

                               weapon2.VISIBLE = on;

                               weapon3.VISIBLE = off;

                       }

                       if (weapon_number == 3)

                       {

                               weapon1.VISIBLE = on;

                               weapon2.VISIBLE = off;

                               weapon3.VISIBLE = off;

                       }

               }

               wait (1);

       }

}




hope it works.


3333333333
Re: [C-Script] Weapon Changing Code [Re: Quad] #245787
01/11/09 22:28
01/11/09 22:28
Joined: Dec 2008
Posts: 93
YOU AINT GONNA NEED THAT!
M
MAGA Offline OP
Junior Member
MAGA  Offline OP
Junior Member
M

Joined: Dec 2008
Posts: 93
YOU AINT GONNA NEED THAT!
You are the best man! Thanks allot!!! But what is better Lite-C or C-Script? I mean not only for beginers, for making a good project and for future? I can work with C-Script a little-bit, but I don't know any thing about Lite-C.


Moderated by  George 

Gamestudio download | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1