is it possible?
#1

Is it possible to do like

pawn Код:
if(KillSpree[killerid] == 3 .. 250 ) // THIS, THE 3 .. 250 :/
    {
        TextDrawShowForAll(Textdraw0);
        KillTimer(aaa);
        aaa = SetTimer("TextDrawKiller", 10000, false);
        return 1;
    }
but in other way for it to work? ? pls help cauz if not i have to do 1 by 1
Reply
#2

if(KillSpree[killerid] > 3 ||KillSpree[killerid] < 250)
Reply
#3

lemme test
Reply
#4

now, when player kills 1 and 2 times the textdraw says "-" , and when player with spree gets killed it says he is still on spree, HELP
Reply
#5

You have to reset his killing spree back to 0 when he die.
Reply
#6

HOW?

THis is my full code:

pawn Код:
{
        case 3:
        {
            new string[128];
            format(string, sizeof(string), "~r~%s ~y~- Dominating: %d kills", pname, KillSpree[killerid]);
            TextDrawSetString(Textdraw0, string);
            SetPlayerScore(killerid, GetPlayerScore(killerid) + 10);
            GivePlayerMoney(killerid, 1000);
            SendClientMessage(killerid, 0xFFFFFFFF, "{33AA33}Killing Spree System: {FFFFFF}You won +1000$, +10 score");
        }
        case 4:
        {
            new string[128];
            format(string, sizeof(string), "~r~%s ~y~- Rampage: %d kills", pname, KillSpree[killerid]);
            TextDrawSetString(Textdraw0, string);
            SetPlayerScore(killerid, GetPlayerScore(killerid) + 20);
            GivePlayerMoney(killerid, 2000);
            SendClientMessage(killerid, 0xFFFFFFFF, "{33AA33}Killing Spree System: {FFFFFF}You won +2000$, +20 score");
        }
        case 5:
        {
            new string[128];
            format(string, sizeof(string), "~r~%s ~y~- Killing Spree: %d kills", pname, KillSpree[killerid]);
            TextDrawSetString(Textdraw0, string);
            SetPlayerScore(killerid, GetPlayerScore(killerid) + 30);
            GivePlayerMoney(killerid, 3000);
            SendClientMessage(killerid, 0xFFFFFFFF, "{33AA33}Killing Spree System: {FFFFFF}You won +3000$, +30 score");
        }
        case 6:
        {
            new string[128];
            format(string, sizeof(string), "~r~%s ~y~- Monster Kill: %d Kills", pname, KillSpree[killerid]);
            TextDrawSetString(Textdraw0, string);
            SetPlayerScore(killerid, GetPlayerScore(killerid) + 40);
            GivePlayerMoney(killerid, 4000);
            SendClientMessage(killerid, 0xFFFFFFFF, "{33AA33}Killing Spree System: {FFFFFF}You won +4000$, +40 score");
        }
        case 7:
        {
            new string[128];
            format(string, sizeof(string), "~r~%s ~y~- Unstoppable: %d kills", pname, KillSpree[killerid]);
            TextDrawSetString(Textdraw0, string);
            SetPlayerScore(killerid, GetPlayerScore(killerid) + 50);
            GivePlayerMoney(killerid, 5000);
            SendClientMessage(killerid, 0xFFFFFFFF, "{33AA33}Killing Spree System: {FFFFFF}You won +5000$, +50 score");
        }
        case 8:
        {
            new string[128];
            format(string, sizeof(string), "~r~%s ~y~- Ultra Kill: %d kills", pname, KillSpree[killerid]);
            TextDrawSetString(Textdraw0, string);
            SetPlayerScore(killerid, GetPlayerScore(killerid) + 100);
            GivePlayerMoney(killerid, 10000);
            SendClientMessage(killerid, 0xFFFFFFFF, "{33AA33}Killing Spree System: {FFFFFF}You won +10000$, +100 score");
        }
        case 9:
        {
            new string[128];
            format(string, sizeof(string), "~r~%s ~y~- Godlike: %d kills", pname, KillSpree[killerid]);
            TextDrawSetString(Textdraw0, string);
            SetPlayerScore(killerid, GetPlayerScore(killerid) + 100);
            GivePlayerMoney(killerid, 10000);
            SendClientMessage(killerid, 0xFFFFFFFF, "{33AA33}Killing Spree System: {FFFFFF}You won +10000$, +100 score");
        }
        case 10:
        {
            new string[128];
            format(string, sizeof(string), "~r~%s ~y~- Wicked Sick: %d kills", pname, KillSpree[killerid]);
            TextDrawSetString(Textdraw0, string);
            SetPlayerScore(killerid, GetPlayerScore(killerid) + 100);
            GivePlayerMoney(killerid, 10000);
            SendClientMessage(killerid, 0xFFFFFFFF, "{33AA33}Killing Spree System: {FFFFFF}You won +10000$, +100 score");
        }
        case 11:
        {
            new string[128];
            format(string, sizeof(string), "~r~%s ~y~- Ludicrous Kill: %d kills", pname, KillSpree[killerid]);
            TextDrawSetString(Textdraw0, string);
            SetPlayerScore(killerid, GetPlayerScore(killerid) + 100);
            GivePlayerMoney(killerid, 10000);
            SendClientMessage(killerid, 0xFFFFFFFF, "{33AA33}Killing Spree System: {FFFFFF}You won +10000$, +100 scoree");
        }
        case 12:
        {
            new string[128];
            format(string, sizeof(string), "~r~%s ~y~- Holy Shit: %d kills", pname, KillSpree[killerid]);
            TextDrawSetString(Textdraw0, string);
            SetPlayerScore(killerid, GetPlayerScore(killerid) + 500);
            GivePlayerMoney(killerid, 50000);
            SendClientMessage(killerid, 0xFFFFFFFF, "{33AA33}Killing Spree System: {FFFFFF}You won +50000$, +500 score");
        }
        case 13..50:
        {
            new string[128];
            format(string, sizeof(string), "~r~%s ~y~- Huge Killing: Spree %d kills", pname, KillSpree[killerid]);
            TextDrawSetString(Textdraw0, string);
            SetPlayerScore(killerid, GetPlayerScore(killerid) + 500);
            GivePlayerMoney(killerid, 50000);
            SendClientMessage(killerid, 0xFFFFFFFF, "{33AA33}Killing Spree System: {FFFFFF}You won +50000$, +500 score");
        }
        case 51..150:
        {
            new string[128];
            format(string, sizeof(string), "~r~%s ~y~- Epic Killing: Spree %d kills", pname, KillSpree[killerid]);
            TextDrawSetString(Textdraw0, string);
            SetPlayerScore(killerid, GetPlayerScore(killerid) + 1000);
            GivePlayerMoney(killerid, 100000);
            SendClientMessage(killerid, 0xFFFFFFFF, "{33AA33}Killing Spree System: {FFFFFF}You won +100000$, +1000 score");
        }
        case 151..250:
        {
            new string[128];
            format(string, sizeof(string), "~r~%s ~y~- Master Spree: %d kills", pname, KillSpree[killerid]);
            TextDrawSetString(Textdraw0, string);
            SetPlayerScore(killerid, GetPlayerScore(killerid) + 1200);
            GivePlayerMoney(killerid, 150000);
            SendClientMessage(killerid, 0xFFFFFFFF, "{33AA33}Killing Spree System: {FFFFFF}You won +150000$, +1200 score");
        }
    }
     if(KillSpree[killerid] > 3 || KillSpree[killerid] < 250)
    {
        TextDrawShowForAll(Textdraw0);
        KillTimer(aaa);
        aaa = SetTimer("TextDrawKiller", 10000, false);
        return 1;
    }
   
    if(KillSpree[playerid] >=3)
    {
        new string[128];
        TextDrawShowForAll(Textdraw0);
        KillTimer(aaa);
        aaa = SetTimer("TextDrawKiller", 10000, false);
        format(string, sizeof(string), "~r~%s ~y~- Killing Spree ended", kname, KillSpree[killerid]);
        TextDrawSetString(Textdraw0, string);
        return 1;
    }
    return 1;
}
Reply
#7

Add this: KillSpree[playerid] = 0;
Reply
#8

tahts ontop:

SendDeathMessage(killerid, playerid, reason);
PlayerInfo[killerid][pKills]++;
PlayerInfo[playerid][pDeaths]++;
GetPlayerName(killerid, pname, sizeof(pname));
GetPlayerName(playerid, kname, sizeof(kname));
KillSpree[playerid] = 0;
KillSpree[killerid] ++;
switch(KillSpree[killerid])
Reply
#9

Quote:
Originally Posted by S0n1COwnsYou
Посмотреть сообщение
if(KillSpree[killerid] > 3 ||KillSpree[killerid] < 250)
This code is a fail and will always evaluate to true. If the player has 0 kills, it is less than 250 so the expression is true.

pawn Код:
if(3 <= KillSpree[killerid] <= 250)
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)