[Pomoc] War System

Započeo Mr.Exclusive, Septembar 16, 2013, 18:05:01 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 2 gostiju pregledaju ovu temu.

Skripta koju koristim: EG od Farisa
Detaljan opis problema: Pokrenem war, igra se, i kada se ubije neki igras ne spawna se ponovo u waru.
Dio skripte: Editat cu temu i dat dio koji vam treba
Nudim usluge pomocnog mappera/skriptera. PM[/center]

ja nisam imao taj problem, meni je war radio odlično ..

edit: moguće da sam ja nešto dodao slučajno uradi ovako.. izbriši stock SpawnZaWar

i stavi kod OnPlayerDeath na dnu imaš SpawnZaWar(playerid);

ti to prebaci u SpawnIgraca , to SpawnZaWar.. i sa svojim SpawnIgraca stockom zamjeni sa ovim.

stock SpawnIgraca(playerid)
{
    if(WarAktivan == true && IgracUWaru[playerid] == 1)
{
    SetPlayerInterior(playerid, 0);
    SetPlayerVirtualWorld(playerid, 7007);
    GivePlayerWeapon(playerid, 4, 1);
GivePlayerWeapon(playerid, 24, 100);
GivePlayerWeapon(playerid, 29, 500);
GivePlayerWeapon(playerid, 31, 1000);
SetPlayerHealth(playerid, 100);
if(WarMapa == 1)
{
    if(WarTim1 == PlayerInfo[playerid][pClan])
    {
        new rand = random(sizeof(FarmaTim1));
        SetPlayerPos(playerid, FarmaTim1[rand][0], FarmaTim1[rand][1], FarmaTim1[rand][2]);
        SetPlayerFacingAngle(playerid, FarmaTim1[rand][3]);
        return 1;
}
else if(WarTim2 == PlayerInfo[playerid][pClan])
    {
        new rand = random(sizeof(FarmaTim2));
        SetPlayerPos(playerid, FarmaTim2[rand][0], FarmaTim2[rand][1], FarmaTim2[rand][2]);
        SetPlayerFacingAngle(playerid, FarmaTim2[rand][3]);
        return 1;
}
else
{
    SCM(playerid,COLOR_WHITE, "{FF0000}[Greska!]{BFC0C2} ID Tima se ne poklapa sa ID-om mafije/bande!!!");
    return 1;
}
}
else if(WarMapa == 2)
{
    if(WarTim1 == PlayerInfo[playerid][pClan])
    {
        new rand = random(sizeof(Brod1Tim1));
        SetPlayerPos(playerid, Brod1Tim1[rand][0], Brod1Tim1[rand][1], Brod1Tim1[rand][2]);
        SetPlayerFacingAngle(playerid, Brod1Tim1[rand][3]);
        return 1;
}
else if(WarTim2 == PlayerInfo[playerid][pClan])
    {
        new rand = random(sizeof(Brod1Tim2));
        SetPlayerPos(playerid, Brod1Tim2[rand][0], Brod1Tim2[rand][1], Brod1Tim2[rand][2]);
        SetPlayerFacingAngle(playerid, Brod1Tim2[rand][3]);
        return 1;
}
else
{
    SCM(playerid,COLOR_WHITE, "{FF0000}[Greska!]{BFC0C2} ID Tima se ne poklapa sa ID-om mafije/bande!!!");
    return 1;
}
}
else if(WarMapa == 3)
{
    if(WarTim1 == PlayerInfo[playerid][pClan])
    {
        new rand = random(sizeof(Brod2Tim1));
        SetPlayerPos(playerid, Brod2Tim1[rand][0], Brod2Tim1[rand][1], Brod2Tim1[rand][2]);
        SetPlayerFacingAngle(playerid, Brod2Tim1[rand][3]);
        return 1;
}
else if(WarTim2 == PlayerInfo[playerid][pClan])
    {
        new rand = random(sizeof(Brod2Tim2));
        SetPlayerPos(playerid, Brod2Tim2[rand][0], Brod2Tim2[rand][1], Brod2Tim2[rand][2]);
        SetPlayerFacingAngle(playerid, Brod2Tim2[rand][3]);
        return 1;
}
else
{
    SCM(playerid,COLOR_WHITE, "{FF0000}[Greska!]{BFC0C2} ID Tima se ne poklapa sa ID-om mafije/bande!!!");
    return 1;
}
}
else if(WarMapa == 4)
{
    if(WarTim1 == PlayerInfo[playerid][pClan])
    {
        new rand = random(sizeof(BullSeloTim1));
        SetPlayerPos(playerid, BullSeloTim1[rand][0], BullSeloTim1[rand][1], BullSeloTim1[rand][2]);
        SetPlayerFacingAngle(playerid, BullSeloTim1[rand][3]);
        return 1;
}
else if(WarTim2 == PlayerInfo[playerid][pClan])
    {
        new rand = random(sizeof(BullSeloTim2));
        SetPlayerPos(playerid, BullSeloTim2[rand][0], BullSeloTim2[rand][1], BullSeloTim2[rand][2]);
        SetPlayerFacingAngle(playerid, BullSeloTim2[rand][3]);
        return 1;
}
else
{
    SCM(playerid,COLOR_WHITE, "{FF0000}[Greska!]{BFC0C2} ID Tima se ne poklapa sa ID-om mafije/bande!!!");
    return 1;
}
}
else if(WarMapa == 5)
{
    if(WarTim1 == PlayerInfo[playerid][pClan])
    {
        new rand = random(sizeof(UrbanTim1));
        SetPlayerPos(playerid, UrbanTim1[rand][0], UrbanTim1[rand][1], UrbanTim1[rand][2]);
        SetPlayerFacingAngle(playerid, UrbanTim1[rand][3]);
        return 1;
}
else if(WarTim2 == PlayerInfo[playerid][pClan])
    {
        new rand = random(sizeof(UrbanTim2));
        SetPlayerPos(playerid, UrbanTim2[rand][0], UrbanTim2[rand][1], UrbanTim2[rand][2]);
        SetPlayerFacingAngle(playerid, UrbanTim2[rand][3]);
        return 1;
}
else
{
    SCM(playerid,COLOR_WHITE, "{FF0000}[Greska!]{BFC0C2} ID Tima se ne poklapa sa ID-om mafije/bande!!!");
    return 1;
}
}
else if(WarMapa == 6)
{
    if(WarTim1 == PlayerInfo[playerid][pClan])
    {
        new rand = random(sizeof(SkladisteTim1));
        SetPlayerPos(playerid, SkladisteTim1[rand][0], SkladisteTim1[rand][1], SkladisteTim1[rand][2]);
        SetPlayerFacingAngle(playerid, SkladisteTim1[rand][3]);
        return 1;
}
else if(WarTim2 == PlayerInfo[playerid][pClan])
    {
        new rand = random(sizeof(SkladisteTim2));
        SetPlayerPos(playerid, SkladisteTim2[rand][0], SkladisteTim2[rand][1], SkladisteTim2[rand][2]);
        SetPlayerFacingAngle(playerid, SkladisteTim2[rand][3]);
        return 1;
}
else
{
    SCM(playerid,COLOR_WHITE, "{FF0000}[Greska!]{BFC0C2} ID Tima se ne poklapa sa ID-om mafije/bande!!!");
    return 1;
}
}
else if(WarMapa == 7)
{
    if(WarTim1 == PlayerInfo[playerid][pClan])
    {
        new rand = random(sizeof(DesertTim1));
        SetPlayerPos(playerid, DesertTim1[rand][0], DesertTim1[rand][1], DesertTim1[rand][2]);
        SetPlayerFacingAngle(playerid, DesertTim1[rand][3]);
        return 1;
}
else if(WarTim2 == PlayerInfo[playerid][pClan])
    {
        new rand = random(sizeof(DesertTim2));
        SetPlayerPos(playerid, DesertTim2[rand][0], DesertTim2[rand][1], DesertTim2[rand][2]);
        SetPlayerFacingAngle(playerid, DesertTim2[rand][3]);
        return 1;
}
else
{
    SCM(playerid,COLOR_WHITE, "{FF0000}[Greska!]{BFC0C2} ID Tima se ne poklapa sa ID-om mafije/bande!!!");
    return 1;
}
}
else if(WarMapa == 8)
{
    if(WarTim1 == PlayerInfo[playerid][pClan])
    {
        new rand = random(sizeof(TvornicaTim1));
        SetPlayerPos(playerid, TvornicaTim1[rand][0], TvornicaTim1[rand][1], TvornicaTim1[rand][2]);
        SetPlayerFacingAngle(playerid, TvornicaTim1[rand][3]);
        return 1;
}
else if(WarTim2 == PlayerInfo[playerid][pClan])
    {
        new rand = random(sizeof(TvornicaTim2));
        SetPlayerPos(playerid, TvornicaTim2[rand][0], TvornicaTim2[rand][1], TvornicaTim2[rand][2]);
        SetPlayerFacingAngle(playerid, TvornicaTim2[rand][3]);
        return 1;
}
else
{
    SCM(playerid,COLOR_WHITE, "{FF0000}[Greska!]{BFC0C2} ID Tima se ne poklapa sa ID-om mafije/bande!!!");
    return 1;
}
}
else if(WarMapa == 9)
{
    if(WarTim1 == PlayerInfo[playerid][pClan])
    {
        new rand = random(sizeof(Farma2Tim1));
        SetPlayerPos(playerid, Farma2Tim1[rand][0], Farma2Tim1[rand][1], Farma2Tim1[rand][2]);
        SetPlayerFacingAngle(playerid, Farma2Tim1[rand][3]);
        return 1;
}
else if(WarTim2 == PlayerInfo[playerid][pClan])
    {
        new rand = random(sizeof(Farma2Tim2));
        SetPlayerPos(playerid, Farma2Tim2[rand][0], Farma2Tim2[rand][1], Farma2Tim2[rand][2]);
        SetPlayerFacingAngle(playerid, Farma2Tim2[rand][3]);
        return 1;
}
else
{
    SCM(playerid,COLOR_WHITE, "{FF0000}[Greska!]{BFC0C2} ID Tima se ne poklapa sa ID-om mafije/bande!!!");
    return 1;
}
}
else if(WarMapa == 10)
{
    if(WarTim1 == PlayerInfo[playerid][pClan])
    {
        new rand = random(sizeof(RuinsTim1));
        SetPlayerPos(playerid, RuinsTim1[rand][0], RuinsTim1[rand][1], RuinsTim1[rand][2]);
        SetPlayerFacingAngle(playerid, RuinsTim1[rand][3]);
        return 1;
}
else if(WarTim2 == PlayerInfo[playerid][pClan])
    {
        new rand = random(sizeof(RuinsTim2));
        SetPlayerPos(playerid, RuinsTim2[rand][0], RuinsTim2[rand][1], RuinsTim2[rand][2]);
        SetPlayerFacingAngle(playerid, RuinsTim2[rand][3]);
        return 1;
}
else
{
    SCM(playerid,COLOR_WHITE, "{FF0000}[Greska!]{BFC0C2} ID Tima se ne poklapa sa ID-om mafije/bande!!!");
    return 1;
}
}
else
{
        SCM(playerid,COLOR_WHITE, "{FF0000}[Greska!]{BFC0C2} Nepoznata mapa, nemoguce spawnati se!");
}
}
    g_SetPlayerHealth(playerid, 99.0); vrataspawn[playerid] = false;
if(PlayerInfo[playerid][pProveraSpawna] == SPAWN_BAZA)
{
    if(PlayerInfo[playerid][pLider] == 1 || PlayerInfo[playerid][pClan] == 1)
{
SetPlayerPos(playerid, 1477.2086,-1780.2563,3288.7859);
SetPlayerInterior(playerid, 0);
TogglePlayerControllable(playerid, 0);
freeze[playerid] =  SetTimerEx("Freeze",3000, false, "i", playerid);
}
    else if(PlayerInfo[playerid][pLider] == 2 || PlayerInfo[playerid][pClan] == 2)
{
SetPlayerPos(playerid, 2125.8074,-2278.5754,20.6643);
SetPlayerInterior(playerid, 0);
}
else if(PlayerInfo[playerid][pLider] == 3 || PlayerInfo[playerid][pClan] == 3)
{
SetPlayerPos(playerid, 1329.0504,-638.9127,14280.8857);
SetPlayerInterior(playerid, 0);
TogglePlayerControllable(playerid, 0);
freeze[playerid] =  SetTimerEx("Freeze",3000, false, "i", playerid);
}
else if(PlayerInfo[playerid][pLider] == 4 || PlayerInfo[playerid][pClan] == 4)
{
SetPlayerPos(playerid, 323.8689,1127.7897,1083.8828);
SetPlayerInterior(playerid, 5);
}
else if(PlayerInfo[playerid][pLider] == 5 || PlayerInfo[playerid][pClan] == 5)
{
SetPlayerPos(playerid, 2451.1052,-1688.5116,1013.5078);
SetPlayerInterior(playerid, 2);
}
else if(PlayerInfo[playerid][pLider] == 6 || PlayerInfo[playerid][pClan] == 6)
{
SetPlayerPos(playerid, 1785.8721,-1797.5588,-43.3141);
SetPlayerInterior(playerid, 0);
TogglePlayerControllable(playerid, 0);
g_GivePlayerWeapon(playerid, 43, 50);
freeze[playerid] =  SetTimerEx("Freeze",3000, false, "i", playerid);
}
    else
{
    PlayerInfo[playerid][pProveraSpawna] = SPAWN_NORMAL;
new rand = random(sizeof(RandomSpawn));
SetPlayerPos(playerid, RandomSpawn[rand][0], RandomSpawn[rand][1], RandomSpawn[rand][2]);
SetPlayerInterior(playerid, 0);
}
}
else if(PlayerInfo[playerid][pProveraSpawna] == SPAWN_KUCA)
{
    if(PlayerInfo[playerid][pPosedovanjeKuce] != -1)
    {
        new i = PlayerInfo[playerid][pPosedovanjeKuce];
    SetPlayerInterior(playerid, KucaInfo[i][kInt]); SetPlayerVirtualWorld(playerid, KucaInfo[i][kVW]);
SetPlayerPos(playerid, KucaInfo[i][kIzlazX], KucaInfo[i][kIzlazY], KucaInfo[i][kIzlazZ]);
}
else
{
        PlayerInfo[playerid][pProveraSpawna] = SPAWN_NORMAL;
new rand = random(sizeof(RandomSpawn));
SetPlayerPos(playerid, RandomSpawn[rand][0], RandomSpawn[rand][1], RandomSpawn[rand][2]);
SetPlayerInterior(playerid, 0);
}
}
else if(PlayerInfo[playerid][pProveraSpawna] == SPAWN_RENTKUCA)
{
    if(PlayerInfo[playerid][pRent] != -1)
    {
        new i = PlayerInfo[playerid][pRent];
        SetPlayerInterior(playerid, KucaInfo[i][kInt]); SetPlayerVirtualWorld(playerid, KucaInfo[i][kVW]);
SetPlayerPos(playerid, KucaInfo[i][kIzlazX], KucaInfo[i][kIzlazY], KucaInfo[i][kIzlazZ]);
}
else
{
        PlayerInfo[playerid][pProveraSpawna] = SPAWN_NORMAL;
new rand = random(sizeof(RandomSpawn));
SetPlayerPos(playerid, RandomSpawn[rand][0], RandomSpawn[rand][1], RandomSpawn[rand][2]);
SetPlayerInterior(playerid, 0);
}
}
else if(PlayerInfo[playerid][pProveraSpawna] == SPAWN_STAN)
{
    if(PlayerInfo[playerid][pPosedovanjeStana] != -1)
    {
        new i = PlayerInfo[playerid][pPosedovanjeStana];
    SetPlayerInterior(playerid, StanInfo[i][sInt]); SetPlayerVirtualWorld(playerid, StanInfo[i][sVW]);
SetPlayerPos(playerid, StanInfo[i][sIzlazX], StanInfo[i][sIzlazY], StanInfo[i][sIzlazZ]);
}
else
{
        PlayerInfo[playerid][pProveraSpawna] = SPAWN_NORMAL;
new rand = random(sizeof(RandomSpawn));
SetPlayerPos(playerid, RandomSpawn[rand][0], RandomSpawn[rand][1], RandomSpawn[rand][2]);
SetPlayerInterior(playerid, 0);
}
}
else if(PlayerInfo[playerid][pProveraSpawna] == SPAWN_VIKENDICA)
{
    if(PlayerInfo[playerid][pPosedovanjeVikendice] != -1)
    {
        new i = PlayerInfo[playerid][pPosedovanjeVikendice];
    SetPlayerInterior(playerid, VikendiceInfo[i][viInt]); SetPlayerVirtualWorld(playerid, VikendiceInfo[i][viVW]);
SetPlayerPos(playerid, VikendiceInfo[i][viIzlazX], VikendiceInfo[i][viIzlazY], VikendiceInfo[i][viIzlazZ]);
}
else
{
        PlayerInfo[playerid][pProveraSpawna] = SPAWN_NORMAL;
new rand = random(sizeof(RandomSpawn));
SetPlayerPos(playerid, RandomSpawn[rand][0], RandomSpawn[rand][1], RandomSpawn[rand][2]);
SetPlayerInterior(playerid, 0);
}
}
return 1;
}


javi ako radi :)
Poslednja Izmena: Septembar 16, 2013, 18:23:20 POSLE PODNE od Farkias

Evo sad sam stavio tako ali mi pise



Citaterror 021: symbol already defined: "SpawnIgraca"

nerazumijem se bas u pwn pa ..


Citat: davax poslato Septembar 16, 2013, 19:03:59 POSLE PODNE
Evo sad sam stavio tako ali mi pise



Citaterror 021: symbol already defined: "SpawnIgraca"

nerazumijem se bas u pwn pa ..

uradi kako sam ti rekao, nisi dobro odradio, rekao sam ti da zamjeniš svoj stari SpawnIgraca sa tim što sam ti dao.. predopostavljam da si tu pogriješio :)

Bravo Majstore sad je dobro Radi sve !

Samo je opet problem kaj izbacis iz wara nekoga ili zaustavis war  !! tu te ostavi gdje je bio war a ne da te baci tamo gdje si stavio da se spawnas !


Citat: davax poslato Septembar 16, 2013, 20:56:05 POSLE PODNE
Bravo Majstore sad je dobro Radi sve !

Samo je opet problem kaj izbacis iz wara nekoga ili zaustavis war  !! tu te ostavi gdje je bio war a ne da te baci tamo gdje si stavio da se spawnas !

napravi provjeru ili stavi da mu setuje hp na 0 i vratit će ga na njegov spawn :)

ubacio sam, nemam erorra ni warninga za to moram samo provjerit jel radi ig, al sam zajebo nesto u vezi org kad sam ime mjenjo, probo sam string promjenit ali opet isto..

C:\Documents and Settings\Toni\Desktop\NL\aEGRP v2.0.1 © 2013 by Farkias\gamemodes\FarkiasRP.pwn(35362) : error 047: array sizes do not match, or destination array is too small
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase


1 Error.


{
ftext = "Grove Street Hooligans";
PlayerInfo[playerid][pClan] = 4; PlayerInfo[playerid][pRank] = 1; PlayerInfo[playerid][pSkin] = 105;
PlayerInfo[playerid][pPozvan] = 0; SetPlayerSkin(playerid, PlayerInfo[playerid][pSkin]);
new string[256]; SCM(playerid,-1,""ZELENA"[GSH] "SIVA"Uspjesno ste se pridruzili Grove Street Hooligans Organizaciji!");
format(string, sizeof(string), ""ZELENA"[Grove Street Hooligans] "SIVA"Igrac %s je prihvatio poziv i pridruzio se Grove Street Hooligans!", GetName(playerid));
ChatGSH(-1, string);
}


a ovo mi je linija errora: ftext = "Grove Street Hooligans";
Poslednja Izmena: Septembar 16, 2013, 21:51:58 POSLE PODNE od Mr.Exclusive
Nudim usluge pomocnog mappera/skriptera. PM[/center]

Rjesio sam to, samo provjerim jel radi ovo za war, pa moze lock  8)
Nudim usluge pomocnog mappera/skriptera. PM[/center]

Faris nemam errora niti warninga ali mi vrijeme ne radi, stavim war na 5min, odigro 7-8 i nije se prekinuo..
Nudim usluge pomocnog mappera/skriptera. PM[/center]

Citat: Mr.Exclusive poslato Septembar 16, 2013, 22:20:16 POSLE PODNE
Faris nemam errora niti warninga ali mi vrijeme ne radi, stavim war na 5min, odigro 7-8 i nije se prekinuo..

meni nije bilo toga, samo je bio problem na ovom spawnaju i popravio sam evo sad, jer sam bio zaboravio kada sam objavljivao.. to si ti nešto radio.

Ma evo uspio sam rjesit, hvala. haha.

Moze lock !
Poslednja Izmena: Septembar 21, 2013, 13:01:30 POSLE PODNE od Mr.Exclusive
Nudim usluge pomocnog mappera/skriptera. PM[/center]