14.02.2014, 22:51
pawn Код:
forward Rouboloja1(playerid);
public Rouboloja1(playerid)
{
KillTimer(tempoloja1);
if(!PlayerToPoint(8.0,playerid,303.9914,-169.0223,999.5938))
{
format(gstring, sizeof(gstring), "%s e os %s nгo conseguiram roubar o cofre da Loja de armas 1! ID:[%d]", PlayerName(playerid), NomeORG(playerid), playerid);
SendClientMessageToAll(GetPlayerColor(playerid), gstring);
SendClientMessage(playerid, COLOR_GREY, "Vocк nгo estб no cofre da Loja de armas 1.");
ProvocoLoja1[playerid] = 0; roubando[playerid] = 0; rouboloja1 = 0; KillTimer(tempoloja1); temporouboloja1 = 0;
return 1;
}
ForPlayers(i)
{
new grana = 1000 + random(6000);
if(PlayerToPoint(5.0,i,303.9914,-169.0223,999.5938))
{
new var032=0;
if (PlayerInfo[playerid][pLider] != 0) { var032 = PlayerInfo[playerid][pLider]; }
else if (PlayerInfo[playerid][pMembro] != 0) { var032 = PlayerInfo[playerid][pMembro]; }
if(ProvocoLoja1[playerid] == 1)
{
format(gstring, sizeof(gstring), "%s e os %s conseguiram roubar o cofre da Loja de armas 1 ! ID:[%d]", PlayerName(playerid), NomeORG(playerid), playerid);
SendClientMessageToAll(GetPlayerColor(playerid), gstring);
roubando[playerid] = 0; rouboloja1 = 0; ProvocoLoja1[playerid] = 0;
}
if (PlayerInfo[i][pLider] == var032 || PlayerInfo[i][pMembro] == var032)
{
SetPlayerCriminal(i,255, "Assalto a Loja de armas 1");
GivePlayerMoney(i, grana);
format(gstring, sizeof(gstring), "Vocк e os %s roubaram $%d do cofre da Loja de armas 1!",NomeORG(playerid), grana);
SendClientMessage(i, COLOR_YELLOW, gstring);
}
}
}
return 1;
}