if (strcmp(cmdtext, "/bomba", true)==0)
{
for(new i = 0; i < MAX_PLAYERS; i++)
if(PlayerInfo[i][pMember] == 22 || PlayerInfo[i][pMember] == 28)
{
if(BombArmed[i] == false)
{
new string[256];
GetPlayerPos(playerid, BombX[i], BombY[i], BombZ[i]);
GetXYInFrontOfPlayer(i, BombX[i], BombY[i], 0.7);
SendClientMessage(i, 0x0066FFAA, "Bomba Plantada (explodirб em 3 Minutos).");
ApplyAnimation(i, "BOMBER", "BOM_Plant", 4.0, 0, 0, 0, 0, 0);
BombObject[i] = CreateObject(1252, BombX[i], BombY[i], BombZ[i] - 0.8,270,0,0);
bombtimer2[i] = SetTimerEx("BombTimer2",180000,0, "d", playerid);
BombArmed = true;
format(string, 256, "{FF4747}[Notнcia Criminal]{FFFFFF} Uma bomba foi armada por {FF4747}Alguйm{FFFFFF} nas proximidades de %s. ", ReturnPlayerZone(playerid));
BroadCast(COLOR_OOC,string);
SetPlayerCriminal(playerid,255, "Atentado Terrorista");//Pra da nivel de procurado
WantedPoints[playerid] += 6;
}
else
{
SendClientMessage(playerid, 0xCC0000AA, "Vocк sу pode colocar uma bomba de cada vez!");
}
}
return 1;
}
if (strcmp(cmdtext, "/localizarbomba", true)==0)
{
for(new i = 0; i < MAX_PLAYERS; i++)
if(PlayerInfo[playerid][pMember] == 21 || PlayerInfo[playerid][pMember] == 32)
{
if(BombArmed[i] == true)
{
SetPlayerCheckpoint(playerid, BombX[i], BombY[i], BombZ[i], 10);
SendClientMessage(playerid, COLOR_YELLOW, "Bomba Localizada !");
TogglePlayerControllable(playerid, 1);
GPSPos[playerid] = 1;
}
else
{
SendClientMessage(playerid, 0xAFAFAFAA, "Nao tem nenhuma bomba Armada.");
}
return 1;
}
}
Ve se aqui ajuda vc
https://sampforum.blast.hk/showthread.php?tid=320191 |