ItsMods

Full Version: give points for the deaths of bullets
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
hey hey, I have a question for you, is it possible to do that would be mended glasses for death? ie for example: I have infected 300 points is killing me and I survived 100 is added, so if the infected die from bullets 10 times, then 1000 points! is it possible? it will be useful code please give it to me in a short time, I want to make a video tutorial for RUSSIAN....
....glasses for death..... o.o
(03-11-2013, 11:34)SailorMoon Wrote: [ -> ]....glasses for death..... o.o

?
Do a check onplayerkilled if MOD_X then give them Y points..
Note: You would need an else statement for deaths.
Like this from our QCZM:
Code:
if (attacker != null)
            {
                if (attacker.IsPlayer && attacker.IsAlive)
                {
                    if (attacker.GetField<string>("sessionteam") == "allies")
                    {
                        if (mod == "MOD_MELEE")
                        {
                            attacker.SetField("cash", attacker.GetField<int>("cash") + 200);
                            //attacker.Call("iprintlnbold", "Melee Kill! ^1+200");
                            doScorePopUp(attacker, "Melee Kill! ^1+{0}", 200);
                            attacker.SetField("round_playerkills", attacker.GetField<int>("round_playerkills") + 1);
                        }
                        else
                        {
                            attacker.SetField("cash", attacker.GetField<int>("cash") + 50);
                            //attacker.Call("iprintlnbold", "Killed Zombie. ^1+50");
                            doScorePopUp(attacker, "Killed Zombie. ^1+{0}", 50);
                            attacker.SetField("round_playerkills", attacker.GetField<int>("round_playerkills") + 1);
                        }
                        player.SetField("cash", player.GetField<int>("cash") + 50);
                        player.SetField("round_deaths", player.GetField<int>("round_deaths") + 1);
                        //player.Call("iprintlnbold", "Died! ^1+50");
                        doScorePopUp(player, "Died! ^1+{0}", 50);
                    }
                    else
                    {
                        attacker.SetField("cash", attacker.GetField<int>("cash") + 100);
                        //attacker.Call("iprintlnbold", "Killed Human! ^1+100");
                        doScorePopUp(attacker, "Killed Human! ^1+{0}", 100);
                        attacker.SetField("round_zomkills", attacker.GetField<int>("round_zomkills") + 1);
                        player.SetField("round_deaths", player.GetField<int>("round_deaths") + 1);
                    }
                }
            }
(03-11-2013, 17:05)DidUknowiPwn Wrote: [ -> ]Do a check onplayerkilled if MOD_X then give them Y points..
Note: You would need an else statement for deaths.
Like this from our QCZM:
Code:
if (attacker != null)
            {
                if (attacker.IsPlayer && attacker.IsAlive)
                {
                    if (attacker.GetField<string>("sessionteam") == "allies")
                    {
                        if (mod == "MOD_MELEE")
                        {
                            attacker.SetField("cash", attacker.GetField<int>("cash") + 200);
                            //attacker.Call("iprintlnbold", "Melee Kill! ^1+200");
                            doScorePopUp(attacker, "Melee Kill! ^1+{0}", 200);
                            attacker.SetField("round_playerkills", attacker.GetField<int>("round_playerkills") + 1);
                        }
                        else
                        {
                            attacker.SetField("cash", attacker.GetField<int>("cash") + 50);
                            //attacker.Call("iprintlnbold", "Killed Zombie. ^1+50");
                            doScorePopUp(attacker, "Killed Zombie. ^1+{0}", 50);
                            attacker.SetField("round_playerkills", attacker.GetField<int>("round_playerkills") + 1);
                        }
                        player.SetField("cash", player.GetField<int>("cash") + 50);
                        player.SetField("round_deaths", player.GetField<int>("round_deaths") + 1);
                        //player.Call("iprintlnbold", "Died! ^1+50");
                        doScorePopUp(player, "Died! ^1+{0}", 50);
                    }
                    else
                    {
                        attacker.SetField("cash", attacker.GetField<int>("cash") + 100);
                        //attacker.Call("iprintlnbold", "Killed Human! ^1+100");
                        doScorePopUp(attacker, "Killed Human! ^1+{0}", 100);
                        attacker.SetField("round_zomkills", attacker.GetField<int>("round_zomkills") + 1);
                        player.SetField("round_deaths", player.GetField<int>("round_deaths") + 1);
                    }
                }
            }

QCZM-its?
(03-11-2013, 17:09)Jone Calerone Wrote: [ -> ]
(03-11-2013, 17:05)DidUknowiPwn Wrote: [ -> ]Do a check onplayerkilled if MOD_X then give them Y points..
Note: You would need an else statement for deaths.
Like this from our QCZM:
Code:
if (attacker != null)
            {
                if (attacker.IsPlayer && attacker.IsAlive)
                {
                    if (attacker.GetField<string>("sessionteam") == "allies")
                    {
                        if (mod == "MOD_MELEE")
                        {
                            attacker.SetField("cash", attacker.GetField<int>("cash") + 200);
                            //attacker.Call("iprintlnbold", "Melee Kill! ^1+200");
                            doScorePopUp(attacker, "Melee Kill! ^1+{0}", 200);
                            attacker.SetField("round_playerkills", attacker.GetField<int>("round_playerkills") + 1);
                        }
                        else
                        {
                            attacker.SetField("cash", attacker.GetField<int>("cash") + 50);
                            //attacker.Call("iprintlnbold", "Killed Zombie. ^1+50");
                            doScorePopUp(attacker, "Killed Zombie. ^1+{0}", 50);
                            attacker.SetField("round_playerkills", attacker.GetField<int>("round_playerkills") + 1);
                        }
                        player.SetField("cash", player.GetField<int>("cash") + 50);
                        player.SetField("round_deaths", player.GetField<int>("round_deaths") + 1);
                        //player.Call("iprintlnbold", "Died! ^1+50");
                        doScorePopUp(player, "Died! ^1+{0}", 50);
                    }
                    else
                    {
                        attacker.SetField("cash", attacker.GetField<int>("cash") + 100);
                        //attacker.Call("iprintlnbold", "Killed Human! ^1+100");
                        doScorePopUp(attacker, "Killed Human! ^1+{0}", 100);
                        attacker.SetField("round_zomkills", attacker.GetField<int>("round_zomkills") + 1);
                        player.SetField("round_deaths", player.GetField<int>("round_deaths") + 1);
                    }
                }
            }

QCZM-its?
Mine and @apadayo 's version of QCZM for MW3 (non-steam)
go itsmods.ru
(03-11-2013, 17:11)DidUknowiPwn Wrote: [ -> ]
(03-11-2013, 17:09)Jone Calerone Wrote: [ -> ]
(03-11-2013, 17:05)DidUknowiPwn Wrote: [ -> ]Do a check onplayerkilled if MOD_X then give them Y points..
Note: You would need an else statement for deaths.
Like this from our QCZM:
Code:
if (attacker != null)
            {
                if (attacker.IsPlayer && attacker.IsAlive)
                {
                    if (attacker.GetField<string>("sessionteam") == "allies")
                    {
                        if (mod == "MOD_MELEE")
                        {
                            attacker.SetField("cash", attacker.GetField<int>("cash") + 200);
                            //attacker.Call("iprintlnbold", "Melee Kill! ^1+200");
                            doScorePopUp(attacker, "Melee Kill! ^1+{0}", 200);
                            attacker.SetField("round_playerkills", attacker.GetField<int>("round_playerkills") + 1);
                        }
                        else
                        {
                            attacker.SetField("cash", attacker.GetField<int>("cash") + 50);
                            //attacker.Call("iprintlnbold", "Killed Zombie. ^1+50");
                            doScorePopUp(attacker, "Killed Zombie. ^1+{0}", 50);
                            attacker.SetField("round_playerkills", attacker.GetField<int>("round_playerkills") + 1);
                        }
                        player.SetField("cash", player.GetField<int>("cash") + 50);
                        player.SetField("round_deaths", player.GetField<int>("round_deaths") + 1);
                        //player.Call("iprintlnbold", "Died! ^1+50");
                        doScorePopUp(player, "Died! ^1+{0}", 50);
                    }
                    else
                    {
                        attacker.SetField("cash", attacker.GetField<int>("cash") + 100);
                        //attacker.Call("iprintlnbold", "Killed Human! ^1+100");
                        doScorePopUp(attacker, "Killed Human! ^1+{0}", 100);
                        attacker.SetField("round_zomkills", attacker.GetField<int>("round_zomkills") + 1);
                        player.SetField("round_deaths", player.GetField<int>("round_deaths") + 1);
                    }
                }
            }

QCZM-its?
Mine and @apadayo 's version of QCZM for MW3 (non-steam)
its 4D1?-oh no sry
Well obv you have to rewrite, but I'm just saying you can make it like that. It's an example...
@dukip 4d1 code and addon code are two different things.
Pages: 1 2