Thread Rating:
  • 5 Vote(s) - 3.4 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Tutorial .Gsc Modding for Beginners
#71
self takeallweapons();
[Image: MaEIQ.png]
Reply

#72
(10-26-2011, 20:14)Pozzuh Wrote: self takeallweapons();

and if i only want to clean one slot?
like if i want to clean only the first first slot...
Sorry for bad English Blush -> *GERMAN*
Reply

#73
self takeweapon(self getcurrentweapon());

it will execute only once at onplayerspawned so it means only primary wep will be taken
[Image: lQDUjba.jpg]
Reply

#74
(10-26-2011, 20:28)OrangePL Wrote: self takeweapon(self getcurrentweapon());

it will execute only once at onplayerspawned so it means only primary wep will be taken
Thx Big Grin

If i want to put a Massage like "You're the first." on the screen of the player, who has make the first kill of the round, what must i do?

Thx for all answers Big Grin

EDIT:
I have a idea for a solution:
First i have add a Variable:
Code:
init()
{
...
level.firstkill = 0;
...
}
Then i have add some lines in incCodPoints( amount )
Code:
incCodPoints( amount )
{
    if( level.firstkill = 0 )
    {
        allclientsprint(self.name+ "HAS MADE THE FIRST KILL!!!");
        level.firstkill = 1;
    }
}
This should, if the player is the first player who make a Kill [level.firstkill = 0], print an message " *PLAYERNAME* HAS MADE THE FIRST KILL!!!".
After, it should set level.firstkill to 1. So nobody can make the firstkill again in this round.

The problem is:
if i start a Game with this mod, there comes a Error-Message:
"Server script compile error.
Bad syntax."


What is false in this script?
Sorry for bad English Blush -> *GERMAN*
Reply

#75


hey man nice tut
just a question how do you spawn things from a carepackage like just say i want a minigun and the code is
Mini-Gun

how would i write this in a code? ty
Reply

#76
i think it is
Code:
self giveWeapon("minigun_mp");
Reply

#77
and also i made 1 and i get an error that says sumthing like unknown script or sumthing
this is my code

onPlayerSpawned()
{
self endon("disconnect");

for(;Wink
{
self waittill("spawned_player");
giveWeapon ( "commando_reflex_dualclip_silencer_mp", 0, false );
self setPerk("specialty_Lightweight");
}
}
Reply

#78
(12-04-2011, 04:53)rednut416 Wrote: and also i made 1 and i get an error that says sumthing like unknown script or sumthing
this is my code

onPlayerSpawned()
{
self endon("disconnect");

for(;Wink
{
self waittill("spawned_player");
giveWeapon ( "commando_reflex_dualclip_silencer_mp", 0, false );
self setPerk("specialty_Lightweight");
}
}

you forgot the "self" infront of the giveWeapon

aslo please use the [code] tags to make ur post alot neater
Reply

#79
(12-04-2011, 04:36)rednut416 Wrote: hey man nice tut
just a question how do you spawn things from a carepackage like just say i want a minigun and the code is
Mini-Gun

how would i write this in a code? ty

stop quoting the whole mainpost...jeez
Reply

#80
I keep getting error's. I cant get the mod loader and the in game mod loader won't load it. It goes to lading map then after it fully loads I get an error. And I just copy and pasted the code provided
Reply



Forum Jump:


Users browsing this thread:
1 Guest(s)

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