18.09.2013, 16:59
Hi guys, it passed long time since i've asked for help xD, but at this problem, i don't know what i can do more to solve it.
Okey, so i've made a Zombies VS Humans minigame for my server. I have this command:
Callback "StartZvH" isn't called but i don't know the reason. Here is the function:
Thanks in advance.
Okey, so i've made a Zombies VS Humans minigame for my server. I have this command:
Код:
CMD:zombies( playerid, params[ ] ) { if(IsZombieStarted == true) return SendClientMessage(playerid, COLOR_ULTRARED, "ERROR: The minigame already started!"); if(ZombieStarting != true) { ZombieStarting = true; IsZombieStarted = false; SendClientMessage(playerid, -1, " "); foreach(new i : Player) { switch(Roman[i]) { case 0: format(gString, 144, "Zombies VS Humans {FF9900}starting in {FF0000}100 seconds.{FF9900} Type {FF0000}/zombies {FF9900}to join the war!"); case 1: format(gString, 144, "Zombies VS Humans {FF9900}incepe in {FF0000}100 de secunde.{FF9900} Scrie {FF0000}/zombies {FF9900}pentru a intra in razboi!"); } SendClientMessage(playerid, 0x00FF00FF, gString); } SendClientMessage(playerid, -1, " "); ZH{playerid} = 1; TextDrawShowForPlayer(playerid, ZH1); TextDrawShowForPlayer(playerid, ZH2); DMTele( playerid, "Zombies VS Humans", "Zombies VS Humans ~y~- /zombies", -3167.1016, 2494.0969, 163.6744, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 100, "/zombies" ); TogglePlayerControllable(playerid, false); SetTimer("StartZvH", 5000, 0); } else { if((Iter_Count(Zombies) + Iter_Count(Humans)) >= 30) return SendClientMessage(playerid, COLOR_ULTRARED, "ERROR: Sorry, but the minigame it's already full!"); if((Iter_Count(Zombies) + Iter_Count(Humans)) < PLAYERS_TO_START_ZOMBIE) { foreach(new i : Player) { switch(Roman[i]) { case 0: format(gString, 144, "[ZvsH]: {FF9900}There are {FF0000}%d {FF9900}participants. Minigame needs {00FF00}%d {FF9900}players to start!", (Iter_Count(Zombies) + Iter_Count(Humans)), PLAYERS_TO_START_ZOMBIE - (Iter_Count(Zombies) + Iter_Count(Humans))); case 1: format(gString, 144, "[ZvsH]: {FF9900}Sunt {FF0000}%d {FF9900}de participanti. Minigameului trebuie {00FF00}%d {FF9900}jucatori ca sa inceapa!", (Iter_Count(Zombies) + Iter_Count(Humans)), PLAYERS_TO_START_ZOMBIE - (Iter_Count(Zombies) + Iter_Count(Humans))); } SendClientMessage(playerid, 0x00FF00FF, gString); } } ZH{playerid} = 1; TextDrawShowForPlayer(playerid, ZH1); TextDrawShowForPlayer(playerid, ZH2); DMTele( playerid, "Zombies VS Humans", "Zombies VS Humans ~y~- /zombies", -3167.1016, 2494.0969, 163.6744, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 100, "/zombies" ); TogglePlayerControllable(playerid, false); } return 1; }
Код:
forward StartZvH(); public StartZvH() { print("Started"); IsZombieStarted = true; ZombieStarting = false; ZombiePlayTime = gettime()+300; SendClientMessageToAll(0x00FF00FF, "Zombies VS Humans {FF9900}a inceput cu succes!"); SetTimer("ZMPlayTime", 1000, 0); foreach(new i: Player) { switch(Roman[i]) { case 0: format(gString, 144, "Minigame {00FF00}Zombies VS Humans {FF9900}has succesfully started!"); case 1: format(gString, 144, "Minigameul {00FF00}Zombies VS Humans {FF9900}a inceput cu succes!"); } SendClientMessage(i, COLOR_ORANGE, gString); } return 1; }