Author Topic: Help me  (Read 2659 times)

0 Members and 1 Guest are viewing this topic.

Offline Zimmy

  • Street Thug
  • *
  • Posts: 13
    • View Profile
Help me
« on: July 29, 2012, 10:13:25 pm »
Guys i need PlantBomb system by sseebbyy For my Server i also Give credit to Sseebbyy and to who help me thanks

Offline kitt85711

  • Wiseguy
  • **
  • Posts: 72
    • View Profile
Re: Help me
« Reply #1 on: July 29, 2012, 11:43:43 pm »
Good thing I have everyone's script and releases :p nah I wish but here it is. FULL CREDITS TO MEH FOR SAVING THIS SHIT FOR THE END OF THE WORLD. Errm end of the forums jk.

On the top

[pawn]new HaveBomb[MAX_PLAYERS];
new BombPlanted[MAX_VEHICLES];[/pawn]

OnPlayerDisconnect

[pawn] HaveBomb[playerid] = 0;[/pawn]


OnPlayerEnterVehicle

[pawn]public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{

SetVehicleToRespawn(vehicleid);

if(BombPlanted[vehicleid] == 1) {
SendClientMessage(playerid,0xAA3333AA,"You planted a bomb in the car, now your stuck in the car!");
SetVehicleHealth(vehicleid,0);
PutDirectlyInVehicle(playerid,vehicleid); // it keeps you in the car
BombPlanted[vehicleid] = 0;

}
return 1;[/pawn]



Command


[pawn]}
    else if(strcmp(cmd, "!buybomb", true) == 0) {
      new cash = GetPlayerMoney(playerid);
      if(HaveBomb[playerid] == 1) {
          SendClientMessage(playerid,0xAA3333AA,"You Already Have A Bomb!");
          }
      if(HaveBomb[playerid] == 0) {
      if(cash >= 3000) {
          SetPlayerMoney(playerid,cash - 3000);
          HaveBomb[playerid] = 1;
          SendClientMessage(playerid,0xFFFFFFAA,"You bought a bomb, and was deducted $ 3,000");
          }
      if(cash < 3000) {
          SendClientMessage(playerid,0xAA3333AA,"You don't have the money for a bomb! You need $ 3,000");
          }
          }
      return 1;
      }
   else if(strcmp(cmd, "!plantbomb", true) == 0) {
       if(IsPlayerInAnyVehicle(playerid)) {
         new vehicleid = GetPlayerVehicleID(playerid);
           if(HaveBomb[playerid] == 1) {
               if(BombPlanted[vehicleid] == 1) {
                   SendClientMessage(playerid,0xAA3333AA,"This car has a bomb in it already!");
                }
            if(BombPlanted[vehicleid] == 0) {
            BombPlanted[vehicleid] = 1;
            RemovePlayerFromVehicle(playerid);
            HaveBomb[playerid] = 0;
            SendClientMessage(playerid,0xFFFFFFAA,"The bomb was planted successfully");
            SendClientMessage(playerid,0xFFFFFFAA,"The next player to enter the car as a driver will be stuck in the car and the bomb will be detonated!");
            }
            }
         else {
             SendClientMessage(playerid,0xAA3333AA,"You must first buy a bomb !");
             }
      }
      else {
          SendClientMessage(playerid,0xAA3333AA,"You need to be in a vehicle !");
         }
      return 1;
      }[/pawn]



Your Welcome



Offline Zimmy

  • Street Thug
  • *
  • Posts: 13
    • View Profile
Re: Help me
« Reply #2 on: July 30, 2012, 07:00:33 am »
Thanks