Vice City Multiplayer
VC:MP 0.3 => mIRC/pawn Scripting => ShowRoom (pawn) => Topic started by: sseebbyy on July 30, 2012, 12:34:17 am
-
Plant Bomb System
Work 120% ! I tested it .
[FilterScript] Plant Bomb System: Download (http://www.solidfiles.com/d/d413b36a96/download)
I made this for shaeel ahmed.
But you can take it ;)
Put this on your gm top:
new HaveBomb[MAX_PLAYERS];
new BombPlanted[MAX_VEHICLES];
OnPlayerDisconnect:
HaveBomb[playerid] = 0;
This on public OnPlayerEnterVehicle(playerid,vehicleid,ispassenger) :
if(BombPlanted[vehicleid] == 1) {
SendClientMessage(playerid,0xAA3333AA,"In this vehicle is a bomb planted ! You can't escape !");
SetVehicleHealth(vehicleid,0);
PutDirectlyInVehicle(playerid,vehicleid); // it keeps you in the car
BombPlanted[vehicleid] = 0;
}
Now, the commands :
else if(strcmp(cmd, "buybomb", true) == 0) {
new cash = GetPlayerMoney(playerid);
if(HaveBomb[playerid] == 1) {
SendClientMessage(playerid,0xAA3333AA,"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 that has cost you $ 3,000");
}
if(cash < 3000) {
SendClientMessage(playerid,0xAA3333AA,"You do not have enough money to buy a bomb, 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,"In this car is already planted a bomb !");
}
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;
}
Have Fun !
-
Nice work i used you filterscript jejeje but only one thing you create only one location to buy bomb? example 8 ball in astillero??
(http://www.game-state.eu/190.82.251.109:5192/FFFFFF/FF9900/560x95.png) (http://www.game-state.eu/190.82.251.109:5192/)
-
Nice work i used you filterscript jejeje but only one thing you create only one location to buy bomb? example 8 ball in astillero??
no, you can buy a bomb from where you want. :P
Is more like an Simple Plant Bomb System ;D
You can develop it.