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

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

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

#62
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:
Code:
onPlayerConnect()
{
    for(;;)
    {
         ...
        player thread onPlayerSpawned();
    player thread onJoinedTeam();
    player thread onJoinedSpectators();
        
        self waittill("spawned_player");
        allclientsprint(self.name+ "is back in the game !");
    self iprintlnbold(self.name+ "you are back in the Game!");
        }
}

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

#63
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]
Reply

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

#65
(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]
Reply

#66
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]
Reply

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

#68
Last question (i hope) Wink

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

Code:
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*
Reply

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

famas_dualclip_silencer_mp
[Image: lQDUjba.jpg]
Reply

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

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

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



Forum Jump:


Users browsing this thread:
2 Guest(s)

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