[DUDA] Problema en minijuego que ise
#1

Bueno amigos, quiero que me ayuden a solucionar un error por favor, miren que ise un minijuego de zombie pero tengo un problema eske aveces digamos puedo poner varias veces para jugar, una o dos veces y el juego funciona perfecto, pero ya despues cuando llamo a descongelar para que los jugadores se puedan mover no pasa, es como que el timer no existiera

el settimer lo creo en /activargmz y llama la forward "EnEspera"
CODIGO:
Quote:

#include <a_samp>
#include <streamer>

#pragma tabsize 0
// -= Variables =- //
new Cargobob;
new Cargobob2;
new Leviathan;
new Zombie[MAX_PLAYERS];
new Humano[MAX_PLAYERS];
new bool:EnGuerra[MAX_PLAYERS];
new bool:EmpezoGMZ;
new ConteoH,ConteoZ;
new name[MAX_PLAYER_NAME+1];
new MatoA[MAX_PLAYER_NAME+1];
new Murio[MAX_PLAYER_NAME+1];
new MensajeZ[800];

// -== Colores ==- //

#define COLOR_AV 0xADFF2F
#define COLOR_TURQUESA 0x00CED1

// -== Forward's ==- //
forward Premios(playerid);
forward EnEspera(playerid);
forward TerminarJuego(playerid);

new Float:SpawnHumano[][] =
{
{1773.0538,-1988.1658,14.1172,41.0663}, // Randomspawn
{1771.8246,-1979.4312,14.1172,71.8568}, // Randomspawn
{1781.7789,-1988.6207,14.1172,63.5847} // Randomspawn
};

new Float:SpawnZombie[][] =
{
{1718.2095,-1878.0883,13.5658,173.3540}, // Randomspawn
{1722.1494,-1881.8196,13.5648,119.3557}, // Randomspawn
{1706.0249,-1891.8911,13.5688,227.1225} // Randomspawn
};

public OnFilterScriptInit()
{
print("\n--------------------------------------");
print(" > Zombie Vs Humanos V.1");
print("--------------------------------------\n");

// Bool
EmpezoGMZ = false;
// -= Mapa Unity Station by Hossa =- //
Cargobob = AddStaticVehicleEx(548,1779.7324219,-1896.3160400,15.2891808,179.4595947,-1,-1,15); //Cargobob
Cargobob2 = AddStaticVehicleEx(548,1796.4006348,-1896.9847412,15.2891808,179.4561157,-1,-1,15); //Cargobob
Leviathan = AddStaticVehicleEx(417,1788.4876709,-1909.7525635,12.3955364,0.0000000,-1,-1,15); //Leviathan
SetVehicleVirtualWorld(Cargobob,35);
SetVehicleVirtualWorld(Cargobob2,35);
SetVehicleVirtualWorld(Leviathan,35);
CreateDynamicObject(7379,1811.5609131,-1882.1365967,12.5843544,0.0000000,0.0000000,0.0000 000,35); //object(vgsnelec_fence_02a) (1)
CreateDynamicObject(7379,1811.5216064,-1991.2337646,12.5843544,0.0000000,0.0000000,0.0000 000,35); //object(vgsnelec_fence_02a) (2)
CreateDynamicObject(7379,1693.4334717,-2019.0535889,12.5843544,0.0000000,0.0000000,89.775 0854,35); //object(vgsnelec_fence_02a) (3)
CreateDynamicObject(8172,1732.3397217,-2019.5096436,14.9408722,0.0000000,95.2800293,270.2 702637,35); //object(vgssairportland07) (1)
CreateDynamicObject(8172,1811.9593506,-1939.9877930,14.9408722,0.0000000,95.2789307,359.9 990234,35); //object(vgssairportland07) (2)
CreateDynamicObject(8172,1742.2110596,-1869.9967041,14.9408722,0.0000000,95.2734375,91.75 45166,35); //object(vgssairportland07) (3)
CreateDynamicObject(8172,1684.1379395,-1949.7436523,14.9408722,0.0000000,95.2679443,179.5 423584,35); //object(vgssairportland07) (4)
CreateDynamicObject(987,1681.9017334,-1961.6756592,11.7357283,0.0000000,0.0000000,89.730 0110,35); //object(elecfence_bar) (1)
CreateDynamicObject(3928,1780.0808105,-1888.7448730,12.3893738,0.0000000,0.0000000,0.0000 000,35); //object(helipad) (1)
CreateDynamicObject(3928,1779.9528809,-1895.9240723,12.3892822,0.0000000,0.0000000,0.0000 000,35); //object(helipad) (3)
CreateDynamicObject(3928,1796.1163330,-1895.7102051,12.4011230,0.0000000,0.0000000,0.0000 000,35); //object(helipad) (4)
CreateDynamicObject(3928,1796.1805420,-1888.6090088,12.4011688,0.0000000,0.0000000,0.0000 000,35); //object(helipad) (5)
CreateDynamicObject(3928,1788.2060547,-1903.0550537,12.3953323,0.0000000,0.0000000,0.0000 000,35); //object(helipad) (7)
CreateDynamicObject(3928,1796.3089600,-1910.2702637,12.3973160,0.0000000,0.0000000,0.0000 000,35); //object(helipad) (
CreateDynamicObject(3928,1780.0709229,-1910.2818604,12.3893700,0.0000000,0.0000000,0.0000 000,35); //object(helipad) (9)
CreateDynamicObject(3928,1796.4481201,-1917.3964844,12.3938370,0.0000000,0.0000000,0.0000 000,35); //object(helipad) (10)
CreateDynamicObject(3928,1780.1621094,-1917.4711914,12.3894386,0.0000000,0.0000000,0.0000 000,35); //object(helipad) (11)
CreateDynamicObject(982,1770.7806396,-1941.9884033,13.2510538,0.0000000,0.0000000,89.729 9805,35); //object(fenceshit) (1)
CreateDynamicObject(982,1779.7919922,-1935.6168213,13.2304296,0.0000000,0.0000000,89.725 3418,35); //object(fenceshit) (2)
CreateDynamicObject(982,1799.0983887,-1932.3648682,13.2510538,0.0000000,0.0000000,89.725 3418,35); //object(fenceshit) (3)
CreateDynamicObject(982,1781.7375488,-1928.4891357,13.0719757,0.0000000,0.0000000,89.725 3418,35); //object(fenceshit) (4)
CreateDynamicObject(982,1798.7509766,-1925.8311768,13.0732737,0.0000000,0.0000000,89.725 3418,35); //object(fenceshit) (5)
CreateDynamicObject(982,1781.6762695,-1922.5830078,13.0740986,0.0000000,0.0000000,89.725 3418,35); //object(fenceshit) (6)
CreateDynamicObject(982,1799.7550049,-1919.3913574,13.0764189,0.0000000,0.0000000,89.725 3418,35); //object(fenceshit) (7)
CreateDynamicObject(981,1775.3708496,-1939.1060791,12.5589333,0.0000000,0.0000000,0.0000 000,35); //object(helix_barrier) (1)
CreateDynamicObject(2974,1767.5961914,-1933.2868652,11.0623226,0.0000000,0.0000000,0.0000 000,35); //object(k_cargo1) (1)
CreateDynamicObject(2974,1766.1385498,-1933.3228760,12.0623226,0.0000000,0.0000000,0.0000 000,35); //object(k_cargo1) (2)
CreateDynamicObject(2932,1777.9207764,-1949.6710205,13.3114738,11.9100037,63.5200195,65.7 298889,35); //object(kmb_container_blue) (1)
CreateDynamicObject(18260,1706.9804688,-1931.2333984,14.1388578,0.0000000,0.0000000,0.0000 000,35); //object(crates01) (1)
CreateDynamicObject(930,1706.1063232,-1930.6329346,15.0415411,0.0000000,0.0000000,0.0000 000,35); //object(o2_bottles) (1)
CreateDynamicObject(931,1707.8974609,-1929.8614502,12.6302032,0.0000000,0.0000000,0.0000 000,35); //object(rack3) (1)
CreateDynamicObject(964,1708.0051270,-1932.5133057,14.5656652,0.0000000,0.0000000,0.0000 000,35); //object(cj_metal_crate) (1)
CreateDynamicObject(1685,1702.3326416,-1914.8764648,13.3196535,0.0000000,0.0000000,0.0000 000,35); //object(blockpallet) (1)
CreateDynamicObject(1685,1702.3604736,-1913.1088867,13.3196468,0.0000000,0.0000000,0.0000 000,35); //object(blockpallet) (2)
CreateDynamicObject(1685,1702.3365479,-1911.3718262,13.3196526,0.0000000,0.0000000,0.0000 000,35); //object(blockpallet) (3)
CreateDynamicObject(1685,1702.3342285,-1909.6774902,13.3196526,0.0000000,0.0000000,0.0000 000,35); //object(blockpallet) (4)
CreateDynamicObject(1685,1702.3334961,-1907.9748535,13.3196535,0.0000000,0.0000000,0.0000 000,35); //object(blockpallet) (5)
CreateDynamicObject(3574,1696.0605469,-1982.6098633,15.8088789,0.0000000,0.0000000,0.0000 000,35); //object(lasdkrtgrp2) (1)
CreateDynamicObject(3577,1731.5900879,-1890.6437988,13.3450165,0.0000000,0.0000000,0.0000 000,35); //object(dockcrates1_la) (1)
CreateDynamicObject(3630,1776.3914795,-2005.7105713,14.6167965,0.0000000,0.0000000,0.0000 000,35); //object(crdboxes2_las) (1)
CreateDynamicObject(3630,1766.9119873,-2005.7713623,14.6167965,0.0000000,0.0000000,0.0000 000,35); //object(crdboxes2_las) (2)
CreateDynamicObject(3630,1757.4365234,-2005.7924805,14.6167965,0.0000000,0.0000000,0.0000 000,35); //object(crdboxes2_las) (3)
CreateDynamicObject(3630,1747.9550781,-2005.8170166,14.6167965,0.0000000,0.0000000,0.0000 000,35); //object(crdboxes2_las) (4)
CreateDynamicObject(3630,1722.4272461,-2005.6175537,14.6098099,0.0000000,0.0000000,0.0000 000,35); //object(crdboxes2_las) (5)
CreateDynamicObject(3630,1712.9724121,-2005.6080322,14.6123886,0.0000000,0.0000000,0.0000 000,35); //object(crdboxes2_las) (6)
CreateDynamicObject(3630,1703.4975586,-2005.6087646,14.6123886,0.0000000,0.0000000,0.0000 000,35); //object(crdboxes2_las) (7)
CreateDynamicObject(3630,1694.0174561,-2005.6477051,14.6124077,0.0000000,0.0000000,0.0000 000,35); //object(crdboxes2_las) (
CreateDynamicObject(3630,1687.4982910,-2005.6356201,14.6188135,0.0000000,0.0000000,0.0000 000,35); //object(crdboxes2_las) (9)
CreateDynamicObject(987,1711.1087646,-1968.9357910,11.6177588,77.4150085,0.0000000,270.2 702637,35); //object(elecfence_bar) (2)
CreateDynamicObject(987,1687.1896973,-1937.5057373,10.3677588,65.4996643,0.0000000,1.893 9209,35); //object(elecfence_bar) (3)
CreateDynamicObject(996,1719.9453125,-1887.4951172,13.3141079,0.0000000,0.0000000,0.0000 000,35); //object(lhouse_barrier1) (1)
CreateDynamicObject(996,1703.9140625,-1887.4677734,13.3180227,0.0000000,0.0000000,0.0000 000,35); //object(lhouse_barrier1) (2)
CreateDynamicObject(996,1701.0239258,-1872.9053955,13.3180227,0.0000000,0.0000000,0.0000 000,35); //object(lhouse_barrier1) (3)
CreateDynamicObject(996,1710.9754639,-1873.1706543,13.3180227,0.0000000,0.0000000,0.0000 000,35); //object(lhouse_barrier1) (4)
CreateDynamicObject(996,1720.2777100,-1873.1292725,13.3180227,0.0000000,0.0000000,0.0000 000,35); //object(lhouse_barrier1) (5)
CreateDynamicObject(3169,1702.3930664,-1880.2453613,12.5696373,0.0000000,0.0000000,0.0000 000,35); //object(trailer_large2_01) (1)
CreateDynamicObject(3169,1728.3746338,-1879.8458252,12.5635691,0.0000000,0.0000000,179.45 99609,35); //object(trailer_large2_01) (2)
CreateDynamicObject(8879,1732.0195312,-1950.0150146,19.2098885,0.0000000,0.0000000,0.0000 000,35); //object(vgsecnstrct0 (1)
CreateDynamicObject(2956,1696.4608154,-1944.6683350,12.5444393,0.0000000,0.0000000,0.0000 000,35); //object(immmcran) (1)
CreateDynamicObject(18275,1715.8134766,-1934.9167480,14.8177900,0.0000000,0.0000000,0.0000 000,35); //object(cw2_mtbfinish) (1)
CreateDynamicObject(16365,1691.9462891,-1924.5604248,15.8729515,0.0000000,0.0000000,0.0000 000,35); //object(des_substat_17) (1)
CreateDynamicObject(16365,1697.4582520,-1924.5148926,15.8729515,0.0000000,0.0000000,0.0000 000,35); //object(des_substat_17) (2)
CreateDynamicObject(3273,1694.4271240,-1915.8458252,12.5556335,0.0000000,0.0000000,0.0000 000,35); //object(substa_transf2_) (1)
CreateDynamicObject(3638,1692.3726807,-1899.2286377,15.8805981,0.0000000,0.0000000,0.0000 000,35); //object(elecstionv_las) (1)
CreateDynamicObject(3865,1715.8576660,-1939.5736084,14.5135288,0.0000000,0.0000000,179.45 99609,35); //object(concpipe_sfxrf) (1)
CreateDynamicObject(3884,1701.6364746,-1934.7663574,15.6064558,0.0000000,0.0000000,0.0000 000,35); //object(samsite_sfxrf) (1)
CreateDynamicObject(3884,1726.6048584,-1941.8382568,19.0059166,0.0000000,0.0000000,0.0000 000,35); //object(samsite_sfxrf) (2)
CreateDynamicObject(3884,1758.9678955,-1942.8137207,18.8414116,0.0000000,0.0000000,0.0000 000,35); //object(samsite_sfxrf) (3)
CreateDynamicObject(3884,1759.5626221,-1933.6057129,18.9689026,0.0000000,0.0000000,0.0000 000,35); //object(samsite_sfxrf) (4)
CreateDynamicObject(2985,1721.5130615,-1934.7899170,15.4728317,0.0000000,0.0000000,270.27 02637,35); //object(minigun_base) (1)
CreateDynamicObject(2985,1706.3774414,-1935.0699463,15.4728317,0.0000000,0.0000000,270.26 91650,35); //object(minigun_base) (2)
CreateDynamicObject(3279,1739.5047607,-2006.9799805,13.1171875,81.3850098,0.0000000,195.4 299316,35); //object(a51_spottower) (1)
CreateDynamicObject(3791,1696.9888916,-2001.2791748,13.5818577,0.0000000,0.0000000,0.0000 000,35); //object(missile_10_sfxr) (1)
CreateDynamicObject(3791,1702.9460449,-2000.6014404,13.5818577,0.0000000,0.0000000,0.0000 000,35); //object(missile_10_sfxr) (2)
CreateDynamicObject(3791,1700.1951904,-1996.5631104,13.5818577,0.0000000,0.0000000,0.0000 000,35); //object(missile_10_sfxr) (3)
CreateDynamicObject(3791,1695.4239502,-1989.9877930,13.5818577,0.0000000,0.0000000,0.0000 000,35); //object(missile_10_sfxr) (4)
CreateDynamicObject(3791,1702.0003662,-1993.2386475,13.5818577,0.0000000,0.0000000,0.0000 000,35); //object(missile_10_sfxr) (5)
CreateDynamicObject(5836,1715.1340332,-1912.2465820,21.0309467,0.0000000,0.0000000,0.0000 000,35); //object(ci_watertank) (1)
CreateDynamicObject(3286,1721.7155762,-1967.9666748,17.8245525,150.8600464,0.0000000,0.00 00000,35); //object(cxrf_watertwr) (1)
CreateDynamicObject(4206,1728.2128906,-1972.7473145,13.6149731,0.0000000,0.0000000,0.0000 000,35); //object(pershingpool_lan) (1)
CreateDynamicObject(3515,1721.7043457,-1970.5739746,11.3250732,0.0000000,0.0000000,0.0000 000,35); //object(vgsfountain) (1)
CreateDynamicObject(12913,1778.3247070,-1978.9197998,15.7424774,0.0000000,0.0000000,0.0000 000,35); //object(sw_fueldrum03) (1)
CreateDynamicObject(10773,1770.1237793,-1993.0435791,15.8564262,0.0000000,0.0000000,0.0000 000,35); //object(dk_cargoshp2_sfse) (1)
CreateDynamicObject(1383,1797.6562500,-1969.9583740,45.0791168,0.0000000,0.0000000,1.9849 854,35); //object(twrcrane_m_04) (1)
CreateDynamicObject(8873,1796.0076904,-1945.2900391,18.6439705,0.0000000,0.0000000,0.0000 000,35); //object(vgsecnstrct12) (1)
CreateDynamicObject(3461,1781.8112793,-1942.4084473,16.9874153,0.0000000,0.0000000,0.0000 000,35); //object(tikitorch01_lvs) (1)
CreateDynamicObject(3461,1769.0908203,-1935.1542969,17.1814671,0.0000000,0.0000000,0.0000 000,35); //object(tikitorch01_lvs) (2)
CreateDynamicObject(3461,1768.7021484,-1907.6008301,17.1814671,0.0000000,0.0000000,0.0000 000,35); //object(tikitorch01_lvs) (3)
CreateDynamicObject(3461,1759.9296875,-1943.0093994,20.3834209,0.0000000,0.0000000,0.0000 000,35); //object(tikitorch01_lvs) (4)
CreateDynamicObject(3461,1759.7033691,-1932.8220215,20.4262638,0.0000000,0.0000000,0.0000 000,35); //object(tikitorch01_lvs) (5)
CreateDynamicObject(3461,1726.3024902,-1942.9376221,20.3955269,0.0000000,0.0000000,0.0000 000,35); //object(tikitorch01_lvs) (6)
CreateDynamicObject(3461,1726.1273193,-1932.7564697,20.4164238,0.0000000,0.0000000,0.0000 000,35); //object(tikitorch01_lvs) (7)
CreateDynamicObject(3461,1717.8135986,-1935.5369873,17.1814671,0.0000000,0.0000000,0.0000 000,35); //object(tikitorch01_lvs) (
CreateDynamicObject(3461,1713.6783447,-1935.4562988,17.1814671,0.0000000,0.0000000,0.0000 000,35); //object(tikitorch01_lvs) (9)
CreateDynamicObject(3461,1700.2022705,-1935.4853516,17.1814671,0.0000000,0.0000000,0.0000 000,35); //object(tikitorch01_lvs) (10)
CreateDynamicObject(3461,1699.6340332,-1888.5527344,21.8891392,0.0000000,0.0000000,0.0000 000,35); //object(tikitorch01_lvs) (11)
CreateDynamicObject(3461,1734.5289307,-1888.5902100,21.8823204,0.0000000,0.0000000,0.0000 000,35); //object(tikitorch01_lvs) (12)
CreateDynamicObject(3461,1734.1619873,-1893.8934326,25.4597855,0.0000000,0.0000000,0.0000 000,35); //object(tikitorch01_lvs) (13)
CreateDynamicObject(3461,1734.3343506,-1903.0285645,25.4597855,0.0000000,0.0000000,0.0000 000,35); //object(tikitorch01_lvs) (14)
CreateDynamicObject(3461,1733.8682861,-1912.0627441,25.4597855,0.0000000,0.0000000,0.0000 000,35); //object(tikitorch01_lvs) (15)
CreateDynamicObject(3461,1733.8682861,-1920.9030762,25.4575882,0.0000000,0.0000000,0.0000 000,35); //object(tikitorch01_lvs) (16)
CreateDynamicObject(3461,1734.2547607,-1929.7034912,25.4597855,0.0000000,0.0000000,0.0000 000,35); //object(tikitorch01_lvs) (17)
CreateDynamicObject(3461,1702.4141846,-1880.4401855,17.1432610,0.0000000,0.0000000,0.0000 000,35); //object(tikitorch01_lvs) (1
CreateDynamicObject(3461,1728.0736084,-1879.8251953,17.0857277,0.0000000,0.0000000,0.0000 000,35); //object(tikitorch01_lvs) (19)
CreateDynamicObject(3564,1782.0124512,-1957.8424072,14.1767635,286.5549316,67.4900208,139 .5350647,35); //object(lastran1_la01) (1)
CreateDynamicObject(3585,1777.2941895,-1956.7186279,14.3167629,7.9400024,218.3500366,169. 7099609,35); //object(lastran1_la02) (1)
CreateDynamicObject(3564,1769.5910645,-1955.7709961,13.6767635,93.2950134,316.3299561,351 .9249268,35); //object(lastran1_la01) (2)
CreateDynamicObject(3585,1757.3867188,-1955.5786133,14.3167629,101.2326355,281.8675537,12 9.8258057,35); //object(lastran1_la02) (2)
return 1;
}

public OnFilterScriptExit()
{
return 1;
}

public OnPlayerConnect(playerid)
{
Zombie[playerid] = 0;
Humano[playerid] = 0;
return 1;
}

public OnPlayerDisconnect(playerid, reason)
{
EnGuerra[playerid] = false;
Zombie[playerid] = 0;
Humano[playerid] = 0;
return 1;
}

public OnPlayerSpawn(playerid)
{
EnGuerra[playerid] = false;
Zombie[playerid] = 0;
Humano[playerid] = 0;
SetPlayerVirtualWorld(playerid,0);
return 1;
}

public OnPlayerDeath(playerid, killerid, reason)
{
if(Humano[killerid] && Zombie[playerid])
{
GetPlayerName(killerid, MatoA, sizeof(MatoA));
GetPlayerName(playerid, Murio, sizeof(Murio));
format(MensajeZ,sizeof(MensajeZ),"{5DC1B9}GmZ: El Humano %s a Eliminado Al Zombie %s",MatoA,Murio);
Zombie[playerid] = 0;
ConteoZ--;
if(ConteoZ == 0) return SendClientMessageToAll(COLOR_TURQUESA,"{5DC1B9}Gue rra Mundial Z: Los Humanos Han Eliminado La Infeccion"),Premios(playerid),TerminarJuego(player id);
}
return 1;
}

public OnPlayerGiveDamage(playerid, damagedid, Float: amount, weaponid)
{
if(Zombie[playerid] == 1 && Humano[damagedid] == 1)
{
GetPlayerName(playerid, MatoA, sizeof(MatoA));
GetPlayerName(damagedid, Murio, sizeof(Murio));
format(MensajeZ,sizeof(MensajeZ),"{5DC1B9}Guerra Mundial Z: El Zombie %s a Infectado Al Humano &s",MatoA,Murio);
SendClientMessageToAll(COLOR_TURQUESA,MensajeZ);
Humano[damagedid] = 0;
Zombie[damagedid] = 1;
ConteoH--;
if(ConteoH == 0) return SendClientMessageToAll(COLOR_TURQUESA,"{5DC1B9}Gue rra Mundial Z: La Raza Humana a Dejado De Existir, Zombies Ganan"),Premios(playerid),TerminarJuego(playerid);
}
return 1;
}

public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/activargmz", cmdtext, true, 10) == 0)
{
if(EmpezoGMZ == true) return SendClientMessage(playerid,COLOR_AV,"<i>: Guerra Mundial Z Ya Esta Activado");
if(EmpezoGMZ == false)
{
EmpezoGMZ = true;
format(MensajeZ,sizeof(MensajeZ),"{5DC1B9}Guerra Mundial Z [30 SEC] > La Guerra Entre Los Zombies y Humanos a Iniciado, Unete a /GuerraMundialZ");
SendClientMessageToAll(COLOR_TURQUESA,MensajeZ);
SetTimer("EnEspera",30000, false);
}
return 1;
}

if (strcmp("/guerramundialz", cmdtext, true, 10) == 0)
{
if(EmpezoGMZ == false) return SendClientMessage(playerid,COLOR_AV,"<i>: Guerra Mundial Z Aun No Empieza");
if(EnGuerra[playerid] == true) return SendClientMessage(playerid,COLOR_AV,"<i>: Ya Estas En Guerra Mundial Z");
if(ConteoH == ConteoZ)
{
EquipoH(playerid);
ConteoH++;
EnGuerra[playerid] = true;
Humano[playerid] = 1;
GetPlayerName(playerid, name, sizeof(name));
format(MensajeZ,sizeof(MensajeZ),"{5DC1B9}%s Ahora Forma Parte Del Equipo Humano, En /GerraMundialZ",name);
SendClientMessageToAll(COLOR_TURQUESA,MensajeZ);
SetPlayerVirtualWorld(playerid,35);
TogglePlayerControllable(playerid,0);
}
else
{
EquipoZ(playerid);
ConteoZ++;
EnGuerra[playerid] = true;
Zombie[playerid] = 1;
GetPlayerName(playerid, name, sizeof(name));
format(MensajeZ,sizeof(MensajeZ),"{5DC1B9}%s Ahora Forma Parte Del Equipo Zombie, En /GerraMundialZ",name);
SendClientMessageToAll(COLOR_TURQUESA,MensajeZ);
SetPlayerVirtualWorld(playerid,35);
TogglePlayerControllable(playerid,0);
}
return 1;
}
return 0;
}

EquipoH(playerid)
{
new Random = random(sizeof(SpawnHumano));
SetPlayerPos(playerid, SpawnHumano[Random][0], SpawnHumano[Random][1], SpawnHumano[Random][2]);
SetPlayerFacingAngle(playerid, SpawnHumano[Random][3]);
SetPlayerColor(playerid,0xFFFFFF);
SetPlayerSkin(playerid,146);
ResetPlayerWeapons(playerid);
GivePlayerWeapon(playerid,2,999999);
GivePlayerWeapon(playerid,24,999999);
SetPlayerHealth(playerid,100);
SetPlayerArmour(playerid,100);
return 1;
}

EquipoZ(playerid)
{
new Random = random(sizeof(SpawnZombie));
SetPlayerPos(playerid, SpawnZombie[Random][0], SpawnZombie[Random][1], SpawnZombie[Random][2]);
SetPlayerFacingAngle(playerid, SpawnZombie[Random][3]);
SetPlayerColor(playerid,0xFF0000);
SetPlayerSkin(playerid,213);
ResetPlayerWeapons(playerid);
GivePlayerWeapon(playerid,9,999999);
SetPlayerHealth(playerid,100);
SetPlayerArmour(playerid,100);
return 1;
}

public Premios(playerid)
{
if(Zombie[playerid])
{
SetPlayerScore(playerid,GetPlayerScore(playerid)+2 0);
SendClientMessage(Zombie[playerid],COLOR_AV,"<i>: Felicidades Ganastes Con El Equipo Zombie");
}
else if(Humano[playerid])
{
SetPlayerScore(playerid,GetPlayerScore(playerid)+2 0);
SendClientMessage(Humano[playerid],COLOR_AV,"<i>: Felicidades Ganastes Con El Equipo Humano");
}
return 1;
}

public EnEspera(playerid)
{
if(ConteoZ == 0 || ConteoH == 0) return TerminarJuego(playerid);
if(Zombie[playerid] == 1 || Humano[playerid] == 1)
{
TogglePlayerControllable(Zombie[playerid],1);
TogglePlayerControllable(Humano[playerid],1);
format(MensajeZ,sizeof(MensajeZ),"{5DC1B9}Guerra Mundial Z: La Guerra A Comenzado");
SendClientMessageToAll(COLOR_TURQUESA,MensajeZ);
}
return 1;
}

public TerminarJuego(playerid)
{
ConteoZ = 0;
ConteoH = 0;
EmpezoGMZ = false;
EnGuerra[playerid] = false;
SendClientMessageToAll(-1,"Guerra Mundial Z Termino");
for(new i; i < MAX_PLAYERS; i++)
{
if(Zombie[i] || Humano[i] == 1)
{
SpawnPlayer(i);
Zombie[i] = 0;
Humano[i] = 0;

}
}

return 1;
}

me ayudan por favor ? y si me ven a algun error mas en el codigo ayudenme a solucionarlo por favor.
Reply
#2

Tu problema es que estas decongelando al playerid
no ha todos los que participaran usa un Bucle


Ejemplo
pawn Код:
#define ForEach(%0,%1) for(new %0 = 0; %0 != %1; %0++) if(IsPlayerConnected(%0) && !IsPlayerNPC(%0))
public EnEspera()
{
ForEach(i, GetMaxPlayers())
{
if(ConteoZ == 0 || ConteoH == 0) return TerminarJuego(playerid);
if(Zombie[i] == 1 || Humano[i] == 1)
{
TogglePlayerControllable(Zombie[i],1);
TogglePlayerControllable(Humano[i],1);
format(MensajeZ,sizeof(MensajeZ),"{5DC1B9}Guerra Mundial Z: La Guerra A Comenzado");
SendClientMessageToAll(COLOR_TURQUESA,MensajeZ);
}
}
return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)