05.07.2018, 19:24
Looking for a community manager who will be able to gain a playerbase for a roleplay server. Thanks, if interested, send me a PM.
Tropical Island Roleplay is urgently in need of Betб-Testers,
Please send me a PM or contact Flynn Dawson on our Discord! Also we are in very necessary need of a server developer! Discord link: https://discord.gg/kYYrbf3 |
YCMD:start(playerid, params[], help) { //if(Player[playerid][Level] < 1 && !IsPlayerAdmin(playerid)) return SendErrorMessage(playerid,"You need to be a higher admin level."); if(help) { SendCommandHelpMessage(playerid, "start a round."); return 1; } if(Current != -1) return SendErrorMessage(playerid,"A round is in progress, please wait for it to end."); if(AllowStartBase == false) return SendErrorMessage(playerid,"Please wait."); new Params[2][64], CommandID; sscanf(params, "ss", Params[0], Params[1]); if(isnull(Params[0]) || IsNumeric(Params[0])) return SendUsageMessage(playerid,"/start [base | arena | rc | last] [ID]"); if(!strcmp(Params[0], "rc", true)) { AllowStartBase = false; // Make sure other player or you yourself is not able to start base on top of another base. SetTimer("OnRCStart", 2000, false); new iString[144]; format(iString, sizeof(iString), "{FFFFFF}%s "COL_PRIM"has started RC Battlefield round (Interior: 72)", Player[playerid][Name]); SendClientMessageToAll(-1, iString); } else if(!strcmp(Params[0], "last", true)) { if(ServerLastPlayed > -1 && ServerLastPlayedType > -1) { if(ServerLastPlayedType == 1) { new BaseID = ServerLastPlayed; if(BaseID > MAX_BASES) return SendErrorMessage(playerid,"The last played base does not exist."); if(!BExist[BaseID]) return SendErrorMessage(playerid,"The last played base does not exist."); AllowStartBase = false; // Make sure other player or you yourself is not able to start base on top of another base. SetTimerEx("OnBaseStart", 2000, false, "i", BaseID); new iString[144]; format(iString, sizeof(iString), "{FFFFFF}%s "COL_PRIM"has started the last played Base: {FFFFFF}%s (ID: %d)", Player[playerid][Name], BName[BaseID], BaseID); SendClientMessageToAll(-1, iString); GameType = BASE; goto skipped; } else if(ServerLastPlayedType == 0) { new ArenaID = ServerLastPlayed; if(ArenaID > MAX_ARENAS) return SendErrorMessage(playerid,"The last played arena does not exist."); if(!AExist[ArenaID]) return SendErrorMessage(playerid,"The last played arena does not exist."); GameType = ARENA; AllowStartBase = false; // Make sure other player or you yourself is not able to start base on top of another base. SetTimerEx("OnArenaStart", 2000, false, "i", ArenaID); new iString[144]; format(iString, sizeof(iString), "{FFFFFF}%s "COL_PRIM"has started the last played Arena: {FFFFFF}%s (ID: %d)", Player[playerid][Name], AName[ArenaID], ArenaID); SendClientMessageToAll(-1, iString); goto skipped; } } else return SendErrorMessage(playerid, "No bases/arenas have been played lately!"); } else if(strcmp(Params[0], "base", true) == 0) CommandID = 1; else if(strcmp(Params[0], "arena", true) == 0) CommandID = 2; else return SendUsageMessage(playerid,"/start [base | arena | rc | last] [ID]"); if(!IsNumeric(Params[1])) return SendErrorMessage(playerid,"Base/Arena ID can only be numerical."); if(CommandID == 1) { new BaseID = strval(Params[1]); if(BaseID > MAX_BASES) return SendErrorMessage(playerid,"That base does not exist."); if(!BExist[BaseID]) return SendErrorMessage(playerid,"That base does not exist."); AllowStartBase = false; // Make sure other player or you yourself is not able to start base on top of another base. SetTimerEx("OnBaseStart", 2000, false, "i", BaseID); new iString[144]; format(iString, sizeof(iString), "{FFFFFF}%s "COL_PRIM"has started Base: {FFFFFF}%s (ID: %d)", Player[playerid][Name], BName[BaseID], BaseID); SendClientMessageToAll(-1, iString); } else if(CommandID == 2) { new ArenaID = strval(Params[1]); if(ArenaID > MAX_ARENAS) return SendErrorMessage(playerid,"That arena does not exist."); if(!AExist[ArenaID]) return SendErrorMessage(playerid,"That arena does not exist."); AllowStartBase = false; // Make sure other player or you yourself is not able to start base on top of another base. SetTimerEx("OnArenaStart", 2000, false, "i", ArenaID); new iString[144]; format(iString, sizeof(iString), "{FFFFFF}%s "COL_PRIM"has started Arena: {FFFFFF}%s (ID: %d)", Player[playerid][Name], AName[ArenaID], ArenaID); SendClientMessageToAll(-1, iString); } skipped: foreach(new i : Player) { if(CanPlay(i)) { TogglePlayerControllable(i, 0); // Pause all the players. Player[i][ToAddInRound] = true; } } return 1; }
CMD:start(playerid, params[]) { if(Player[playerid][Level] < 1) return SendClientMessage(playerid,-1,"{FFFFFF}Error: {FF5555}You need to be a higher admin level."); if(Current != -1) return SendClientMessage(playerid,-1,"{FFFFFF}Error: {FF5555}A round is in progress, please wait for it to end."); if(AllowStartBase == false) return SendClientMessage(playerid,-1,"{FFFFFF}Error: {FF5555}Please wait."); new Params[2][64], iString[160], CommandID; sscanf(params, "s[64]s[64]", Params[0], Params[1]); if(isnull(Params[0]) || IsNumeric(Params[0])) return SendClientMessage(playerid,-1,"{FFFFFF}Usage: {FF5555}/start [base | arena] [ID]"); if(strcmp(Params[0], "base", true) == 0) CommandID = 1; else if(strcmp(Params[0], "arena", true) == 0) CommandID = 2; else return SendClientMessage(playerid,-1,"{FFFFFF}Usage: {FF5555}/start [base | arena] [ID]"); if(!IsNumeric(Params[1])) return SendClientMessage(playerid,-1,"{FFFFFF}Error: {FF5555}Base/Arena ID can only be numerical."); if(CommandID == 1) { new BaseID = strval(Params[1]); if(BaseID > MAX_BASES) return SendClientMessage(playerid,-1,"{FFFFFF}Error: {FF5555}That base does not exist."); if(!BExist[BaseID]) return SendClientMessage(playerid,-1,"{FFFFFF}Error: {FF5555}That base does not exist."); AllowStartBase = false; // Make sure other player or you yourself is not able to start base on top of another base. SetTimerEx("OnBaseStart", 4000, false, "i", BaseID); format(iString, sizeof(iString), "{FFFFFF}%s {FF5555}has started Base: {FFFFFF}%s (ID: %d)", Player[playerid][Name], BName[BaseID], BaseID); SendClientMessageToAll(-1, iString); GameType = BASE; } else if(CommandID == 2) { new ArenaID = strval(Params[1]); if(ArenaID > MAX_ARENAS) return SendClientMessage(playerid,-1,"{FFFFFF}Error: {FF5555}That arena does not exist."); if(!AExist[ArenaID]) return SendClientMessage(playerid,-1,"{FFFFFF}Error: {FF5555}That anrea does not exist."); AllowStartBase = false; // Make sure other player or you yourself is not able to start base on top of another base. SetTimerEx("OnArenaStart", 4000, false, "i", ArenaID); format(iString, sizeof(iString), "{FFFFFF}%s {FF5555}has started Arena: {FFFFFF}%s (ID: %d)", Player[playerid][Name], AName[ArenaID], ArenaID); SendClientMessageToAll(-1, iString); GameType = ARENA; } foreach(new i : Player) { if(Player[i][Team] == ATTACKER || Player[i][Team] == DEFENDER) { TogglePlayerControllable(i, false); // Pause all the players. } } return 1; }