14
« 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