SA-MP Forums

Go Back   SA-MP Forums > Non-English > Languages > Romānă/Romanian

 
 
Thread Tools Display Modes
Old 03/04/2013, 04:24 PM   #1
Pypp
Little Clucker
 
Join Date: Feb 2013
Posts: 23
Reputation: 0
Default Wanted la civili

As vrea ca toti civilii sa primeasca +1 wanted atunci cand omoara orice jucator.
pawn Code:
public OnPlayerDeath(playerid, killerid, reason)
{
if(PlayerInfo[killerid][pMember] == 1||PlayerInfo[killerid][pLeader] == 1||PlayerInfo[killerid][pMember] == 2||PlayerInfo[killerid][pLeader] ==2||PlayerInfo[killerid][pMember] == 3||PlayerInfo[killerid][pLeader] ==3)
{
SetPlayerWantedLevel(killerid, 0);
}
    new name[MAX_PLAYER_NAME];
    new string[256];
    //new dmessage[128];
    //new deathreason[20];
    new playercash;
    new victimteam;
    new Float:px,Float:py,Float:pz;
    new killerteam;

    victimteam = gTeam[playerid];
    killerteam = gTeam[killerid];
    gPlayerSpawned[playerid] = 0;
    PlayerInfo[playerid][pInvWeapon] = 0;
    PlayerInfo[playerid][pInvAmmo] = 0;
    GetPlayerName(playerid, name, sizeof(name));
    PlayerInfo[playerid][pLocal] = 255;
    GetPlayerPos(playerid, px, py, pz);
    if(killerid != 255)
    {
        if(GetPlayerState(killerid) == 2)
        {
            if(ProxDetectorS(20, killerid, playerid))
            {
                if(!IsPlayerInAnyVehicle(playerid))
                {
                    if(PlayerInfo[killerid][pMember] == 1||PlayerInfo[killerid][pLeader] == 1||PlayerInfo[killerid][pMember] == 2||PlayerInfo[killerid][pLeader] ==2)
                    {
                        SendClientMessage(killerid, COLOR_YELLOW, "That was a drive-by kill. Don't abuse it.");
                        return 1;
                    }
                    SetPlayerCriminal(killerid,255,"Manslaughter");
                    SetPlayerWantedLevel(killerid, GetPlayerWantedLevel(killerid)+1);
                    return 1;
                }
            }
        }
    }
    if (PlayerInfo[killerid][pAdmin] < 1)
    {
        if(reason == 38)
        {
            new kstring[128];
            new kickname[MAX_PLAYER_NAME];
            if(IsPlayerConnected(killerid))
            {
                GetPlayerName(killerid, kickname, sizeof(kickname));
                format(string, 256, "AdmWarning: [%d]%s just killed a [%d]%s with minigun.",killerid,kickname,playerid,name);
                ABroadCast(COLOR_LIGHTRED,string,1);
                printf("%s", kstring);
                //Ban(killerid);
            }
        }
        if(reason == 35)
        {
            new kstring[128];
            new kickname[MAX_PLAYER_NAME];
            if(IsPlayerConnected(killerid))
            {
                GetPlayerName(killerid, kickname, sizeof(kickname));
                format(string, 256, "AdmWarning: [%d]%s just killed a player with a flamethrower and has been IP banned.",killerid,kickname);
                ABroadCast(COLOR_LIGHTRED,string,1);
                printf("%s", kstring);
                Ban(killerid);
            }
        }
        if(reason == 9)
        {
            new kstring[128];
            new kickname[MAX_PLAYER_NAME];
            if(IsPlayerConnected(killerid))
            {
                GetPlayerName(killerid, kickname, sizeof(kickname));
                format(string, 256, "AdmWarning: [%d]%s just killed a player with a chainsaw and has been IP banned.",killerid,kickname);
                ABroadCast(COLOR_LIGHTRED,string,1);
                printf("%s", kstring);
                Ban(killerid);
            }
        }
        if(reason == 16)
        {
            new kstring[128];
            new kickname[MAX_PLAYER_NAME];
            if(IsPlayerConnected(killerid))
            {
                GetPlayerName(killerid, kickname, sizeof(kickname));
                format(string, 256, "AdmWarning: [%d]%s just killed a player with grenades and has been IP banned.",killerid,kickname);
                ABroadCast(COLOR_LIGHTRED,string,1);
                printf("%s", kstring);
                Ban(killerid);
            }
        }
        if(reason == 18)
        {
            new kstring[128];
            new kickname[MAX_PLAYER_NAME];
            if(IsPlayerConnected(killerid))
            {
                GetPlayerName(killerid, kickname, sizeof(kickname));
                format(string, 256, "AdmWarning: [%d]%s just killed a player with molotovs and has been IP banned.",killerid,kickname);
                ABroadCast(COLOR_LIGHTRED,string,1);
                printf("%s", kstring);
                Ban(killerid);
            }
        }
        if(reason == 28)
        {
            new kstring[128];
            new kickname[MAX_PLAYER_NAME];
            if(IsPlayerConnected(killerid))
            {
                GetPlayerName(killerid, kickname, sizeof(kickname));
                format(string, 256, "AdmWarning: [%d]%s just killed a player with a Mac 10, Check him immediately.",killerid,kickname);
                ABroadCast(COLOR_LIGHTRED,string,1);
                printf("%s", kstring);
            }
        }
        if(reason == 32)
        {
            new kstring[128];
            new kickname[MAX_PLAYER_NAME];
            if(IsPlayerConnected(killerid))
            {
                GetPlayerName(killerid, kickname, sizeof(kickname));
                format(string, 256, "AdmWarning: [%d]%s just killed a player with Tec 9's, Check him immediately.",killerid,kickname);
                ABroadCast(COLOR_LIGHTRED,string,1);
                printf("%s", kstring);
            }
        }
        if(reason == 36)
        {
            new kstring[128];
            new kickname[MAX_PLAYER_NAME];
            if(IsPlayerConnected(killerid))
            {
                GetPlayerName(killerid, kickname, sizeof(kickname));
                format(string, 256, "AdmWarning: [%d]%s just killed a player with a Lock On Launcher and has been IP banned.",killerid,kickname);
                ABroadCast(COLOR_LIGHTRED,string,1);
                printf("%s", kstring);
                Ban(killerid);
            }
        }
    }
    if (gPlayerCheckpointStatus[playerid] > 4 && gPlayerCheckpointStatus[playerid] < 11)
    {
        DisablePlayerCheckpoint(playerid);
        gPlayerCheckpointStatus[playerid] = CHECKPOINT_NONE;
    }
    new caller = Mobile[playerid];
    if(caller != 255)
    {
        if(caller < 255)
        {
            SendClientMessage(caller,  COLOR_GRAD2, "** The line just went dead....");
            CellTime[caller] = 0;
            CellTime[playerid] = 0;
            Mobile[caller] = 255;
        }
        Mobile[playerid] = 255;
        CellTime[playerid] = 0;
    }
    ClearCrime(playerid);
    if(PlayerPaintballing[playerid] != 0)
    {
        PlayerPaintballKills[killerid] ++;
        if(PlayerPaintballKills[killerid] > PaintballWinnerKills)
        {
            new killer[MAX_PLAYER_NAME];
            PaintballWinner = killerid;
            PaintballWinnerKills = PlayerPaintballKills[killerid];
            GetPlayerName(killerid, killer, sizeof(killer));
            for(new i = 0; i < MAX_PLAYERS; i++)
            {
                if(IsPlayerConnected(i))
                {
                    if(PlayerPaintballing[i] != 0)
                    {
                        format(string, sizeof(string), "* %s is in the lead with %d Kills.",killer,PaintballWinnerKills);
                        SendClientMessage(i, COLOR_WHITE, string);
                    }
                }
            }
        }
        return 1;
    }
    if(GettingCK[playerid] < 999)
    {
        if(IsPlayerConnected(killerid))
        {
            if(OnCK[killerid] < 999)
            {
                new killer[MAX_PLAYER_NAME];
                new dier[MAX_PLAYER_NAME];
                GetPlayerName(playerid, dier, sizeof(dier));
                GetPlayerName(killerid, killer, sizeof(killer));
                format(string, sizeof(string), "* %s has performed a Character Kill on you, you aren't able to play with this Character anymore.",killer);
                SendClientMessage(playerid, COLOR_LIGHTRED, string);
                format(string, sizeof(string), "** %s has Character Killed %s **",killer,dier);
                CKLog(string);
                BroadCast(COLOR_LIGHTRED, string);
                PlayerInfo[playerid][pCK] = 1;
                if(GettingCK[playerid] < 999) { GettingCK[playerid] = 999; }
                else if(OnCK[playerid] < 999) { OnCK[playerid] = 999; }
                if(GettingCK[killerid] < 999) { GettingCK[killerid] = 999; }
                else if(OnCK[killerid] < 999) { OnCK[killerid] = 999; }
                KickPlayer[playerid] = 1;
            }
        }
    }
    if(PlayerInfo[playerid][pHeadValue] > 0)
    {
        if(IsPlayerConnected(killerid))
        {
            if(gTeam[killerid] == 10 || PlayerInfo[killerid][pLeader] == 8)
            {
                if(GoChase[killerid] == playerid)
                {
                    ConsumingMoney[killerid] = 1;
                    new killer[MAX_PLAYER_NAME];
                    GetPlayerName(killerid, killer, sizeof(killer));
                    SafeGivePlayerMoney(killerid, PlayerInfo[playerid][pHeadValue]);
                    format(string,128,"<< Hitman %s has fulfilled the contract on %s and collected $%s >>",killer,name,FormatNumber(PlayerInfo[playerid][pHeadValue]));
                    SendFamilyMessage(8, COLOR_YELLOW, string);
                    PlayerInfo[playerid][pHeadValue] = 0;
                    GotHit[playerid] = 0;
                    GetChased[playerid] = 999;
                    GoChase[killerid] = 999;
                }
            }
        }
    }
    if(victimteam >= 4)
    {
        if(IsPlayerConnected(killerid))
        {
            new killer[MAX_PLAYER_NAME];
            GetPlayerName(killerid, killer, sizeof(killer));
            new slice = 100; //$100
            playercash = GetPlayerMoney(playerid);
            if(gTeam[killerid] != 2) { WantedPoints[killerid] += 2; } //+ 2 wanted points
            if(SafeTime[playerid] <= 0)
            {
                if(gTeam[killerid] != gTeam[playerid])
                {
                    if(GetPlayerState(killerid) == 1)
                    {
                        PlayerInfo[killerid][pKills] = PlayerInfo[killerid][pKills] + 2;
                    }
                    else
                    {
                        PlayerInfo[killerid][pKills]++;
                    }
                    PlayerInfo[playerid][pKills]--;
                }
            }
            /*if (strlen(deathreason) > 0)// patch
            {
                if (((gTeam[killerid]) == 1) || ((gTeam[killerid]) == 3 && civnokill) || gTeam[killerid] == gTeam[playerid])//med kill criminal
                {
                    format(string, sizeof(string), ".: %s murdered %s. (%s) :.", killer, name, deathreason);
                }
                else
                {
                    format(string, sizeof(string), ".: %s murdered %s. (%s) for $%d :.", killer, name, deathreason, slice);
                }

            }
            else
            {
                if (((gTeam[killerid]) == 1) || ((gTeam[killerid]) == 3 && civnokill || gTeam[killerid] == gTeam[playerid]))
                {
                    format(string, sizeof(string), ".: %s murdered %s :.", killer, name);
                }
                else
                {
                    format(string, sizeof(string), ".: %s murdered %s for $%d :.", killer, name, slice);
                }
            }*/

            if (((gTeam[killerid]) == 1) || ((gTeam[killerid]) == 3 && civnokill) || (gTeam[killerid] == gTeam[playerid] && gTeam[playerid] != 4))
            {
                slice = 0;
            }
            if (((gTeam[killerid]) != 4) && ((gTeam[killerid]) == gTeam[playerid]))//no team kill
            {
                slice = 0;
            }
            if (playercash > 0)
            {
                SafeGivePlayerMoney(playerid, -slice);
            }
            else
            {
                slice = slice+500;
            }
            //SafeGivePlayerMoney(killerid, slice);
            //GameTextForPlayer(playerid, dmessage, 5000, 2);
            PlayerPlaySound(killerid, 1083, 0.0, 0.0, 0.0);
            if (((gTeam[killerid]) == 3) && reason != 49)
            {
                SetPlayerCriminal(killerid,255, "First Degree Murder");
            }
            else if (((gTeam[killerid]) == 3) && reason == 49)
            {
                SetPlayerCriminal(killerid,255, "Hit And Run");
            }
        }
    }
    else if (victimteam == 2)
    {
        if(IsPlayerConnected(killerid))
        {
            //new killer[MAX_PLAYER_NAME];
            //GetPlayerName(killerid, killer, sizeof(killer));
            // Cop kill
            PlayerInfo[playerid][pKills]--;
            if (gTeam[killerid] == 2)//cops kill cop
            {
                //format(string,128,".: Officer %s murdered Officer %s (%s) and was sued for $%d :.",killer,name,deathreason,suecost);
                PlayerPlaySound(killerid, 1084, 0.0, 0.0, 0.0);
                SafeGivePlayerMoney(killerid, -suecost);
                SafeGivePlayerMoney(playerid, suecost+100);//+100pays hospital bill
            }
            else
            {
                //format(string,128,".: %s murdered Officer %s (%s) :.",killer,name,deathreason);
            }
            if (gTeam[killerid] >= 3)
            {
                WantedPoints[killerid] += 2; //+ 2 wanted points
                if(reason != 49)
                {
                WantedPoints[playerid]+=2;
                    SetPlayerCriminal(killerid,255, "First Degree Murder");
                }
                else if (reason == 49)
                {
                WantedPoints[playerid]+=2;
                    SetPlayerCriminal(killerid,255, "Hit And Run");
                }
            }
            if(gTeam[killerid] >= 5 && SafeTime[playerid] <= 0)
            {
                if(GetPlayerState(killerid) == 1)
                {
                    PlayerInfo[killerid][pKills] = PlayerInfo[killerid][pKills]+2;
                }
                else
                {
                    PlayerInfo[killerid][pKills]++;
                }
                WantedPoints[killerid]+=2;
            }
            //BroadCast(COLOR_RED, string);
        }
    }
    else if (victimteam == 3)
    {
        if(IsPlayerConnected(killerid))
        {
            //new killer[MAX_PLAYER_NAME];
            //GetPlayerName(killerid, killer, sizeof(killer));
            // Civ kill
            if ((gTeam[killerid]) == 2)//cops kill civ
            {
                if(WantedLevel[playerid] < 1)
                {
                    //format(string,128,".: Officer %s murdered %s (%s) and was sued for $%d :.",killer,name,deathreason,suecost);
                    PlayerPlaySound(killerid, 1084, 0.0, 0.0, 0.0);
                    SafeGivePlayerMoney(killerid, -suecost);
                    SafeGivePlayerMoney(playerid, suecost+10);//+100pays hospital bill
                }
            }
            else
            {
                //format(string,128,".: %s murdered %s (%s) :.",killer,name,deathreason);
                WantedPoints[killerid] += 2;
            }
            if (((gTeam[killerid]) >= 3 || (gTeam[killerid]) == 1) && reason != 49)
            {
                WantedPoints[playerid]+=2;
                SetPlayerCriminal(killerid,255, "First Degree Murder");
            }
            else if (((gTeam[killerid]) >= 3 || (gTeam[killerid]) == 1) && reason == 49)
            {
                WantedPoints[playerid]+=2;
                SetPlayerCriminal(killerid,255, "Hit And Run");
            }
            //BroadCast(COLOR_RED, string);
        }
    }
    else if (victimteam == 1)
    {
        if(IsPlayerConnected(killerid))
        {
            //new killer[MAX_PLAYER_NAME];
            //GetPlayerName(killerid, killer, sizeof(killer));
            // Civ kill
            if ((gTeam[killerid]) == 2)//cops kill civ
            {
                //format(string,128,".: Officer %s murdered Paramedic %s (%s) and was sued for $%d :.",killer,name,deathreason,suecost);
                PlayerPlaySound(killerid, 1084, 0.0, 0.0, 0.0);
                SafeGivePlayerMoney(killerid, -suecost);
                SafeGivePlayerMoney(playerid, suecost+10);//+100pays hospital bill
            }
            else if ((gTeam[killerid]) == 1)//med kill civ
            {
                //format(string,128,".: Paramedic %s murdered %s (%s) and was sued for $%d :.",killer,name,deathreason,suecost);
                PlayerPlaySound(killerid, 1084, 0.0, 0.0, 0.0);
                SafeGivePlayerMoney(killerid, -suecost);
                SafeGivePlayerMoney(playerid, suecost+10);//+100pays hospital bill
            }
            else
            {
                //format(string,128,".: %s murdered %s (%s) :.",killer,name,deathreason);
            }
            if (((gTeam[killerid]) == 4) && reason != 49)
            {
                WantedPoints[playerid]+=2;
                SetPlayerCriminal(killerid,255, "First Degree Murder");
            }
            else if (((gTeam[killerid]) == 3) && reason == 49)
            {
                WantedPoints[playerid]+=2;
                SetPlayerCriminal(killerid,255, "Hit And Run");
            }
            //BroadCast(COLOR_RED, string);
        }
    }
    if (victimteam >= 3 && WantedPoints[playerid] > 0 && killerteam == 2)
    {
        SetPlayerFree(playerid,killerid, "Got Killed");
    }
    if (BusrouteEast[playerid][0] != 0 || BusrouteWest[playerid][0] != 0)
    {
        if (BusrouteEast[playerid][0] != 0) BusrouteEnd(playerid, BusrouteEast[playerid][1]);
        else if (BusrouteWest[playerid][0] != 0) BusrouteEnd(playerid, BusrouteWest[playerid][1]);
        else BusrouteEnd(playerid, 0);
    }
    if(FarmerVar[playerid] != 0)
    {
        FarmerVar[playerid] = 0;
        DisablePlayerCheckpoint(playerid);
    }
    if(DrugFarmerVar[playerid] != 0)
    {
        DrugFarmerVar[playerid] = 0;
        DisablePlayerCheckpoint(playerid);
    }
    killerid = INVALID_PLAYER_ID;
    SetPlayerColor(playerid,COLOR_GRAD2);
    return 1;
}
Pypp is offline  
Old 03/04/2013, 05:13 PM   #2
DyduShxD
Gangsta
 
DyduShxD's Avatar
 
Join Date: Jan 2013
Location: Romania,Suceava
Posts: 594
Reputation: 6
Default Re: Wanted la civili

Edit scuzati vroiam sa comentez la alt topic
DyduShxD is offline  
Old 03/04/2013, 05:13 PM   #3
Allx
Huge Clucker
 
Join Date: Dec 2012
Posts: 261
Reputation: 3
Default Re: Wanted la civili

Este foarte simplu
Mai intai cream variabila wanted
pawn Code:
new wanted;
Punem conditia ca playerul sa nu fie in nicio factiune
pawn Code:
if(PlayerInfo[killerid][pMember] == 0 || PlayerInfo[killerid][pLeader] == 0)
{
}
Acum sa luam wantedul playerului
pawn Code:
GetPlayerWantedLevel(killerid);
Acum sa setam wantedul playerului
pawn Code:
SetPlayerWantedLevel(killerid,wanted+1);
Acum un mesaj de confirmare
pawn Code:
SendClientMessage(killerid,COLOR_RED,"Ai primit wanted 1 deoarece ai ucis un player.");
Deci codul arata cam asa:
pawn Code:
new wanted;
if(PlayerInfo[killerid][pMember] == 0 || PlayerInfo[killerid][pLeader] == 0)
{
GetPlayerWantedLevel(killerid);
SetPlayerWantedLevel(killerid,wanted+1);
SendClientMessage(killerid,COLOR_RED,"Ai primit wanted 1 deoarece ai ucis un player.");
}
__________________
[FilterScript]My first FilterScript:GunGame v1 by Allx:http://forum.sa-mp.com/showthread.php?t=410952
[FilterScript] GunGame v2 by Allx:http://forum.sa-mp.com/showthread.php?t=412797
Allx is offline  
Old 03/04/2013, 05:36 PM   #4
InfiniTy.
High-roller
 
InfiniTy.'s Avatar
 
Join Date: Oct 2012
Location: Romania,Galați
Posts: 1,258
Reputation: 119
Default Re: Wanted la civili

Quote:
Originally Posted by Allx View Post
Este foarte simplu
Mai intai cream variabila wanted
pawn Code:
new wanted;
Punem conditia ca playerul sa nu fie in nicio factiune
pawn Code:
if(PlayerInfo[killerid][pMember] == 0 || PlayerInfo[killerid][pLeader] == 0)
{
}
Acum sa luam wantedul playerului
pawn Code:
GetPlayerWantedLevel(killerid);
Acum sa setam wantedul playerului
pawn Code:
SetPlayerWantedLevel(killerid,wanted+1);
Acum un mesaj de confirmare
pawn Code:
SendClientMessage(killerid,COLOR_RED,"Ai primit wanted 1 deoarece ai ucis un player.");
Deci codul arata cam asa:
pawn Code:
new wanted;
if(PlayerInfo[killerid][pMember] == 0 || PlayerInfo[killerid][pLeader] == 0)
{
GetPlayerWantedLevel(killerid);
SetPlayerWantedLevel(killerid,wanted+1);
SendClientMessage(killerid,COLOR_RED,"Ai primit wanted 1 deoarece ai ucis un player.");
}
Chiar daca omoara 5,10,15 playeri tot wanted 1 va avea.
InfiniTy. is offline  
Old 04/04/2013, 01:56 PM   #5
CePaX
Big Clucker
 
Join Date: Dec 2011
Posts: 169
Reputation: 1
Default Re: Wanted la civili

Quote:
Originally Posted by InfiniTy. View Post
Chiar daca omoara 5,10,15 playeri tot wanted 1 va avea.



a pus wanted+1, deci te gresesti. Mesaju la gresit doar.
CePaX is offline  
Old 04/04/2013, 02:00 PM   #6
InfiniTy.
High-roller
 
InfiniTy.'s Avatar
 
Join Date: Oct 2012
Location: Romania,Galați
Posts: 1,258
Reputation: 119
Default Re: Wanted la civili

Quote:
Originally Posted by CePaX View Post
a pus wanted+1, deci te gresesti. Mesaju la gresit doar.
Stiu ce zic..

pawn Code:
new wanted;
//other stuff
GetPlayerWantedLevel(killerid);
SetPlayerWantedLevel(killerid,wanted+1);

Uite-te mai bine.. el nici nu ia wanted la player..adica a pus functia dar nu pune acel wanted la nici o variabila(normal era destinat acel wanted spre variabila wanted dar a uitat sa puna wanted = getplayerwanted bla bla) .. in concluzie el seteaza 0+1 mereu.
InfiniTy. is offline  
Old 04/04/2013, 05:48 PM   #7
Pypp
Little Clucker
 
Join Date: Feb 2013
Posts: 23
Reputation: 0
Default Re: Wanted la civili

Daca omoara tot nu primeste wanted.. uitati cum am facut
pawn Code:
public OnPlayerDeath(playerid, killerid, reason)
{
if(PlayerInfo[killerid][pMember] == 1||PlayerInfo[killerid][pLeader] == 1||PlayerInfo[killerid][pMember] == 2||PlayerInfo[killerid][pLeader] ==2||PlayerInfo[killerid][pMember] == 3||PlayerInfo[killerid][pLeader] ==3)
{
SetPlayerWantedLevel(killerid, 0);
}
    new name[MAX_PLAYER_NAME];
    new string[256];
    //new dmessage[128];
    //new deathreason[20];
    new playercash;
    new victimteam;
    new Float:px,Float:py,Float:pz;
    new killerteam;
    new wanted;
   

    victimteam = gTeam[playerid];
    killerteam = gTeam[killerid];
    gPlayerSpawned[playerid] = 0;
    PlayerInfo[playerid][pInvWeapon] = 0;
    PlayerInfo[playerid][pInvAmmo] = 0;
    GetPlayerName(playerid, name, sizeof(name));
    PlayerInfo[playerid][pLocal] = 255;
    GetPlayerPos(playerid, px, py, pz);
    if(killerid != 255)
    {
        if(GetPlayerState(killerid) == 2)
        {
            if(ProxDetectorS(20, killerid, playerid))
            {
                if(!IsPlayerInAnyVehicle(playerid))
                {
                    if(PlayerInfo[killerid][pMember] == 1||PlayerInfo[killerid][pLeader] == 1||PlayerInfo[killerid][pMember] == 2||PlayerInfo[killerid][pLeader] ==2)
                    {
                        SendClientMessage(killerid, COLOR_YELLOW, "That was a drive-by kill. Don't abuse it.");
                        return 1;
                    }
                    SetPlayerCriminal(killerid,255,"Manslaughter");
                    SetPlayerWantedLevel(killerid, GetPlayerWantedLevel(killerid)+1);
                    return 1;
                }
            }
        }
    }
 if(PlayerInfo[killerid][pMember] == 0 || PlayerInfo[killerid][pLeader] == 0)
{
GetPlayerWantedLevel(killerid);
SetPlayerWantedLevel(killerid,wanted+1);
SendClientMessage(killerid,COLOR_RED,"First degree murder.");
}
    if (PlayerInfo[killerid][pAdmin] < 1)
    {
        if(reason == 38)
        {
            new kstring[128];
            new kickname[MAX_PLAYER_NAME];
            if(IsPlayerConnected(killerid))
            {
                GetPlayerName(killerid, kickname, sizeof(kickname));
                format(string, 256, "AdmWarning: [%d]%s just killed a [%d]%s with minigun.",killerid,kickname,playerid,name);
                ABroadCast(COLOR_LIGHTRED,string,1);
                printf("%s", kstring);
                //Ban(killerid);
            }
        }
        if(reason == 35)
        {
            new kstring[128];
            new kickname[MAX_PLAYER_NAME];
            if(IsPlayerConnected(killerid))
            {
                GetPlayerName(killerid, kickname, sizeof(kickname));
                format(string, 256, "AdmWarning: [%d]%s just killed a player with a flamethrower and has been IP banned.",killerid,kickname);
                ABroadCast(COLOR_LIGHTRED,string,1);
                printf("%s", kstring);
                Ban(killerid);
            }
        }
        if(reason == 9)
        {
            new kstring[128];
            new kickname[MAX_PLAYER_NAME];
            if(IsPlayerConnected(killerid))
            {
                GetPlayerName(killerid, kickname, sizeof(kickname));
                format(string, 256, "AdmWarning: [%d]%s just killed a player with a chainsaw and has been IP banned.",killerid,kickname);
                ABroadCast(COLOR_LIGHTRED,string,1);
                printf("%s", kstring);
                Ban(killerid);
            }
        }
        if(reason == 16)
        {
            new kstring[128];
            new kickname[MAX_PLAYER_NAME];
            if(IsPlayerConnected(killerid))
            {
                GetPlayerName(killerid, kickname, sizeof(kickname));
                format(string, 256, "AdmWarning: [%d]%s just killed a player with grenades and has been IP banned.",killerid,kickname);
                ABroadCast(COLOR_LIGHTRED,string,1);
                printf("%s", kstring);
                Ban(killerid);
            }
        }
        if(reason == 18)
        {
            new kstring[128];
            new kickname[MAX_PLAYER_NAME];
            if(IsPlayerConnected(killerid))
            {
                GetPlayerName(killerid, kickname, sizeof(kickname));
                format(string, 256, "AdmWarning: [%d]%s just killed a player with molotovs and has been IP banned.",killerid,kickname);
                ABroadCast(COLOR_LIGHTRED,string,1);
                printf("%s", kstring);
                Ban(killerid);
            }
        }
        if(reason == 28)
        {
            new kstring[128];
            new kickname[MAX_PLAYER_NAME];
            if(IsPlayerConnected(killerid))
            {
                GetPlayerName(killerid, kickname, sizeof(kickname));
                format(string, 256, "AdmWarning: [%d]%s just killed a player with a Mac 10, Check him immediately.",killerid,kickname);
                ABroadCast(COLOR_LIGHTRED,string,1);
                printf("%s", kstring);
            }
        }
        if(reason == 32)
        {
            new kstring[128];
            new kickname[MAX_PLAYER_NAME];
            if(IsPlayerConnected(killerid))
            {
                GetPlayerName(killerid, kickname, sizeof(kickname));
                format(string, 256, "AdmWarning: [%d]%s just killed a player with Tec 9's, Check him immediately.",killerid,kickname);
                ABroadCast(COLOR_LIGHTRED,string,1);
                printf("%s", kstring);
            }
        }
        if(reason == 36)
        {
            new kstring[128];
            new kickname[MAX_PLAYER_NAME];
            if(IsPlayerConnected(killerid))
            {
                GetPlayerName(killerid, kickname, sizeof(kickname));
                format(string, 256, "AdmWarning: [%d]%s just killed a player with a Lock On Launcher and has been IP banned.",killerid,kickname);
                ABroadCast(COLOR_LIGHTRED,string,1);
                printf("%s", kstring);
                Ban(killerid);
            }
        }
    }
    if (gPlayerCheckpointStatus[playerid] > 4 && gPlayerCheckpointStatus[playerid] < 11)
    {
        DisablePlayerCheckpoint(playerid);
        gPlayerCheckpointStatus[playerid] = CHECKPOINT_NONE;
    }
    new caller = Mobile[playerid];
    if(caller != 255)
    {
        if(caller < 255)
        {
            SendClientMessage(caller,  COLOR_GRAD2, "** The line just went dead....");
            CellTime[caller] = 0;
            CellTime[playerid] = 0;
            Mobile[caller] = 255;
        }
        Mobile[playerid] = 255;
        CellTime[playerid] = 0;
    }
    ClearCrime(playerid);
    if(PlayerPaintballing[playerid] != 0)
    {
        PlayerPaintballKills[killerid] ++;
        if(PlayerPaintballKills[killerid] > PaintballWinnerKills)
        {
            new killer[MAX_PLAYER_NAME];
            PaintballWinner = killerid;
            PaintballWinnerKills = PlayerPaintballKills[killerid];
            GetPlayerName(killerid, killer, sizeof(killer));
            for(new i = 0; i < MAX_PLAYERS; i++)
            {
                if(IsPlayerConnected(i))
                {
                    if(PlayerPaintballing[i] != 0)
                    {
                        format(string, sizeof(string), "* %s is in the lead with %d Kills.",killer,PaintballWinnerKills);
                        SendClientMessage(i, COLOR_WHITE, string);
                    }
                }
            }
        }
        return 1;
    }
    if(GettingCK[playerid] < 999)
    {
        if(IsPlayerConnected(killerid))
        {
            if(OnCK[killerid] < 999)
            {
                new killer[MAX_PLAYER_NAME];
                new dier[MAX_PLAYER_NAME];
                GetPlayerName(playerid, dier, sizeof(dier));
                GetPlayerName(killerid, killer, sizeof(killer));
                format(string, sizeof(string), "* %s has performed a Character Kill on you, you aren't able to play with this Character anymore.",killer);
                SendClientMessage(playerid, COLOR_LIGHTRED, string);
                format(string, sizeof(string), "** %s has Character Killed %s **",killer,dier);
                CKLog(string);
                BroadCast(COLOR_LIGHTRED, string);
                PlayerInfo[playerid][pCK] = 1;
                if(GettingCK[playerid] < 999) { GettingCK[playerid] = 999; }
                else if(OnCK[playerid] < 999) { OnCK[playerid] = 999; }
                if(GettingCK[killerid] < 999) { GettingCK[killerid] = 999; }
                else if(OnCK[killerid] < 999) { OnCK[killerid] = 999; }
                KickPlayer[playerid] = 1;
            }
        }
    }
    if(PlayerInfo[playerid][pHeadValue] > 0)
    {
        if(IsPlayerConnected(killerid))
        {
            if(gTeam[killerid] == 10 || PlayerInfo[killerid][pLeader] == 8)
            {
                if(GoChase[killerid] == playerid)
                {
                    ConsumingMoney[killerid] = 1;
                    new killer[MAX_PLAYER_NAME];
                    GetPlayerName(killerid, killer, sizeof(killer));
                    SafeGivePlayerMoney(killerid, PlayerInfo[playerid][pHeadValue]);
                    format(string,128,"<< Hitman %s has fulfilled the contract on %s and collected $%s >>",killer,name,FormatNumber(PlayerInfo[playerid][pHeadValue]));
                    SendFamilyMessage(8, COLOR_YELLOW, string);
                    PlayerInfo[playerid][pHeadValue] = 0;
                    GotHit[playerid] = 0;
                    GetChased[playerid] = 999;
                    GoChase[killerid] = 999;
                }
            }
        }
    }
    if(victimteam >= 4)
    {
        if(IsPlayerConnected(killerid))
        {
            new killer[MAX_PLAYER_NAME];
            GetPlayerName(killerid, killer, sizeof(killer));
            new slice = 100; //$100
            playercash = GetPlayerMoney(playerid);
            if(gTeam[killerid] != 2) { WantedPoints[killerid] += 2; } //+ 2 wanted points
            if(SafeTime[playerid] <= 0)
            {
                if(gTeam[killerid] != gTeam[playerid])
                {
                    if(GetPlayerState(killerid) == 1)
                    {
                        PlayerInfo[killerid][pKills] = PlayerInfo[killerid][pKills] + 2;
                    }
                    else
                    {
                        PlayerInfo[killerid][pKills]++;
                    }
                    PlayerInfo[playerid][pKills]--;
                }
            }
            /*if (strlen(deathreason) > 0)// patch
            {
                if (((gTeam[killerid]) == 1) || ((gTeam[killerid]) == 3 && civnokill) || gTeam[killerid] == gTeam[playerid])//med kill criminal
                {
                    format(string, sizeof(string), ".: %s murdered %s. (%s) :.", killer, name, deathreason);
                }
                else
                {
                    format(string, sizeof(string), ".: %s murdered %s. (%s) for $%d :.", killer, name, deathreason, slice);
                }

            }
            else
            {
                if (((gTeam[killerid]) == 1) || ((gTeam[killerid]) == 3 && civnokill || gTeam[killerid] == gTeam[playerid]))
                {
                    format(string, sizeof(string), ".: %s murdered %s :.", killer, name);
                }
                else
                {
                    format(string, sizeof(string), ".: %s murdered %s for $%d :.", killer, name, slice);
                }
            }*/

            if (((gTeam[killerid]) == 1) || ((gTeam[killerid]) == 3 && civnokill) || (gTeam[killerid] == gTeam[playerid] && gTeam[playerid] != 4))
            {
                slice = 0;
            }
            if (((gTeam[killerid]) != 4) && ((gTeam[killerid]) == gTeam[playerid]))//no team kill
            {
                slice = 0;
            }
            if (playercash > 0)
            {
                SafeGivePlayerMoney(playerid, -slice);
            }
            else
            {
                slice = slice+500;
            }
            //SafeGivePlayerMoney(killerid, slice);
            //GameTextForPlayer(playerid, dmessage, 5000, 2);
            PlayerPlaySound(killerid, 1083, 0.0, 0.0, 0.0);
            if (((gTeam[killerid]) == 3) && reason != 49)
            {
                SetPlayerCriminal(killerid,255, "First Degree Murder");
            }
            else if (((gTeam[killerid]) == 3) && reason == 49)
            {
                SetPlayerCriminal(killerid,255, "Hit And Run");
            }
        }
    }
    else if (victimteam == 2)
    {
        if(IsPlayerConnected(killerid))
        {
            //new killer[MAX_PLAYER_NAME];
            //GetPlayerName(killerid, killer, sizeof(killer));
            // Cop kill
            PlayerInfo[playerid][pKills]--;
            if (gTeam[killerid] == 2)//cops kill cop
            {
                //format(string,128,".: Officer %s murdered Officer %s (%s) and was sued for $%d :.",killer,name,deathreason,suecost);
                PlayerPlaySound(killerid, 1084, 0.0, 0.0, 0.0);
                SafeGivePlayerMoney(killerid, -suecost);
                SafeGivePlayerMoney(playerid, suecost+100);//+100pays hospital bill
            }
            else
            {
                //format(string,128,".: %s murdered Officer %s (%s) :.",killer,name,deathreason);
            }
            if (gTeam[killerid] >= 3)
            {
                WantedPoints[killerid] += 2; //+ 2 wanted points
                if(reason != 49)
                {
                WantedPoints[playerid]+=2;
                    SetPlayerCriminal(killerid,255, "First Degree Murder");
                }
                else if (reason == 49)
                {
                WantedPoints[playerid]+=2;
                    SetPlayerCriminal(killerid,255, "Hit And Run");
                }
            }
            if(gTeam[killerid] >= 5 && SafeTime[playerid] <= 0)
            {
                if(GetPlayerState(killerid) == 1)
                {
                    PlayerInfo[killerid][pKills] = PlayerInfo[killerid][pKills]+2;
                }
                else
                {
                    PlayerInfo[killerid][pKills]++;
                }
                WantedPoints[killerid]+=2;
            }
            //BroadCast(COLOR_RED, string);
        }
    }
    else if (victimteam == 3)
    {
        if(IsPlayerConnected(killerid))
        {
            //new killer[MAX_PLAYER_NAME];
            //GetPlayerName(killerid, killer, sizeof(killer));
            // Civ kill
            if ((gTeam[killerid]) == 2)//cops kill civ
            {
                if(WantedLevel[playerid] < 1)
                {
                    //format(string,128,".: Officer %s murdered %s (%s) and was sued for $%d :.",killer,name,deathreason,suecost);
                    PlayerPlaySound(killerid, 1084, 0.0, 0.0, 0.0);
                    SafeGivePlayerMoney(killerid, -suecost);
                    SafeGivePlayerMoney(playerid, suecost+10);//+100pays hospital bill
                }
            }
            else
            {
                //format(string,128,".: %s murdered %s (%s) :.",killer,name,deathreason);
                WantedPoints[killerid] += 2;
            }
            if (((gTeam[killerid]) >= 3 || (gTeam[killerid]) == 1) && reason != 49)
            {
                WantedPoints[playerid]+=2;
                SetPlayerCriminal(killerid,255, "First Degree Murder");
            }
            else if (((gTeam[killerid]) >= 3 || (gTeam[killerid]) == 1) && reason == 49)
            {
                WantedPoints[playerid]+=2;
                SetPlayerCriminal(killerid,255, "Hit And Run");
            }
            //BroadCast(COLOR_RED, string);
        }
    }
    else if (victimteam == 1)
    {
        if(IsPlayerConnected(killerid))
        {
            //new killer[MAX_PLAYER_NAME];
            //GetPlayerName(killerid, killer, sizeof(killer));
            // Civ kill
            if ((gTeam[killerid]) == 2)//cops kill civ
            {
                //format(string,128,".: Officer %s murdered Paramedic %s (%s) and was sued for $%d :.",killer,name,deathreason,suecost);
                PlayerPlaySound(killerid, 1084, 0.0, 0.0, 0.0);
                SafeGivePlayerMoney(killerid, -suecost);
                SafeGivePlayerMoney(playerid, suecost+10);//+100pays hospital bill
            }
            else if ((gTeam[killerid]) == 1)//med kill civ
            {
                //format(string,128,".: Paramedic %s murdered %s (%s) and was sued for $%d :.",killer,name,deathreason,suecost);
                PlayerPlaySound(killerid, 1084, 0.0, 0.0, 0.0);
                SafeGivePlayerMoney(killerid, -suecost);
                SafeGivePlayerMoney(playerid, suecost+10);//+100pays hospital bill
            }
            else
            {
                //format(string,128,".: %s murdered %s (%s) :.",killer,name,deathreason);
            }
            if (((gTeam[killerid]) == 4) && reason != 49)
            {
                WantedPoints[playerid]+=2;
                SetPlayerCriminal(killerid,255, "First Degree Murder");
            }
            else if (((gTeam[killerid]) == 3) && reason == 49)
            {
                WantedPoints[playerid]+=2;
                SetPlayerCriminal(killerid,255, "Hit And Run");
            }
            //BroadCast(COLOR_RED, string);
        }
    }
    if (victimteam >= 3 && WantedPoints[playerid] > 0 && killerteam == 2)
    {
        SetPlayerFree(playerid,killerid, "Got Killed");
    }
    if (BusrouteEast[playerid][0] != 0 || BusrouteWest[playerid][0] != 0)
    {
        if (BusrouteEast[playerid][0] != 0) BusrouteEnd(playerid, BusrouteEast[playerid][1]);
        else if (BusrouteWest[playerid][0] != 0) BusrouteEnd(playerid, BusrouteWest[playerid][1]);
        else BusrouteEnd(playerid, 0);
    }
    if(FarmerVar[playerid] != 0)
    {
        FarmerVar[playerid] = 0;
        DisablePlayerCheckpoint(playerid);
    }
    if(DrugFarmerVar[playerid] != 0)
    {
        DrugFarmerVar[playerid] = 0;
        DisablePlayerCheckpoint(playerid);
    }
    killerid = INVALID_PLAYER_ID;
    SetPlayerColor(playerid,COLOR_GRAD2);
    return 1;
}
Pypp is offline  
Old 05/04/2013, 05:16 AM   #8
gabyk
Big Clucker
 
gabyk's Avatar
 
Join Date: Sep 2011
Location: Romānia
Posts: 163
Reputation: 5
Default Re: Wanted la civili

Foloseste metoda debuging.. nu pune script-ul in alte verificari...
Pune actiunea la inceputul callback-ului OnPlayerDeath pe id-ul killerid
gabyk is offline  
 

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Adding 1 Wanted Level to present wanted level. Shockey HD Help Archive 1 12/08/2011 03:40 AM
Wanted help! nikai Help Archive 0 14/07/2011 10:51 AM
Wanted +1 dillo1000 Help Archive 2 14/10/2010 06:01 PM
/wanted list of persons with wanted [EDIT... problem solved] jesse237 Help Archive 8 24/02/2009 10:19 AM


All times are GMT. The time now is 01:45 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.