2021-01-28, 11:37 PM
Tenho um metodo de mudar de mapas (DM) e quero fazer um round time com textdraw que se mude sozinha (estilo payday de rpg)
Tenho um settimer com 600000 de dura??o, como eu poderia fazer para que esse textdraw ganhe esse tempo e comece a contar sozinho e abaixando, e quando chegar a 0 mudar o map? E tem algum modo que esse switch(area) seja menor?
codigo:
Tenho um settimer com 600000 de dura??o, como eu poderia fazer para que esse textdraw ganhe esse tempo e comece a contar sozinho e abaixando, e quando chegar a 0 mudar o map? E tem algum modo que esse switch(area) seja menor?
codigo:
PHP Code:
function::ChangeArea()
{
KillTimer(tbase); KillTimer(inicio);
LastVote = GetTickCount();
tbase = SetTimer("ChangeArea",600000, 1);
area = randomEx(1, MAX_MAPS);
? ? switch(area)
{
case 1: {mapname = "San Andreas";}
case 2: {mapname = "BlackField";}
case 3: {mapname = "Last Dime Motel";}
case 4: {mapname = "Foster Valley";}
case 5: {mapname = "Missionary Hill";}
case 6: {mapname = "Los Santos International";}
case 7: {mapname = "North Rock";}
case 8: {mapname = "Golf Course";}
case 9: {mapname = "Prickle Pine";}
case 10: {mapname = "Verona Beach";}
case 11: {mapname = "Roda Gigante";}
case 12: {mapname = "Pilgrim";}
case 13: {mapname = "Whitewood Estates";}
case 14: {mapname = "BlackField Chapel";}
case 15: {mapname = "Juniper Hollow";}
case 16: {mapname = "Parque Glen";}
case 17: {mapname = "Ganton";}
case 18: {mapname = "Estacao Unity";}
case 19: {mapname = "Mansao dos Lockwood";}
case 20: {mapname = "Tierra Robada";}
case 21: {mapname = "Las Barrancas";}
case 22: {mapname = "Las Venturas Airport";}
case 23: {mapname = "Hilltop Farm";}
case 24: {mapname = "Palomino Creek";}
case 25: {mapname = "Ocean Docks";}
case 26: {mapname = "SF Bridge";}
case 27: {mapname = "Redsands West";}
case 28: {mapname = "Vale Ocultado";}
case 29: {mapname = "Bone County";}
case 30: {mapname = "Big Fabrica";}
case 31: {mapname = "Spread Ranch";}
case 32: {mapname = "Leafy Hollow";}
case 33: {mapname = "Construcao";}
case 34: {mapname = "Lunk Yard";}
case 35: {mapname = "Doherty";}
case 36: {mapname = "Quarry";}
case 37: {mapname = "Broken City";}
case 38: {mapname = "Diablo";}
case 39: {mapname = "GreenGlass College";}
case 40: {mapname = "The Esmerald Isle";}
case 41: {mapname = "Idlewood";}
case 42: {mapname = "Pracinha";}
case 43: {mapname = "Casarao";}
case 44: {mapname = "Country Side";}
case 45: {mapname = "Construcao LV";}
case 46: {mapname = "The Big Ear";}
case 47: {mapname = "Rock Hotel";}
case 48: {mapname = "Creek";}
case 49: {mapname = "Estacionamento LV";}
case 50: {mapname = "Arena Life";}
case 51: {mapname = "Pista de Skate";}
case 52: {mapname = "The High Roller";}
case 53: {mapname = "Conference Center";}
case 54: {mapname = "Rodovia";}
case 55: {mapname = "East Los Santos";}
case 56: {mapname = "Los Flores";}
case 57: {mapname = "Los Vagos";}
case 58: {mapname = "Marina";}
case 59: {mapname = "Tony's liquor";}
case 60: {mapname = "Big Smoke Hood";}
case 61: {mapname = "Area 51";}
case 62: {mapname = "Bacres";}
case 63: {mapname = "Bayside";}
case 64: {mapname = "Esplanade North";}
case 65: {mapname = "Fort Carson";}
case 66: {mapname = "Green Palms";}
case 67: {mapname = "Pershing Square";}
case 68: {mapname = "Regular Tom";}
case 69: {mapname = "San Fierro Beach";}
case 70: {mapname = "Temple";}
case 71: {mapname = "Jesus Hood";}
case 72: {mapname = "Fintersection";}
case 73: {mapname = "Cluckin Bell";}
case 74: {mapname = "Gay Square";}
case 75: {mapname = "Condominio SF";}
case 76: {mapname = "Hoff Park";}
case 77: {mapname = "Chafaris";}
case 78: {mapname = "Santa Flora";}
case 79: {mapname = "Juniper Hollow";}
case 80: {mapname = "Calton Heights";}
case 81: {mapname = "Queens";}
case 82: {mapname = "Garden Center";}
case 83: {mapname = "Angelpine";}
case 84: {mapname = "Navio";}
case 85: {mapname = "Golf";}
case 86: {mapname = "Lsujo";}
case 87: {mapname = "Avispa";}
case 88: {mapname = "Ebasin";}
case 89: {mapname = "Come-a-lot";}
case 90: {mapname = "Hankypanky";}
case 91: {mapname = "Red County";}
case 92: {mapname = "Easterbasin";}
case 93: {mapname = "East Beach";}
case 94: {mapname = "Supa Save";}
}
? ? GetPlayerWon();
UpdateRanks();
foreach(Player, i)
{
if(APlayerData[i][Logado])
{
SaveAccount(i);
rKills[i] = 0;
damageperplayer[i] = 0;
Votou[i] = false;
MortesRodada[i] = 0;
? ? ? ? ? ? KillsRodada[i] = 0;
}
}
thirdplayer = 0;
secondplayer = 0;
? ? new StringMAP[30];
format(StringMAP, 30, "mapname %s", mapname);
SendRconCommand(StringMAP);
foreach(Player, i)
{
if(IsPlayerConnected(i) && APlayerData[i][Logado] && Duelo[i] == 998 && AFK[i] == false)
{
TogglePlayerControllable(i,0);
GameTextForPlayer(i,"~r~>~y~Fim do Round~r~<",4000,6);
}
}
inicio = SetTimer("Iniciar",5000, 0);
return 1;
}