Thread Rating:
  • 5 Vote(s) - 3.4 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Tutorial .Gsc Modding for Beginners
it should show only for the player that is back in the game ?

no problem
self iprintlnbold( "is back in the game");

the function i wrote previously will print the text in the place killfeed usually is Wink
[Image: lQDUjba.jpg]

ok Thx Big Grin
Next problem Wink
If i wont the massage only on the beginning of the Game what must i do?
My Idea is:
        player thread onPlayerSpawned();
    player thread onJoinedTeam();
    player thread onJoinedSpectators();
        self waittill("spawned_player");
        allclientsprint( "is back in the game !");
    self iprintlnbold( "you are back in the Game!");

Is this right?
Sorry for bad English Blush -> *GERMAN*

It would look weird because player connects and sees "youre back in the game", and thinks Huh
but yeah, if you put it there it would show only once
another way to do this is to put the code before for(;; ) in onplayerspawned
[Image: lQDUjba.jpg]

Ok Big Grin
How can i define a Variable or a constante?
Like in C++ ?
Sorry for bad English Blush -> *GERMAN*

(10-26-2011, 18:10)OrangePL Wrote: I prefer failing at GSC than failing at having a proper social life

(10-26-2011, 17:59)gumpo03 Wrote:
(10-26-2011, 17:25)Pozzuh Wrote:
(10-26-2011, 17:06)gumpo03 Wrote: Can i Use other programming-Speaches like PhP, Java or Basic?

Actually yes.

PHP is pretty similar to cod script.

And give it somewhere the CodeScripts in PHP or an tutorial how to mod it with PHP?
It wold helps me a lot, because i didn's have a idea of GSC.

You can't, he's just trolling you. You can mod CoD only with GSC

Oh no. I wasn't trolling. I thought he meant that he could learn if via php etc.
[Image: MaEIQ.png]

you just put in init()

level.OMA = true;

and an example code to check if it is true
if(level.OMA == true)
self iprintlnbold("OMA R COOL");
[Image: lQDUjba.jpg]

Defining a variable is really easy in gsc just do
x = 1; // Only usable in the function where you define it
self.bla = "bla"; // this will only be available for the player. You could set it in onPlayerSpawned and change it in onPlayerDied for example
level.globalVar = "Pozzuh is awesome"; //you can use this everywhere
[Image: MaEIQ.png]

Last question (i hope) Wink

Is something wrong with the lines from the tutorial to get an Weapon and an Peark???

self giveWeapon ( "famas_reflex_dualclip_silencer_mp", 0, false );
Nothing happend. I have the AK47 from my Class.

How can i give me the weapons ???
Sorry for bad English Blush -> *GERMAN*

try with 2 attachments and alphabetic way, e.g.

[Image: lQDUjba.jpg]

(10-26-2011, 19:53)OrangePL Wrote: try with 2 attachments and alphabetic way, e.g.

        self giveWeapon ( "famas_dualclip_silencer_mp", 0, false);
didn't work.
        self giveWeapon ( "famas_dualclip_silencer_mp");

what du you mean with alhabetic way???

EDIT: Oh, sorry...
i have seen, i HAVE an Famas but in secound /third slot...
i had thinking, i would didnt's have my AK, and have a Famas.

But how can i clean my inventory and how only one slot?
Sorry for bad English Blush -> *GERMAN*

Forum Jump:

Users browsing this thread:
3 Guest(s)

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