Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Message after First kill.
#1
Hi,
I want to print a massage in Chat, after the first kill of this round.
The massage should be like this "*PLAYERNAME* HAS MADE THE FIRST KILL!!!"

My idea for a Solution was:
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?
_______________________________________________________________
ORIGINAL THREAD (nobody has answered me...)
Sorry for bad English Blush -> *GERMAN*
Reply

#2
I'd like an massage right now....
no but forreal,
I'll help you once im home 1/2 hours
Reply

#3
(10-27-2011, 11:12)gumpo03 Wrote:
Code:
incCodPoints( amount )
{
     if( level.firstkill = 0 )
     {
         allclientsprint(self.name+ " HAS MADE THE FIRST KILL!!!");
         level.firstkill = 1;
     }
}

If it's a "if" operator, then "=" has to be "==".

Like this:

Code:
incCodPoints( amount )
{
     if( level.firstkill == 0 )
     {
         allclientsprint(self.name+ " HAS MADE THE FIRST KILL!!!");
         level.firstkill = 1;
     }
}

But there should be easier ways of doing this :p
And I don't think this will work, but I just fixed your code for now.
Reply

#4
massage != message
[Image: azuw.jpg]
Reply

#5
(10-27-2011, 11:17)jariz Wrote: I'd like an massage right now....
no but forreal,
I'll help you once im home 1/2 hours

Ok thx Big Grin
(10-27-2011, 11:19)Rendflex Wrote:
(10-27-2011, 11:12)gumpo03 Wrote:
Code:
incCodPoints( amount )
{
     if( level.firstkill = 0 )
     {
         allclientsprint(self.name+ " HAS MADE THE FIRST KILL!!!");
         level.firstkill = 1;
     }
}

If it's a "if" operator, then "=" has to be "==".

Like this:

Code:
incCodPoints( amount )
{
     if( level.firstkill == 0 )
     {
         allclientsprint(self.name+ " HAS MADE THE FIRST KILL!!!");
         level.firstkill = 1;
     }
}

But there should be easier ways of doing this :p
And I don't think this will work, but I just fixed your code for now.

Oh like php Big Grin
thank you, i would test it.
Thank you Rendflex Big Grin
It works now Big Grin
Sorry for bad English Blush -> *GERMAN*
Reply

#6
You guys are all wrong.
This guy wants to reward a player by giving him a nice relaxing massage after a stressful kill. None of you guys know how it is to be in a war. All a soldier wants, is a nice relaxing massage.
YouTube 1:Azumikkel- Modding
YouTube 2:DerpShark- Gaming Entertainment
Website:Jensby.me
Contact: im[at]jensby.me
Reply

#7
cough changed thread title
Reply



Possibly Related Threads…
Thread Author Replies Views Last Post
  Help Sentry Gun kill = Player kill Snake 8 5,922 11-07-2013, 13:41
Last Post: Nekochan
  !kill Plugin Hallla 1 2,602 09-07-2013, 22:30
Last Post: axel-le-meilleur
  Help About kill cam Howl3r 3 2,738 08-03-2013, 03:57
Last Post: Howl3r
  Help Spawn Message Playing on Respawn? Killjoy 7 5,290 07-11-2013, 14:53
Last Post: Killjoy
  [News] Message from Gabe to Steam Community d0h! 8 5,662 04-05-2013, 18:16
Last Post: SuperNovaAO
  Help timer/message for flags hillbilly 31 14,901 01-20-2013, 18:20
Last Post: [Z00MBY] Alex
  [Request] Different message per map hillbilly 6 3,812 12-22-2012, 20:55
Last Post: hillbilly
  [HELP] pm's message korsika 1 2,094 12-15-2012, 13:13
Last Post: Ich1994
  Help Insta kill possible? koro35 10 6,699 11-27-2012, 16:10
Last Post: 99IRock
  Chat Message The Tronuo 8 5,057 11-12-2012, 18:05
Last Post: Nekochan

Forum Jump:


Users browsing this thread:
2 Guest(s)

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