pawn Код:
if(strcmp(cmdtext,"/roubar", true)==0)
{
if(PlayerInfo[playerid][Policial] == 0)
{
if(PlayerInfo[playerid][Roubando] == 0)
{
if(IsCountdownStarted == false)
{
Count = 60;
CountdownTimer = SetTimer("CountDown", 60000, 1); //1 minuto
IsCountdownStarted = true;
{
new Nome[24], Fala[100];
GetPlayerName(playerid, Nome, 24);
if(IsPlayerInRangeOfPoint(playerid, 1.0, 820.7717,8.4299,1004.1960)) //Roubo Loterica
{
format(Fala, sizeof(Fala), "O jogador [ %s ] e os [ %s ] estгo tentando roubar o cofre da loterica", Nome, GetNameORG(playerid));
SetTimerEx("RouboLoterica" ,60000, false ,"i", playerid);
ApplyAnimation(playerid,"ROB_BANK","CAT_Safe_Rob", 4.0, 1, 0,1 , 60000, 0);
PlayerInfo[playerid][Roubando] = 1;
if(PlayerInfo[playerid][Membro] == 0) { SendClientMessageToAll(COR_CIVIL, Fala); }
if(PlayerInfo[playerid][Membro] == 5) { SendClientMessageToAll(COR_AZTECAS, Fala); }
}
}
else
{
SendClientMessage(playerid, COR_GRAD, "[Erro] Vocк jб esta roubando um local");
}
}
else
{
SendClientMessage(playerid, COR_GRAD, "[Erro] Vocк nгo pode roubar um local");
}
return 1;
}
pawn Код:
public CountDown()
{
switch(Count)
{
case 59: { GameTextForPlayer("~n~~b~-~r~ 60 ~b~-", 1100, 3); }
case 58: { GameTextForPlayer("~n~~b~-~r~ 59 ~b~-", 1100, 3); }
case 57: { GameTextForPlayer("~n~~b~-~r~ 58 ~b~-", 1100, 3); }
case 56: { GameTextForPlayer("~n~~b~-~r~ 57 ~b~-", 1100, 3); }
case 55: { GameTextForPlayer("~n~~b~-~r~ 56 ~b~-", 1100, 3); }
case 54: { GameTextForPlayer("~n~~b~-~r~ 55 ~b~-", 1100, 3); }
case 53: { GameTextForPlayer("~n~~b~-~r~ 54 ~b~-", 1100, 3); }
case 52: { GameTextForPlayer("~n~~b~-~r~ 53 ~b~-", 1100, 3); }
case 51: { GameTextForPlayer("~n~~b~-~r~ 52 ~b~-", 1100, 3); }
case 50: { GameTextForPlayer("~n~~b~-~r~ 51 ~b~-", 1100, 3); }
case 49: { GameTextForPlayer("~n~~b~-~r~ 50 ~b~-", 1100, 3); }
case 48: { GameTextForPlayer("~n~~b~-~r~ 49 ~b~-", 1100, 3); }
case 47: { GameTextForPlayer("~n~~b~-~r~ 48 ~b~-", 1100, 3); }
case 46: { GameTextForPlayer("~n~~b~-~r~ 47 ~b~-", 1100, 3); }
case 45: { GameTextForPlayer("~n~~b~-~r~ 46 ~b~-", 1100, 3); }
case 44: { GameTextForPlayer("~n~~b~-~r~ 45 ~b~-", 1100, 3); }
case 43: { GameTextForPlayer("~n~~b~-~r~ 44 ~b~-", 1100, 3); }
case 42: { GameTextForPlayer("~n~~b~-~r~ 43 ~b~-", 1100, 3); }
case 41: { GameTextForPlayer("~n~~b~-~r~ 42 ~b~-", 1100, 3); }
case 40: { GameTextForPlayer("~n~~b~-~r~ 41 ~b~-", 1100, 3); }
case 39: { GameTextForPlayer("~n~~b~-~r~ 40 ~b~-", 1100, 3); }
case 38: { GameTextForPlayer("~n~~b~-~r~ 39 ~b~-", 1100, 3); }
case 37: { GameTextForPlayer("~n~~b~-~r~ 38 ~b~-", 1100, 3); }
case 36: { GameTextForPlayer("~n~~b~-~r~ 37 ~b~-", 1100, 3); }
case 35: { GameTextForPlayer("~n~~b~-~r~ 36 ~b~-", 1100, 3); }
case 34: { GameTextForPlayer("~n~~b~-~r~ 35 ~b~-", 1100, 3); }
case 33: { GameTextForPlayer("~n~~b~-~r~ 34 ~b~-", 1100, 3); }
case 32: { GameTextForPlayer("~n~~b~-~r~ 33 ~b~-", 1100, 3); }
case 31: { GameTextForPlayer("~n~~b~-~r~ 32 ~b~-", 1100, 3); }
case 30: { GameTextForPlayer("~n~~b~-~r~ 31 ~b~-", 1100, 3); }
case 29: { GameTextForPlayer("~n~~b~-~r~ 30 ~b~-", 1100, 3); }
case 28: { GameTextForPlayer("~n~~b~-~r~ 29 ~b~-", 1100, 3); }
case 27: { GameTextForPlayer("~n~~b~-~r~ 28 ~b~-", 1100, 3); }
case 26: { GameTextForPlayer("~n~~b~-~r~ 27 ~b~-", 1100, 3); }
case 25: { GameTextForPlayer("~n~~b~-~r~ 26 ~b~-", 1100, 3); }
case 24: { GameTextForPlayer("~n~~b~-~r~ 25 ~b~-", 1100, 3); }
case 23: { GameTextForPlayer("~n~~b~-~r~ 24 ~b~-", 1100, 3); }
case 22: { GameTextForPlayer("~n~~b~-~r~ 23 ~b~-", 1100, 3); }
case 21: { GameTextForPlayer("~n~~b~-~r~ 22 ~b~-", 1100, 3); }
case 20: { GameTextForPlayer("~n~~b~-~r~ 21 ~b~-", 1100, 3); }
case 19: { GameTextForPlayer("~n~~b~-~r~ 19 ~b~-", 1100, 3); }
case 18: { GameTextForPlayer("~n~~b~-~r~ 18 ~b~-", 1100, 3); }
case 17: { GameTextForPlayer("~n~~b~-~r~ 17 ~b~-", 1100, 3); }
case 16: { GameTextForPlayer("~n~~b~-~r~ 16 ~b~-", 1100, 3); }
case 15: { GameTextForPlayer("~n~~b~-~r~ 15 ~b~-", 1100, 3); }
case 14: { GameTextForPlayer("~n~~b~-~r~ 14 ~b~-", 1100, 3); }
case 13: { GameTextForPlayer("~n~~b~-~r~ 13 ~b~-", 1100, 3); }
case 12: { GameTextForPlayer("~n~~b~-~r~ 12 ~b~-", 1100, 3); }
case 11: { GameTextForPlayer("~n~~b~-~r~ 11 ~b~-", 1100, 3); }
case 10: { GameTextForPlayer("~n~~b~-~r~ 10 ~b~-", 1100, 3); }
case 9: { GameTextForPlayer("~n~~b~-~r~ 9 ~b~-", 1100, 3); }
case 8: { GameTextForPlayer("~n~~b~-~r~ 8 ~b~-", 1100, 3); }
case 7: { GameTextForPlayer("~n~~b~-~r~ 7 ~b~-", 1100, 3); }
case 6: { GameTextForPlayer("~n~~b~-~r~ 6 ~b~-", 1100, 3); }
case 5: { GameTextForPlayer("~n~~b~-~r~ 5 ~b~-", 1100, 3); }
case 4: { GameTextForPlayer("~n~~b~-~r~ 4 ~b~-", 1100, 3); }
case 3: { GameTextForPlayer("~n~~b~-~r~ 3 ~b~-", 1100, 3); }
case 2: { GameTextForPlayer("~n~~b~-~r~ 2 ~b~-", 1100, 3); }
case 1: { GameTextForPlayer("~n~~b~-~r~ 1 ~b~-", 1100, 3); }
case 0:
{
GameTextForAll("~g~ Roubado com sucesso~w~!", 2000, 3);
KillTimer(CountdownTimer);
IsCountdownStarted = false;
}
}
Count--;
}
Sei assim... '-'