[POMOC] War

Započeo Farkias, Mart 06, 2013, 16:55:57 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

Skripta koju koristim : CLRP (EDIT)
Opis problema: Ovako , radim čitav dan ovaj war sistem i sve sam sredio nema ni jednog errora ni warninga ali kada ubacim ovo nešto pod Public OnPlayerDeath izbaci mi neke errore , evo dati ću vam ja čitav onplayerdeath i ove kodove koji se trebaju ubaciti pa ako ko zna gdje treba da stavim na koje mjesto tačnije..
Dio Skripte:

OnPlayerDeath :

public OnPlayerDeath(playerid, killerid, reason)
{
//----------------------------------Za FakeKill hack----------------------------
    new ime[MAX_PLAYER_NAME]; GetPlayerName(killerid, ime, sizeof(ime));
new igrac[MAX_PLAYER_NAME]; GetPlayerName(playerid, igrac, sizeof(igrac));
    new name[MAX_PLAYER_NAME];
new playercash;
new victimteam;
new Float:px,Float:py,Float:pz;
new killerteam;
    new string[128];
new name2[MAX_PLAYER_NAME];
new y, m, d;
new h,mi,s;
getdate(y,m,d);
gettime(h,mi,s);
GetPlayerName(playerid, name, sizeof(name));
GetPlayerName(killerid, name2, sizeof(name2));
    if(killerid != INVALID_PLAYER_ID)
{
if(GetPlayerWeapon(killerid) != reason)
{
    if(AntiFakeKill == 1)
    {
        if(reason !=  51 || reason != 50 || reason != 18 || reason == 36 || reason == 35 || reason == 40 || reason == 16)
        {
        if(FakeKillWarns[playerid] == 4)
{
format(string, sizeof(string), "|FarkiAS|{ffffff} %s (%d),{00C0FF} Je kikovan od strane |FarkiAS| za moguci Lazni Death Hack.", name, playerid);
SendClientMessageToAll(COLOR_NICERED, string);
SendClientMessage(playerid,COLOR_LIGHTBLUE, "Ti si kikovan od strane |FarkiAS| Za moguci Lazni Smrt Hak.");
format(string,sizeof(string), "(%d/%d/%d)[%d:%d:%d] |FarkiAS| je kikovao %s za: Fake Death hack.",d,m,y,h,mi,s,name);
KickLog(string);
format(string,sizeof(string), "(%d/%d/%d)[%d:%d:%d] Kikovan od strane |FarkiAS| - Fake Death Hack.",d,m,y,h,mi,s,name);
Kick(playerid);
FakeKillWarns[playerid] ++;
}
}
}
}
}

//------------------------------------------------------------------------------
    SetPVarInt(playerid, "Krepo", 1);
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, "To je bilo drive-by ubojstvo.Nemojte to cesto raditi.");
return 1;
}
SetPlayerCriminal(killerid,255,"ubojstvo");
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, "[ADMIN] [%d]%s je ubio [%d]%s sa minigun-nom.",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, "[ADMIN] [%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, "[ADMIN] [%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, "[ADMIN] [%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, "[ADMIN] [%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, "[ADMIN] [%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, "[ADMIN] [%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, "[ADMIN] [%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, "Linija se prekinula....");
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));
foreach (Player, i)
{
                if(PlayerPaintballing[i] != 0)
                {
                    format(string, sizeof(string), "* %s je u vodjstvu sa %d ubistava.",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 je izvrsio Character Kill na vama, ne mozete igrati sa vasim likom vise.",killer);
            SendClientMessage(playerid, COLOR_LIGHTRED, string);
            format(string, sizeof(string), "** %s je izvrsio Character Kill na %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[playerid] != INVALID_PLAYER_ID)
        {
ConsumingMoney[killerid] = 1;
new killer[MAX_PLAYER_NAME];
GetPlayerName(killerid, killer, sizeof(killer));
GivePlayerMoney(killerid, PlayerInfo[playerid][pHeadValue]);
format(string,128,"Hitman %s je ubio svoju metu %s i zaradio $%d",killer,name,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 (((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)
{
GivePlayerCash(playerid, -slice);
}
else
{
slice = slice+500;
}
//GivePlayerCash(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, "Ubojstvo prvog stupnja");
}
else if (((gTeam[killerid]) == 3) && reason == 49)
{
SetPlayerCriminal(killerid,255, "Udar i bijeg");
}
}
}
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);
GivePlayerCash(killerid, -suecost);
GivePlayerCash(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)
{
SetPlayerCriminal(killerid,255, "Ubojstvo prvog stupnja");
}
else if (reason == 49)
{
SetPlayerCriminal(killerid,255, "Udar i bijeg");
}
}
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);
GivePlayerCash(killerid, -suecost);
GivePlayerCash(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)
{
SetPlayerCriminal(killerid,255, "Ubojstvo prvog stupnja");
}
else if (((gTeam[killerid]) >= 3 || (gTeam[killerid]) == 1) && reason == 49)
{
SetPlayerCriminal(killerid,255, "Udar i bijeg");
}
    //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);
GivePlayerCash(killerid, -suecost);
GivePlayerCash(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);
GivePlayerCash(killerid, -suecost);
GivePlayerCash(playerid, suecost+10);//+100pays hospital bill
}
else
{
//format(string,128,".: %s murdered %s (%s) :.",killer,name,deathreason);
    }
if (((gTeam[killerid]) == 4) && reason != 49)
{
SetPlayerCriminal(killerid,255, "Ubojstvo prvog stupnja");
}
else if (((gTeam[killerid]) == 3) && reason == 49)
{
SetPlayerCriminal(killerid,255, "Udar i bijeg");
}
    //BroadCast(COLOR_RED, string);
}
}
if (victimteam >= 3 && WantedPoints[playerid] > 0 && killerteam == 2)
{
    SetPlayerFree(playerid,killerid, "Je ubijen");
}
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);
}
if(SmugglerWork[playerid] != 0)
{
    SmugglerWork[playerid] = 0;
    DisablePlayerCheckpoint(playerid);
}
if(playerid == CashboxOwner)
{
    new str[128], pName[MAX_PLAYER_NAME];
    GetPlayerPos(playerid, CashboxX, CashboxY, CashboxZ);
    GetPlayerName(playerid, pName, sizeof(pName));
    format(str, 128, "%s (ID: %d) je umro i ispustio aktovku!", pName, playerid);
    SendClientMessageToAll(0xFFD700AA, str);
CashboxPickup = CreatePickup(1210, 3, CashboxX, CashboxY, CashboxZ);
CashboxOwner = INVALID_PLAYER_ID;
}
if(playerid == DrogaVlasnik)
{
    new str[128], pName[MAX_PLAYER_NAME];
    GetPlayerPos(playerid, DrogaX, DrogaY, DrogaZ);
    GetPlayerName(playerid, pName, sizeof(pName));
for(new i=0; i<MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(PlayerInfo[i][pMember] == 5 || PlayerInfo[i][pLeader] == 5 || PlayerInfo[i][pMember] == 6 || PlayerInfo[i][pLeader] == 6 || PlayerInfo[i][pMember] == 12 || PlayerInfo[i][pLeader] == 12 || PlayerInfo[i][pMember] == 13 || PlayerInfo[i][pLeader] == 13 || PlayerInfo[i][pLeader] == 14 ||PlayerInfo[i][pMember] == 14 || PlayerInfo[i][pMember] == 15 || PlayerInfo[i][pLeader] == 15 || PlayerInfo[i][pMember] == 16 || PlayerInfo[i][pLeader] == 16)
{
format(str, 128, "{FFFFFF}%s {FFD700}je umro i ispustio paket droge!", pName);
    SendClientMessage(i,0xFFD700AA,  str);
    DisablePlayerCheckpoint(playerid);
    }
    }
    }
DrogaPickup = CreatePickup(1279, 3, DrogaX, DrogaY, DrogaZ);
DrogaPickupStvoren = 1;
DrogaVlasnik = INVALID_PLAYER_ID;
}
killerid = INVALID_PLAYER_ID;
SetPlayerColor(playerid,COLOR_GRAD2);
return 1;
}


Evo i to Å¡to treba da se ubaci :

if(WarZapocet == 1)
{
if(WarTim[killerid] == 1)
{
    if(WarTim[playerid] == 1)
    {
        WarBrojanje2++;
        SendClientMessage(playerid, COLOR_RED, "*Protivnici su dobili bod jer ste TKali!");
}
else
{
    WarBrojanje1++;
    new str[256];
    format(str,256," (War) Igrac %s je ubio %s", ime, igrac);
    SendWarMessage(COLOR_LR, str);
}
}
if(WarTim[killerid] == 2)
{
    if(WarTim[playerid] == 2)
    {
        WarBrojanje1++;
        SendClientMessage(playerid, COLOR_RED, "*Protivnici su dobili bod jer ste TKali!");
}
else
{
    WarBrojanje2++;
    new str[256];
    format(str,256," (War) Igrac %s je ubio %s", ime, igrac);
    SendWarMessage(COLOR_LR, str);
}
}
}
return 1;
}

Citat: |LG|Yui_Sang poslato Mart 06, 2013, 17:12:53 POSLE PODNE
Probaj ovako

public OnPlayerDeath(playerid, killerid, reason)
{
//----------------------------------Za FakeKill hack----------------------------
    new ime[MAX_PLAYER_NAME]; GetPlayerName(killerid, ime, sizeof(ime));
new igrac[MAX_PLAYER_NAME]; GetPlayerName(playerid, igrac, sizeof(igrac));
    new name[MAX_PLAYER_NAME];
new playercash;
new victimteam;
new Float:px,Float:py,Float:pz;
new killerteam;
    new string[128];
new name2[MAX_PLAYER_NAME];
new y, m, d;
new h,mi,s;
getdate(y,m,d);
gettime(h,mi,s);
GetPlayerName(playerid, name, sizeof(name));
GetPlayerName(killerid, name2, sizeof(name2));
    if(killerid != INVALID_PLAYER_ID)
{
if(GetPlayerWeapon(killerid) != reason)
{
    if(AntiFakeKill == 1)
    {
        if(reason !=  51 || reason != 50 || reason != 18 || reason == 36 || reason == 35 || reason == 40 || reason == 16)
        {
        if(FakeKillWarns[playerid] == 4)
{
format(string, sizeof(string), "|FarkiAS|{ffffff} %s (%d),{00C0FF} Je kikovan od strane |FarkiAS| za moguci Lazni Death Hack.", name, playerid);
SendClientMessageToAll(COLOR_NICERED, string);
SendClientMessage(playerid,COLOR_LIGHTBLUE, "Ti si kikovan od strane |FarkiAS| Za moguci Lazni Smrt Hak.");
format(string,sizeof(string), "(%d/%d/%d)[%d:%d:%d] |FarkiAS| je kikovao %s za: Fake Death hack.",d,m,y,h,mi,s,name);
KickLog(string);
format(string,sizeof(string), "(%d/%d/%d)[%d:%d:%d] Kikovan od strane |FarkiAS| - Fake Death Hack.",d,m,y,h,mi,s,name);
Kick(playerid);
FakeKillWarns[playerid] ++;
}
}
}
}
}

//------------------------------------------------------------------------------
    SetPVarInt(playerid, "Krepo", 1);
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, "To je bilo drive-by ubojstvo.Nemojte to cesto raditi.");
return 1;
}
SetPlayerCriminal(killerid,255,"ubojstvo");
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, "[ADMIN] [%d]%s je ubio [%d]%s sa minigun-nom.",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, "[ADMIN] [%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, "[ADMIN] [%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, "[ADMIN] [%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, "[ADMIN] [%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, "[ADMIN] [%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, "[ADMIN] [%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, "[ADMIN] [%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, "Linija se prekinula....");
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));
foreach (Player, i)
{
                if(PlayerPaintballing[i] != 0)
                {
                    format(string, sizeof(string), "* %s je u vodjstvu sa %d ubistava.",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 je izvrsio Character Kill na vama, ne mozete igrati sa vasim likom vise.",killer);
            SendClientMessage(playerid, COLOR_LIGHTRED, string);
            format(string, sizeof(string), "** %s je izvrsio Character Kill na %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[playerid] != INVALID_PLAYER_ID)
        {
ConsumingMoney[killerid] = 1;
new killer[MAX_PLAYER_NAME];
GetPlayerName(killerid, killer, sizeof(killer));
GivePlayerMoney(killerid, PlayerInfo[playerid][pHeadValue]);
format(string,128,"Hitman %s je ubio svoju metu %s i zaradio $%d",killer,name,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 (((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)
{
GivePlayerCash(playerid, -slice);
}
else
{
slice = slice+500;
}
//GivePlayerCash(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, "Ubojstvo prvog stupnja");
}
else if (((gTeam[killerid]) == 3) && reason == 49)
{
SetPlayerCriminal(killerid,255, "Udar i bijeg");
}
}
}
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);
GivePlayerCash(killerid, -suecost);
GivePlayerCash(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)
{
SetPlayerCriminal(killerid,255, "Ubojstvo prvog stupnja");
}
else if (reason == 49)
{
SetPlayerCriminal(killerid,255, "Udar i bijeg");
}
}
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);
GivePlayerCash(killerid, -suecost);
GivePlayerCash(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)
{
SetPlayerCriminal(killerid,255, "Ubojstvo prvog stupnja");
}
else if (((gTeam[killerid]) >= 3 || (gTeam[killerid]) == 1) && reason == 49)
{
SetPlayerCriminal(killerid,255, "Udar i bijeg");
}
    //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);
GivePlayerCash(killerid, -suecost);
GivePlayerCash(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);
GivePlayerCash(killerid, -suecost);
GivePlayerCash(playerid, suecost+10);//+100pays hospital bill
}
else
{
//format(string,128,".: %s murdered %s (%s) :.",killer,name,deathreason);
    }
if (((gTeam[killerid]) == 4) && reason != 49)
{
SetPlayerCriminal(killerid,255, "Ubojstvo prvog stupnja");
}
else if (((gTeam[killerid]) == 3) && reason == 49)
{
SetPlayerCriminal(killerid,255, "Udar i bijeg");
}
    //BroadCast(COLOR_RED, string);
}
}
if (victimteam >= 3 && WantedPoints[playerid] > 0 && killerteam == 2)
{
    SetPlayerFree(playerid,killerid, "Je ubijen");
}
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);
}
if(SmugglerWork[playerid] != 0)
{
    SmugglerWork[playerid] = 0;
    DisablePlayerCheckpoint(playerid);
}
if(playerid == CashboxOwner)
{
    new str[128], pName[MAX_PLAYER_NAME];
    GetPlayerPos(playerid, CashboxX, CashboxY, CashboxZ);
    GetPlayerName(playerid, pName, sizeof(pName));
    format(str, 128, "%s (ID: %d) je umro i ispustio aktovku!", pName, playerid);
    SendClientMessageToAll(0xFFD700AA, str);
CashboxPickup = CreatePickup(1210, 3, CashboxX, CashboxY, CashboxZ);
CashboxOwner = INVALID_PLAYER_ID;
}
if(playerid == DrogaVlasnik)
{
    new str[128], pName[MAX_PLAYER_NAME];
    GetPlayerPos(playerid, DrogaX, DrogaY, DrogaZ);
    GetPlayerName(playerid, pName, sizeof(pName));
for(new i=0; i<MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(PlayerInfo[i][pMember] == 5 || PlayerInfo[i][pLeader] == 5 || PlayerInfo[i][pMember] == 6 || PlayerInfo[i][pLeader] == 6 || PlayerInfo[i][pMember] == 12 || PlayerInfo[i][pLeader] == 12 || PlayerInfo[i][pMember] == 13 || PlayerInfo[i][pLeader] == 13 || PlayerInfo[i][pLeader] == 14 ||PlayerInfo[i][pMember] == 14 || PlayerInfo[i][pMember] == 15 || PlayerInfo[i][pLeader] == 15 || PlayerInfo[i][pMember] == 16 || PlayerInfo[i][pLeader] == 16)
{
format(str, 128, "{FFFFFF}%s {FFD700}je umro i ispustio paket droge!", pName);
    SendClientMessage(i,0xFFD700AA,  str);
    DisablePlayerCheckpoint(playerid);
    }
    }
    }
DrogaPickup = CreatePickup(1279, 3, DrogaX, DrogaY, DrogaZ);
DrogaPickupStvoren = 1;
DrogaVlasnik = INVALID_PLAYER_ID;
}
killerid = INVALID_PLAYER_ID;
SetPlayerColor(playerid,COLOR_GRAD2);
if(WarZapocet == 1)
{
if(WarTim[killerid] == 1)
{
    if(WarTim[playerid] == 1)
    {
        WarBrojanje2++;
        SendClientMessage(playerid, COLOR_RED, "*Protivnici su dobili bod jer ste TKali!");
}
else
{
    WarBrojanje1++;
    new str[256];
    format(str,256," (War) Igrac %s je ubio %s", ime, igrac);
    SendWarMessage(COLOR_LR, str);
}
}
if(WarTim[killerid] == 2)
{
    if(WarTim[playerid] == 2)
    {
        WarBrojanje1++;
        SendClientMessage(playerid, COLOR_RED, "*Protivnici su dobili bod jer ste TKali!");
}
else
{
    WarBrojanje2++;
    new str[256];
    format(str,256," (War) Igrac %s je ubio %s", ime, igrac);
    SendWarMessage(COLOR_LR, str);
}
}
}
return 1;
}       


Evo nema errora odoh sada testati ovo ostalo Å¡to sam ja radio , sve u svemu hvala :)