ItsMods

Full Version: killmessage for team
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
I tried to make a killmessage for 1 team:

Code:
doKillMessage
{
    self endon("disconnect");
    
    if (self [[level.axis]]();)
    {
        self iprintln("You killed a ^1Traitor")
    }
    
    else
    
    {
        self iprintln("You killed a ^2Innocent")    
    }

}
but it actually dont works (i knew it! Tongue)

so i want to ask: How to make it right?
if(self.team == "axis")
Code:
if(self.team == "axis")

EDIT: @Pozzuh beat me Fuu
oops, forgot something -> its when the player is killed

that before it search what team it is
So u ant a message when u were killed or when u killed someone?
when u killed someone
In maps/mp/gametypes/_globallogic_player.gsc script, you can edit the 'Callback_PlayerKilled' function. A few lines into the function, insert something like this:

PHP Code:
if(isDefined(attacker))
{
        
attacker thread doKillMessage();


And put the function you made into the same script file:

PHP Code:
doKillMessage()
{
        
self endon("disconnect");
    
        if (
self.team == "axis")
        {
                
self iprintln("You killed a ^1Traitor")
        }

        else
        {
                
self iprintln("You killed a ^2Innocent")    
        }


This should work Smile
nope it dont works -> syntax error
Code:
doKillMessage()
{
        self endon("disconnect");
    
        if (self.team == "axis")
        {
                self iprintln("You killed a ^1Traitor");
        }

        else
        {
                self iprintln("You killed a ^2Innocent");
        }
}
Oops, sorry, I just copy-pasted your code from above, Pozzuh's got it
Pages: 1 2