03.05.2012, 18:37
queria um negocio que quando digitar /roubar em um local de roubo, vai aparecer o tempo na tela diminuindo,atй o fim do roubo. Por exemplo: quando eu dou /roubar comeзa a aparecer o tempo que falta para terminar.
Obrigado.
Obrigado.
pawn Код:
if(ProvocoBanco[playerid] == 1)
{
//SendClientMessageToAll(COLOR_WHITE, "(=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=({FFD700}Assalto ao Banco{BFC0C2})=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=)");
format(gstring, sizeof(gstring), "%s e os %s nгo conseguiram roubar o cofre do Banco ! ID:[%d]", PlayerName(playerid), NomeORG(playerid) , playerid);
SendClientMessageToAll(GetPlayerColor(playerid), gstring);
ClearAnimations(playerid);
KillTimer(RoubarThiagoAnim);
ProvocoBanco[playerid] = 0; roubando[playerid] = 0; roubobanco = 0; KillTimer(tempobanco); temporoubobanco = 0;
}
pawn Код:
if(strcmp(cmd,"/roubar",true)==0)
{
if(PlayerInfo[playerid][pMembro] != 5 && PlayerInfo[playerid][pLider] != 5
&& PlayerInfo[playerid][pMembro] != 14 && PlayerInfo[playerid][pLider] != 14
&& PlayerInfo[playerid][pMembro] != 17 && PlayerInfo[playerid][pLider] != 17
&& PlayerInfo[playerid][pMembro] != 18 && PlayerInfo[playerid][pLider] != 18
&& PlayerInfo[playerid][pMembro] != 19 && PlayerInfo[playerid][pLider] != 19
&& PlayerInfo[playerid][pMembro] != 20 && PlayerInfo[playerid][pLider] != 20
&& PlayerInfo[playerid][pMembro] != 21 && PlayerInfo[playerid][pLider] != 21
&& PlayerInfo[playerid][pLider] != 24
&& GetPlayerOrg(playerid) != 6 && GetPlayerOrg(playerid) != 12
&& GetPlayerOrg(playerid) != 13 && GetPlayerOrg(playerid) != 15)
{
SendClientMessage(playerid,COLOR_GREY,"Vocк nгo pode assaltar !");
return true;
}
if(roubando[playerid] == 1)
{
SendClientMessage(playerid, COLOR_GRAD5, "Vocк ja estб roubando algum lugar.");
return true;
}
if(PlayerToPoint(2.0,playerid, 2144.4177,1641.5360,993.5761))
{
if(roubobanco == 1)
{
SendClientMessage(playerid, COLOR_GRAD5, "Jб estб tendo uma tentativa de roubo nesse cofre.");
return true;
}
if(temporoubobanco == 1)
{
SendClientMessage(playerid,COLOR_GREY,"Jб roubaram o cofre do banco espere 3 minutos para roubar de novo !");
return true;
}
GetPlayerName(playerid, playername, MAX_PLAYER_NAME);
//SendClientMessageToAll(COLOR_WHITE, "(=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=({FFD700}Assalto ao Banco{BFC0C2})=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=)");
format(string, sizeof(string), "%s e os %s estгo tentando roubar o cofre banco! ID:[%d]", playername, NomeORG(playerid) , playerid);
SendClientMessageToAll(GetPlayerColor(playerid), string);
SendClientMessage(playerid, COLOR_GRAD5, "Espere 40 segundos para terminar de roubar o banco.");
SetPlayerCriminal(playerid,255, "Tentativa de Roubo ao Banco");
CreateExplosion(2306.5127,-6.1166,26.7422, 12, 10.0); // Ira criar uma explosгo exatamente no lugar que o player digitou para roubar
roubando[playerid] = 1;
ProvocoBanco[playerid] = 1;
roubobanco = 1;
temporoubobanco = 1;
Controle(playerid, 0);
SetPlayerPos(playerid, 2144.3711,1641.4792,993.5761);
SetPlayerFacingAngle(playerid,1.2666);
SetTimer("Aroubo", 220000, 0);
RoubarThiagoAnim = SetTimerEx("AnimRouboBanco", 900, 0, "i", playerid);
tempobanco = SetTimerEx("RouboBanco", 40000, 0, "i", playerid);
SetPlayerAttachedObject(playerid, 0, 1550, 1, 0.000000, -0.313611, 0.021003, 0.445490, 86.754409, 355.370239, 0.926815, 1.000000, 1.000000);
SetTimerEx("AcabarMochila", 120000, 0, "i", playerid);
return true;
}