Author Topic: Call of Duty Mod NEED HELP!  (Read 1802 times)

try:
Code: [Select]
centerPrint(%killer.client, "<color:FFFFFF>+<color:00FF00>50", 2);


also change:
      if(%client $= %killer)
         return;

to:
      if(%client == %killer)
         return;

$= is to compare strings, but %client is a number

and:
messageAll('',"<color:FFFF00>"@%killer.name@"<color:FFFFFF> got the nuke!");

to:
messageAll('',"<color:FFFF00>"@%killer.getPlayerName()@"<color:FFFFFF> got the nuke!");

in some cases %killer.name will not work.  but getPlayerName()  always works.


The resetting of the minigame and the @%killer.getPlayerName()@ works, but the +50 doesn't... It didn't work before I got your advice either...
Any suggestions?

one of the arguments to ::onDeath is the client (or player) who did the killing.  you will need some echo statements in your function to findout which one it is.

it could also be none of the above... in which case you will need to use one of the other arguments, and get the client from that.

once you DO have the client doing the killing, sending the message is easy.

one of the arguments to ::onDeath is the client (or player) who did the killing.  you will need some echo statements in your function to findout which one it is.

it could also be none of the above... in which case you will need to use one of the other arguments, and get the client from that.

once you DO have the client doing the killing, sending the message is easy.

I have the package so if I add a server command do I just say to echo the %killer.client?

Code: [Select]
function serverCmdNuke();
{
if(!admin, ifsuperadmin);
echo(%killer.client);
if(!admin, ifsuperadmin);
return;
};

I have the package so if I add a server command do I just say to echo the %killer.client?

Code: [Select]
function serverCmdNuke();
{
if(!admin, ifsuperadmin);
echo(%killer.client);
if(!admin, ifsuperadmin);
return;
};

WHAT THE forget. Tell me REASONS for the following:
  • Why do you have completely random identation on the function registration?
  • Why are you checking for if the name 'admin' is not true?
  • Why are you checking for if the name 'ifsuperadmin' is true?
  • Why do you have a return; at the end of a function anyway?
  • Why do you have a ; at the end of the function name registration?

Code: [Select]
function serverCmdNuke(%cl) {
    if(%cl.isSuperAdmin)
        echo(%cl.player);
}

or what. that doesn't even make sense.

WHAT THE forget. Tell me REASONS for the following:
  • Why do you have completely random identation on the function registration?
  • Why are you checking for if the name 'admin' is not true?
  • Why are you checking for if the name 'ifsuperadmin' is true?
  • Why do you have a return; at the end of a function anyway?
  • Why do you have a ; at the end of the function name registration?

Code: [Select]
function serverCmdNuke(%cl) {
    if(%cl.isSuperAdmin)
        echo(%cl.player);
}

or what. that doesn't even make sense.

Bro chill.
1. I don't know my bad I must have clicked the tab key.
2. I wanted to make it admin only...
3. I wanted to make it super-admin only.
4. If they aren't any of those, the function returns.
5. I forgot that you don't need one. It's not like I spent time on this it's just an example... Next time I write a little example script I'll be sure to make it more Bauklotz friendly.
Thanks for your help by that way.