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;
}
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;
}
forward Um();
forward Dois();
forward Tres();
... Todos atй o tempo de roubo total
public Um()
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
GameTextForPlayer(i, "~r~1",2000,3);
}
return 1;
}
public Dois()
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
GameTextForPlayer(i, "~r~2",2000,3);
}
return 1;
}
public Tres()
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
GameTextForPlayer(i, "~r~3",2000,3);
}
return 1;
}
... Todos atй o tempo de roubo total
SetTimer("Um", 1000, 0);
SetTimer("dois", 2000, 0);
SetTimer("Tres", 3000, 0);
... Todos atй o tempo de roubo total
Muito Obrigado!
A muito tempo que procuro por isto! Felipe_Freeze Sabes me dizer como colocar sу para o Jogador que esta a roubar? |
o unico modo que sei й vc ter q criar assim :
Inicio do GM: pawn Код:
pawn Код:
pawn Код:
|
forward CountTime(playerid);
public CountTime(playerid){
new time = 3,_string[18],_time;
if(time == 0)
GameTextForPlayer(playerid,"0!",3000,1),time = 3,KillTimer(_time);
else {
format(_string, sizeof(_string), "%d", time);
GameTextForPlayer(playerid, _string, 3000, 1);
}
return _time = SetTimerEx("CountTime",1000,1,"d",playerid);
}
SetTimerEx("CountTime",1000,0,"d",playerid);
Simples.
Topo do GM pawn Код:
pawn Код:
pawn Код:
|
o unico modo que sei й vc ter q criar assim :
Inicio do GM: pawn Код:
pawn Код:
pawn Код:
|