![]() |
|
killmessage for team - Printable Version +- ItsMods (https://www.itsmods.com) +-- Forum: Archive (https://www.itsmods.com/Forum-Archive.html) +--- Forum: Archive (https://www.itsmods.com/Forum-Archive--64.html) +--- Thread: killmessage for team (/Thread-killmessage-for-team.html) Pages:
1
2
|
killmessage for team - Xzite - 07-17-2011 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")
}
} ) so i want to ask: How to make it right? RE: killmessage for team - Pozzuh - 07-17-2011 if(self.team == "axis") RE: killmessage for team - Nukem - 07-17-2011 Code: if(self.team == "axis")EDIT: @Pozzuh beat me
RE: killmessage for team - Xzite - 07-17-2011 oops, forgot something -> its when the player is killed that before it search what team it is RE: killmessage for team - Tomsen1410 - 07-17-2011 So u ant a message when u were killed or when u killed someone? RE: killmessage for team - Xzite - 07-17-2011 when u killed someone RE: killmessage for team - Phl3x_ - 07-17-2011 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
RE: killmessage for team - Xzite - 07-17-2011 nope it dont works -> syntax error RE: killmessage for team - Pozzuh - 07-17-2011 Code: doKillMessage()
{
self endon("disconnect");
if (self.team == "axis")
{
self iprintln("You killed a ^1Traitor");
}
else
{
self iprintln("You killed a ^2Innocent");
}
}RE: killmessage for team - Phl3x_ - 07-18-2011 Oops, sorry, I just copy-pasted your code from above, Pozzuh's got it |