[POMOC] Wanted Level

Započeo FarkiAs, Jul 30, 2013, 18:10:35 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 2 gostiju pregledaju ovu temu.

FarkiAs

YCMD:warpozovi(playerid, params[], help)
{
#pragma unused help
if(PlayerInfo[playerid][pAdmin] >= 1)
{
new id;
if(sscanf(params, "u", id)) return SCM(playerid,-1, "{FFFFFF}EG Pomoc |{00C0FF} /warpozovi [ID Igraca]");
if(WarAktivan == false) return SCM(playerid,-1, "{FF0000}[Greska!]{BFC0C2} War nije aktivan!");
//if(WarTim1 != PlayerInfo[playerid][pLider] && WarTim2 != PlayerInfo[playerid][pLider]) return SCM(playerid,BELA, "{FF0000}[Greska!]{BFC0C2} Vasa mafija/banda ne ucestvuje u waru!");
if(!IsPlayerConnected(id)) return SCM(playerid,-1, "{FF0000}[Greska!]{BFC0C2} Taj igrac je offline!");
//if(PlayerInfo[id][pClan] != PlayerInfo[playerid][pLider]) return SCM(playerid,BELA, "{FF0000}[Greska!]{BFC0C2} Taj igrac nije u Vasoj mafiji/bandi!");
//if(ClanovaUWaru[PlayerInfo[playerid][pLider]] >= 5) return SCM(playerid,BELA, "{FF0000}[Greska!]{BFC0C2} Imate maksimalan broj clanova u waru!");
if(IgracUWaru[id] == 1) return SCM(playerid,-1, "{FF0000}[Greska!]{BFC0C2} Taj igrac je vec u waru!");
if(WarMapa == 1)
{
    if(WarTim1 == PlayerInfo[id][pClan])
    {
        new rand = random(sizeof(FarmaTim1));
        SetPlayerPos(id, FarmaTim1[rand][0], FarmaTim1[rand][1], FarmaTim1[rand][2]);
        SetPlayerFacingAngle(id, FarmaTim1[rand][3]);
}
else if(WarTim2 == PlayerInfo[id][pClan])
    {
        new rand = random(sizeof(FarmaTim2));
        SetPlayerPos(id, FarmaTim2[rand][0], FarmaTim2[rand][1], FarmaTim2[rand][2]);
        SetPlayerFacingAngle(id, FarmaTim2[rand][3]);
}
else
{
    SCM(playerid,-1, "{FF0000}[Greska!]{BFC0C2} ID Tima se ne poklapa sa ID-om mafije/bande!!!");
    return 1;
}
}
else if(WarMapa == 2)
{
    if(WarTim1 == PlayerInfo[id][pClan])
    {
        new rand = random(sizeof(Brod1Tim1));
        SetPlayerPos(id, Brod1Tim1[rand][0], Brod1Tim1[rand][1], Brod1Tim1[rand][2]);
        SetPlayerFacingAngle(id, Brod1Tim1[rand][3]);
}
else if(WarTim2 == PlayerInfo[id][pClan])
    {
        new rand = random(sizeof(Brod1Tim2));
        SetPlayerPos(id, Brod1Tim2[rand][0], Brod1Tim2[rand][1], Brod1Tim2[rand][2]);
        SetPlayerFacingAngle(id, Brod1Tim2[rand][3]);
}
else
{
    SCM(playerid,-1, "{FF0000}[Greska!]{BFC0C2} ID Tima se ne poklapa sa ID-om mafije/bande!!!");
    return 1;
}
}
else if(WarMapa == 3)
{
    if(WarTim1 == PlayerInfo[id][pClan])
    {
        new rand = random(sizeof(Brod2Tim1));
        SetPlayerPos(id, Brod2Tim1[rand][0], Brod2Tim1[rand][1], Brod2Tim1[rand][2]);
        SetPlayerFacingAngle(id, Brod2Tim1[rand][3]);
}
else if(WarTim2 == PlayerInfo[id][pClan])
    {
        new rand = random(sizeof(Brod2Tim2));
        SetPlayerPos(id, Brod2Tim2[rand][0], Brod2Tim2[rand][1], Brod2Tim2[rand][2]);
        SetPlayerFacingAngle(id, Brod2Tim2[rand][3]);
}
else
{
    SCM(playerid,-1, "{FF0000}[Greska!]{BFC0C2} ID Tima se ne poklapa sa ID-om mafije/bande!!!");
    return 1;
}
}
else if(WarMapa == 4)
{
    if(WarTim1 == PlayerInfo[id][pClan])
    {
        new rand = random(sizeof(BullSeloTim1));
        SetPlayerPos(id, BullSeloTim1[rand][0], BullSeloTim1[rand][1], BullSeloTim1[rand][2]);
        SetPlayerFacingAngle(id, BullSeloTim1[rand][3]);
}
else if(WarTim2 == PlayerInfo[id][pClan])
    {
        new rand = random(sizeof(BullSeloTim2));
        SetPlayerPos(id, BullSeloTim2[rand][0], BullSeloTim2[rand][1], BullSeloTim2[rand][2]);
        SetPlayerFacingAngle(id, BullSeloTim2[rand][3]);
}
else
{
    SCM(playerid,-1, "{FF0000}[Greska!]{BFC0C2} ID Tima se ne poklapa sa ID-om mafije/bande!!!");
    return 1;
}
}
else if(WarMapa == 5)
{
    if(WarTim1 == PlayerInfo[id][pClan])
    {
        new rand = random(sizeof(UrbanTim1));
        SetPlayerPos(id, UrbanTim1[rand][0], UrbanTim1[rand][1], UrbanTim1[rand][2]);
        SetPlayerFacingAngle(id, UrbanTim1[rand][3]);
}
else if(WarTim2 == PlayerInfo[id][pClan])
    {
        new rand = random(sizeof(UrbanTim2));
        SetPlayerPos(id, UrbanTim2[rand][0], UrbanTim2[rand][1], UrbanTim2[rand][2]);
        SetPlayerFacingAngle(id, UrbanTim2[rand][3]);
}
else
{
    SCM(playerid,-1, "{FF0000}[Greska!]{BFC0C2} ID Tima se ne poklapa sa ID-om mafije/bande!!!");
    return 1;
}
}
else if(WarMapa == 6)
{
    if(WarTim1 == PlayerInfo[id][pClan])
    {
        new rand = random(sizeof(SkladisteTim1));
        SetPlayerPos(id, SkladisteTim1[rand][0], SkladisteTim1[rand][1], SkladisteTim1[rand][2]);
        SetPlayerFacingAngle(id, SkladisteTim1[rand][3]);
}
else if(WarTim2 == PlayerInfo[id][pClan])
    {
        new rand = random(sizeof(SkladisteTim2));
        SetPlayerPos(id, SkladisteTim2[rand][0], SkladisteTim2[rand][1], SkladisteTim2[rand][2]);
        SetPlayerFacingAngle(id, SkladisteTim2[rand][3]);
}
else
{
    SCM(playerid,-1, "{FF0000}[Greska!]{BFC0C2} ID Tima se ne poklapa sa ID-om mafije/bande!!!");
    return 1;
}
}
else if(WarMapa == 7)
{
    if(WarTim1 == PlayerInfo[id][pClan])
    {
        new rand = random(sizeof(DesertTim1));
        SetPlayerPos(id, DesertTim1[rand][0], DesertTim1[rand][1], DesertTim1[rand][2]);
        SetPlayerFacingAngle(id, DesertTim1[rand][3]);
}
else if(WarTim2 == PlayerInfo[id][pClan])
    {
        new rand = random(sizeof(DesertTim2));
        SetPlayerPos(id, DesertTim2[rand][0], DesertTim2[rand][1], DesertTim2[rand][2]);
        SetPlayerFacingAngle(id, DesertTim2[rand][3]);
}
else
{
    SCM(playerid,-1, "{FF0000}[Greska!]{BFC0C2} ID Tima se ne poklapa sa ID-om mafije/bande!!!");
    return 1;
}
}
else if(WarMapa == 8)
{
    if(WarTim1 == PlayerInfo[id][pClan])
    {
        new rand = random(sizeof(TvornicaTim1));
        SetPlayerPos(id, TvornicaTim1[rand][0], TvornicaTim1[rand][1], TvornicaTim1[rand][2]);
        SetPlayerFacingAngle(id, TvornicaTim1[rand][3]);
}
else if(WarTim2 == PlayerInfo[id][pClan])
    {
        new rand = random(sizeof(TvornicaTim2));
        SetPlayerPos(id, TvornicaTim2[rand][0], TvornicaTim2[rand][1], TvornicaTim2[rand][2]);
        SetPlayerFacingAngle(id, TvornicaTim2[rand][3]);
}
else
{
    SCM(playerid,-1, "{FF0000}[Greska!]{BFC0C2} ID Tima se ne poklapa sa ID-om mafije/bande!!!");
    return 1;
}
}
else if(WarMapa == 9)
{
    if(WarTim1 == PlayerInfo[id][pClan])
    {
        new rand = random(sizeof(Farma2Tim1));
        SetPlayerPos(id, Farma2Tim1[rand][0], Farma2Tim1[rand][1], Farma2Tim1[rand][2]);
        SetPlayerFacingAngle(id, Farma2Tim1[rand][3]);
}
else if(WarTim2 == PlayerInfo[id][pClan])
    {
        new rand = random(sizeof(Farma2Tim2));
        SetPlayerPos(id, Farma2Tim2[rand][0], Farma2Tim2[rand][1], Farma2Tim2[rand][2]);
        SetPlayerFacingAngle(id, Farma2Tim2[rand][3]);
}
else
{
    SCM(playerid,-1, "{FF0000}[Greska!]{BFC0C2} ID Tima se ne poklapa sa ID-om mafije/bande!!!");
    return 1;
}
}
else if(WarMapa == 10)
{
    if(WarTim1 == PlayerInfo[id][pClan])
    {
        new rand = random(sizeof(RuinsTim1));
        SetPlayerPos(playerid, RuinsTim1[rand][0], RuinsTim1[rand][1], RuinsTim1[rand][2]);
        SetPlayerFacingAngle(playerid, RuinsTim1[rand][3]);
}
else if(WarTim2 == PlayerInfo[id][pClan])
    {
        new rand = random(sizeof(RuinsTim2));
        SetPlayerPos(playerid, RuinsTim2[rand][0], RuinsTim2[rand][1], RuinsTim2[rand][2]);
        SetPlayerFacingAngle(playerid, RuinsTim2[rand][3]);
}
else
{
    SCM(playerid,-1, "{FF0000}[Greska!]{BFC0C2} ID Tima se ne poklapa sa ID-om mafije/bande!!!");
    return 1;
}
}
else return SCM(playerid,-1, "{FF0000}[Greska!]{BFC0C2} Nepoznata mapa!");
SCMF(playerid, 0x1275EDFF, "Pozvali ste igraca %s u war.", GetName(id));
SCMF(id, 0x1275EDFF, "Admin %s Vas je pozvao u war.", GetName(playerid));
IgracUWaru[id] = 1;
ClanovaUWaru[PlayerInfo[playerid][pLider]]++;
GivePlayerWeapon(id, 4, 1);
GivePlayerWeapon(id, 24, 100);
GivePlayerWeapon(id, 29, 500);
GivePlayerWeapon(id, 31, 1000);
SetPlayerVirtualWorld(id, 7007);
SetPlayerInterior(id, 0);
SetPlayerHealth(id, 100);
TextDrawShowForPlayer(id, WarTD0);
TextDrawShowForPlayer(id, WarTD1);
  TextDrawShowForPlayer(id, WarTD2);
    TextDrawShowForPlayer(id, WarTD3);
    TextDrawShowForPlayer(id, WarTD4);
    TextDrawShowForPlayer(id, WarTD5);
    } else return SCM(playerid,-1,"{FF0000}[Greska!]{BFC0C2} Samo Admini!");
return 1;
}
YCMD:warpokreni(playerid, params[], help)
{
if(PlayerInfo[playerid][pAdmin] >= 1 || IsPlayerAdmin(playerid))
{
    new trajanje;
if(sscanf(params, "iiii", WarTim1, WarTim2, WarMapa, trajanje))
{
SCM(playerid,-1, "{FFFFFF}EG Pomoc |{00C0FF} /warpokreni [ID Tima 1] [ID Tima 2] [Mapa] [Trajanje (minute)]");
SCM(playerid,-1, "{FFFFFF}Dostupni timovi: {00C0FF}(2) - TVF, (3) - BDT, (4) - GSF, (5) - BALLAS ");
SCM(playerid,-1, "{FFFFFF}Dostupne mape: {00C0FF}1 - Farma1, 2 - Brod1, 3 - Brod2, 4 - Bull selo");
SCM(playerid,-1, "{FFFFFF}Dostupne mape: {00C0FF}5 - Urban, 6 - Skladiste, 7 - Desert, 8 - Tvornica");
SCM(playerid,-1, "{FFFFFF}Dostupne mape: {00C0FF}9 - Farma2, 10 - Ruins");
return 1;
}
if(WarAktivan == true) return SCM(playerid,-1, "{FF0000}[Greska!]{BFC0C2} War je vec aktivan!");
if(WarMapa < 1 || WarMapa > 10) return SCM(playerid,-1, "{FF0000}[Greska!]{BFC0C2} Nepoznat broj mape!");
if(trajanje > 60) return SCM(playerid,-1, "{FF0000}[Greska!]{BFC0C2} Maksimalno trajanje wara je 60 minuta!");
Tim1Skor = 0;
Tim2Skor = 0;

  if(WarTim1 == 1) timtext1 = "~R~NEMA";
    else if(WarTim1 == 2) timtext1 = "~R~TVF";
    else if(WarTim1 == 3) timtext1 = "~R~BDT";
    else if(WarTim1 == 4) timtext1 = "~R~GSF";
    else if(WarTim1 == 5) timtext1 = "~R~BALLAS";
    if(WarTim1 == 1) timtext11 = "NEMA";
    else if(WarTim1 == 2) timtext11 = "TVF";
    else if(WarTim1 == 3) timtext11 = "BDT";
    else if(WarTim1 == 4) timtext11 = "GSF";
    else if(WarTim1 == 5) timtext11 = "BALLAS";
   
        if(WarTim2 == 1) timtext2 = "~R~NEMA";
    else if(WarTim2 == 2) timtext2 = "~B~TVF";
    else if(WarTim2 == 3) timtext2 = "~B~BDT";
    else if(WarTim2 == 4) timtext2 = "~B~GSF";
    else if(WarTim2 == 5) timtext2 = "~B~BALLAS";
    if(WarTim2 == 1) timtext22 = "NEMA";
    else if(WarTim2 == 2) timtext22 = "TVF";
    else if(WarTim2 == 3) timtext22 = "BDT";
    else if(WarTim2 == 4) timtext22 = "GSF";
    else if(WarTim2 == 5) timtext22 = "BALLAS";
   
        TextDrawSetString(WarTD2, timtext1);
TextDrawSetString(WarTD3, timtext2);
TextDrawSetString(WarTD4, "0");
TextDrawSetString(WarTD5, "0");

new imemape[20];
if(WarMapa == 1) imemape = "Farma1";
else if(WarMapa == 2) imemape = "Brod 1";
else if(WarMapa == 3) imemape = "Brod 2";
else if(WarMapa == 4) imemape = "Bull selo";
else if(WarMapa == 5) imemape = "Urban";
else if(WarMapa == 6) imemape = "Skladiste";
else if(WarMapa == 7) imemape = "Desert";
else if(WarMapa == 8) imemape = "Tvornica";
else if(WarMapa == 9) imemape = "Farma2";
else if(WarMapa == 10) imemape = "Ruins";
else imemape = "N/A";
ClanovaUWaru[WarTim1] = 0;
ClanovaUWaru[WarTim2] = 0;
foreach(Player, i)
{
    if(PlayerInfo[i][pClan] == WarTim1 || PlayerInfo[i][pLider] == WarTim1)
    {
      new str[64];
    format(str, sizeof str, "~R~[War poceo]~N~~R~Vas tim protiv tima %d", WarTim2);
    GameTextForPlayer(i, str, 5000, 5);
    new str1[128];
    format(str1, sizeof(str1), "War pokrenut od admina %s | Tim 1: %s | Tim 2: %s | Mapa: %s | Trajanje: %d min.", GetName(playerid), timtext11, timtext22, imemape, trajanje);
    SCM(i, 0xFFFF00AA, str1);
}
if(PlayerInfo[i][pClan] == WarTim2 || PlayerInfo[i][pLider] == WarTim2)
    {
        new str[64];
        format(str, sizeof str, "~R~[War poceo]~N~~R~Vas tim protiv tima %d", WarTim1);
        GameTextForPlayer(i, str, 5000, 5);
        new str1[128];
        format(str1, sizeof(str1), "War pokrenut od admina %s | Tim 1: %s | Tim 2: %s | Mapa: %s | Trajanje: %d min.", GetName(playerid), timtext11, timtext22, imemape, trajanje);
        SCM(i, 0xFFFF00AA, str1);
}
}
    new str1[128];
      format(str1, sizeof(str1), "Pokrenuli ste gang war | Tim 1: %s | Tim 2: %s | Mapa: %s | Trajanje: %d min.", timtext11, timtext22, imemape, trajanje);
        SCM(playerid, 0xFFFF00AA, str1);
        format(str1, sizeof str1, "Admin %s je pokrenuo war | Tim 1: %s | Tim 2: %s | Mapa: %s | Trajanje: %d min.", GetName(playerid), timtext11, timtext22, imemape, trajanje);
        AdminPoruka(0xFFFF00AA, str1);
        WarAktivan = true;
        wartajmer = SetTimer("ZaustaviWar", trajanje*60000, false);
        format(CmdString,sizeof(CmdString), "POKRETANJE | Admin: %s | Tim 1: %s | Tim 2: %s | Mapa: %s | Trajanje: %d min | IP: %s", ImeIgraca(playerid), timtext11, timtext22, imemape, trajanje, GetaIP(playerid));
        }
else return SCM(playerid,-1, "{FF0000}[Greska!]{BFC0C2} Samo Admini!");
return 1;
}


inace izvukao sam iz eurogaminga od 0
Poslednja Izmena: Avgust 01, 2013, 01:59:48 PRE PODNE od Pajser

a radi li ti za policajce? Dobijaju li oni wl?
RESPECT: Blaeks, Yui_Sang, Gagi, Kapetan Husein, Luksa, Slay, Denis_Lapi, Zoran(Dude)

Programski jezici koje koristim: C, C#, Visual Basic, HTML, CSS, PHP (tek ucim).


FarkiAs


Citat: Crazyn3ss poslato Avgust 01, 2013, 01:46:01 PRE PODNE
i ako ces radit ovako

   if(IgracPolicajac(killerid)||IgracUWaru[playerid] == 1)
   {
      PlayerInfo[killerid][pTrazeniLevel] = 0;
      SetPlayerWantedLevel(killerid,0);
   }


mora ic IgracUWaru[killerid] == 1

ne slusate
Other Dimension RolePlay | Uskoro
Ukoliko zelite pomoci u razvoju servera, mozete se meni javit na PP/PM!

FarkiAs

Citat: Crazyn3ss poslato Avgust 01, 2013, 02:05:45 PRE PODNE
Citat: Crazyn3ss poslato Avgust 01, 2013, 01:46:01 PRE PODNE
i ako ces radit ovako

   if(IgracPolicajac(killerid)||IgracUWaru[playerid] == 1)
   {
      PlayerInfo[killerid][pTrazeniLevel] = 0;
      SetPlayerWantedLevel(killerid,0);
   }


mora ic IgracUWaru[killerid] == 1

ne slusate

hvala, radi samo jos nesto .. da mi ne pise da sam pocinio zlocin i da mi ne stavlja zvjezdice ispod para kako da stavim da se to ne prikazuje evo stock..

stock PostaviWanted(playerid, zlocin[], prijavio[])
{
if(IsPlayerConnected(playerid))
{
SetPlayerWantedLevel(playerid, GetPlayerWantedLevel(playerid)+1); PlayerInfo[playerid][pTrazeniLevel] += 1;
if(GetPlayerWantedLevel(playerid) > 6) { SetPlayerWantedLevel(playerid, 6); PlayerInfo[playerid][pTrazeniLevel] = 6; }
new string[256];
format(string, sizeof(string), ""ZUTA"- Pocinili ste zlocin: "CRVENA"%s "ZUTA"| Prijava od: "CRVENA"%s!", zlocin, prijavio);
SCM(playerid, -1, string);
format(string, sizeof(string), ""ZUTA"- Trenutni Wanted Level: "CRVENA"%d!", GetPlayerWantedLevel(playerid));
SCM(playerid, -1, string);
format(string, sizeof(string), ""ZUTA"- Imamo novi prijavljen zlocin od: "CRVENA"%s!", prijavio);
ChatPD(-1, string);
format(string, sizeof(string), ""ZUTA"- Pocinio: "CRVENA"%s | Zlocin: "CRVENA"%s | Wanted Level Pocinioca: "CRVENA"%d!", GetName(playerid),zlocin,GetPlayerWantedLevel(playerid));
ChatPD(-1, string);
strmid(ZlocinInfo[playerid][zPrijavio], prijavio, 0, strlen(prijavio), 255);
strmid(ZlocinInfo[playerid][zPocinio], GetName(playerid), 0, strlen(GetName(playerid)), 255);
strmid(ZlocinInfo[playerid][zZlocin], zlocin, 0, strlen(zlocin), 255);
}
return 1;
}

FarkiAs

samo da vas napomen desio mi se problem kada sam usao opet u igru bio sam u zatvoru zbog wanted levela.. pomoglo mi je ovo od crazyn3ss da ne gubim pare kada umrem u waru ali daje mi level i zvjezdice i one i pise mi i jos me u zatvor stavi kada odem off i vratim se.. ako znate dacu vam sta treba

onda takodjer to i ovdje  ide

if(!IgracPolicajac(killerid) && IsPlayerConnected(playerid))
{
PostaviWanted(killerid, "Ubistvo", "Nepoznat");
}


taj zamjeni s ovim

if(!IgracPolicajac(killerid) || IgracUWaru[killerid] == 0 && IsPlayerConnected(playerid))
{
PostaviWanted(killerid, "Ubistvo", "Nepoznat");
}
Other Dimension RolePlay | Uskoro
Ukoliko zelite pomoci u razvoju servera, mozete se meni javit na PP/PM!

FarkiAs

Hvala radi, ne daje vise samo mi stavi one zvjezdice ispod para kako da ukinem da kad je igrac u waru da mi ne postavlja zvjezde ne daje wl ni oduzima pare kad umrem nego samo taj textdraw valjda sta je vec