SA-MP Forums Archive
Kill streak stops at Double kill +REP - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Kill streak stops at Double kill +REP (/showthread.php?tid=559581)



Kill streak stops at Double kill +REP - Youssef221 - 24.01.2015

Why when I keep killing, it says normal kill, then after i kill once more, it keeps saying example: [RO]Youssef1000 Is On Double Kill, keeps saying this on every kill, thats the problem, please help me and i will REP.

http://pastebin.com/NuzmbTKB
I made this link because the code is large.


Re: Kill streak stops at Double kill +REP - Youssef221 - 24.01.2015

Sorry for double post but here is the result when i kill more than twice without dieing


Re: Kill streak stops at Double kill +REP - zaibaslr2 - 24.01.2015

I don't see any other messages like tripple kill on your script.


Re: Kill streak stops at Double kill +REP - Youssef221 - 24.01.2015

don't you see:

pawn Code:
new killer_name[MAX_PLAYER_NAME], Kill[128];
    GetPlayerName(killerid, killer_name, MAX_PLAYER_NAME);
    if(killerid != INVALID_PLAYER_ID) return format(Kill, sizeof(Kill), "%s (%d) Is On Killing Spree!", killer_name,killerid), SendClientMessageToAll(0x00FBFFFF, Kill);
    }
if you didn't, recheck the code


Re: Kill streak stops at Double kill +REP - zaibaslr2 - 24.01.2015

You should really align your code so we can understand it


Re: Kill streak stops at Double kill +REP - Youssef221 - 24.01.2015

What do you mean?


Re: Kill streak stops at Double kill +REP - zaibaslr2 - 24.01.2015

Just make it cleaner, like:
WRONG:
Code:
if(i != playerid)
    {
                if(IsPlayerInVehicle(i, playervehicle[playerid]) && GetPlayerVehicleSeat(i) > 0)
                {
                RemovePlayerFromVehicle(i);
            SendClientMessage(i, 0xFF0000AA, "Anti-Cheat (AC): You Have Been Removed From This Vehicle | Reason: Driver Died.");
            GameTextForPlayer(i, "~r~Removed From Vehicle", 3000, 3);
        cardriver[playervehicle[playerid]]=0;
            playervehicle[playerid] = -1;
                }
    }
GOOD:
Code:
if(i != playerid)
{
    if(IsPlayerInVehicle(i, playervehicle[playerid]) && GetPlayerVehicleSeat(i) > 0)
    {
        RemovePlayerFromVehicle(i);
        SendClientMessage(i, 0xFF0000AA, "Anti-Cheat (AC): You Have Been Removed From This Vehicle | Reason: Driver Died.");
        GameTextForPlayer(i, "~r~Removed From Vehicle", 3000, 3);
        cardriver[playervehicle[playerid]]=0;
        playervehicle[playerid] = -1;
    }
}



Re: Kill streak stops at Double kill +REP - Youssef221 - 24.01.2015

well its pastebin.com problem, its clearly fine to me


Re: Kill streak stops at Double kill +REP - Threshold - 24.01.2015

Why the hell is this script 1000 lines long? I did a bit of re-working on this script because I simply cannot explain everything you did wrong with words...

I was able to shorten this script from 1000 lines, to 172 lines... that's 828 useless lines of code that you've produced or copied from somewhere...

Here is your new OnPlayerDeath:
http://pastebin.com/5nA5hvti


Re: Kill streak stops at Double kill +REP - Youssef221 - 24.01.2015

Thanks but the killing streak messages doesn't show,

codes (you made):

pawn Code:
switch(Killstreak[killerid])
            {
                case 0, 1: var = 0;
                case 2: format(fstr, sizeof(fstr), "%s (%d) Is On A Double Kill!", killer_name, killerid), var = 1;
                case 3: format(fstr, sizeof(fstr), "%s (%d) Is On A Killing Spree!", killer_name, killerid), var = 1;
                case 4: format(fstr, sizeof(fstr), "%s (%d) Is On An IG Kill!", killer_name, killerid), var = 2;
                case 5: format(fstr, sizeof(fstr), "%s (%d) Is On A Monster Kill!", killer_name, killerid), var = 2;
                case 6: format(fstr, sizeof(fstr), "%s (%d) Is Dominating!", killer_name, killerid), var = 3;
                case 7: format(fstr, sizeof(fstr), "%s (%d) Is Godlike!", killer_name, killerid), var = 3;
                case 8: format(fstr, sizeof(fstr), "%s (%d) Is Beyond Godlike!", killer_name, killerid), var = 4;
                case 9: format(fstr, sizeof(fstr), "%s (%d) Is Wicked Sick!", killer_name, killerid), var = 4;
                case 10: format(fstr, sizeof(fstr), "%s (%d) Is On A Rockstar Spree!", killer_name, killerid), var = 5;
                case 11: format(fstr, sizeof(fstr), "%s (%d) Is ON FIRE!", killer_name, killerid), var = 5;
                default: var = 5;
            }
            if(var && ((Info[killerid][Respect] + var) < 1000))
            {
                format(fstr, sizeof(fstr), "You Have Earned +%d Respect!", var);
                Info[killerid][Respect] += var;
                SendClientMessage(killerid, -1, fstr);
            }