Advertisement
Guest User

Sistema De Bomba

a guest
May 3rd, 2011
499
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 2.14 KB | None | 0 0
  1. //=====================No Topo=======================
  2. forward tempopbomba();
  3. forward tempoexpbomba();
  4. new plantando[MAX_PLAYERS];
  5. new alguemplantando;
  6. new Float: BX[MAX_PLAYERS], Float: BY[MAX_PLAYERS], Float: BZ[MAX_PLAYERS];
  7. new Bomba;
  8. //=====================Em Algum Lugar do OnPlayerCommandText====================//
  9.     if(strcmp(cmd, "/plantarbomba", true) == 0)
  10.     {
  11.         if(PlayerInfo[playerid][pJailed] != 0)
  12.         {
  13.            SendClientMessage(playerid,COLOR_GREY," Você não pode plantar bomba na cadeia!");
  14.            return 1;
  15.         }
  16.         if(alguemplantando != 0)
  17.         {
  18.            SendClientMessage(playerid,COLOR_GREY," Ja Tem Alguem Plantando...!");
  19.            return 1;
  20.         }
  21.         if(plantando[playerid] != 0)
  22.         {
  23.            SendClientMessage(playerid,COLOR_GREY," Você Ja Esta Plantando Uma Bomba..!");
  24.            return 1;
  25.         }
  26.         if(PlayerInfo[playerid][pMember] != 6 && PlayerInfo[playerid][pLeader] != 6 && PlayerInfo[playerid][pMember] != 16 && PlayerInfo[playerid][pLeader] != 16)//No Thug use pMembro e pLider
  27.         {
  28.             SendClientMessage(playerid, COLOR_GREY, "Você Não é De Alguma Rede Terrorista");
  29.             return 1;
  30.         }
  31.         GetPlayerName(playerid, Nomezin, sizeof(Nomezin));
  32.         if(IsPlayerConnected(playerid))
  33.         {
  34.             GetPlayerPos(playerid, BX[playerid], BY[playerid], BZ[playerid]);
  35.             format(string, sizeof(string), "%s e os Terroristas Estão Plantando Uma Bomba", Nomezin);
  36.             SendClientMessageToAll(GetPlayerColor(playerid),string,1);
  37.             SetTimerEx("tempopbomba", 60000, false, "i", playerid);
  38.             Bomba = CreateObject(1252,BX[playerid], BY[playerid], BZ[playerid] - 0.8,270,0,0)
  39.             alguemplantando = 1;
  40.             plantando[playerid] = 1;
  41.         }
  42.         return 1;
  43.     }
  44. //=====================No Fim====================
  45. public TempopBomba();
  46. {
  47.     SendClientMessage(playerid,COR,"Você plantou a Bomba Agora Corre");
  48.     SetTimerEx("tempoexpbomba", 10000, false, "i", playerid);
  49.     alguemplantando = 0;
  50.     plantando[playerid] = 0;
  51.     return;
  52. }
  53. public Tempoexpbomba();
  54. {
  55.     SendClientMessageToAll(GetPlayerColor(playerid),"A Bomba Explodiu e Ninguem Consegiu Detela!");
  56.     CreateExplosion(BX[playerid], BY[playerid], BZ[playerid], 7, 25);
  57.     DestroyObject(Bomba);
  58.     return 1;
  59. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement