Gamestudio Links
Zorro Links
Newest Posts
AlpacaZorroPlugin v1.3.0 Released
by kzhao. 05/22/24 13:41
Free Live Data for Zorro with Paper Trading?
by AbrahamR. 05/18/24 13:28
Change chart colours
by 7th_zorro. 05/11/24 09:25
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
6 registered members (AndrewAMD, Ayumi, degenerate_762, 7th_zorro, VoroneTZ, HoopyDerFrood), 1,268 guests, and 6 spiders.
Key: Admin, Global Mod, Mod
Newest Members
LucasJoshua, Baklazhan, Hanky27, firatv, wandaluciaia
19053 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,210
İstanbul, Turkey
Quad Offline
Senior Expert
Quad  Offline
Senior Expert

Joined: Oct 2007
Posts: 5,210
İ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 | chip programmers | 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