Attach bomb in car
#1

- How can i attach a bomb in car?
- Also, It should show me car passenger the car i attached a bomb by using /bombinfo?

Hope, you guyz will help me. Thank you!
Reply
#2

This is a basic system, you can upgrade this for your use.

PHP код:
new bool:HaveBomb//Create a BOOL Variable to store the valor: "Have a bomb and don't have a bomb"
//I'm using ZCMD because is fast, but you can use anyone command processor.
CMD:attachbomb(playerid) {
    if(!
IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playeridYOURCOLOR"You don't are in a vehicle."); //Verification if the player is not in a vehicle.
    
HaveBomb true//Variable is setted to true. Like: "this car have a bomb."
    
SendClientMessage(playerid,  YOURCOLOR"Bomb attached!");
    return 
1;
}
CMD:detonatebomb(playerid) {
    if(
HaveBomb == false) return SendClientMessage(playeridYOURCOLOR"Don't have a bomb attached in this vehicle."); //Verification if this car don't have a attached bomb.
    
new Float:vehxFloat:vehyFloat:vehz//Create 3 float variables to store the coordinates of the car.
    
GetVehiclePos(currentvehvehxvehyvehz); //Catch the coordinates of the car.
    
CreateExplosion(vehxvehyvehz012.0); //Create a large explosion. (Similar to a Car explosion)
    
return 1
}
CMD:bombinfo(playerid) {
   if(!
IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playeridYOURCOLOR"You don't are in a vehicle.");
   if(
HaveBomb == true) return SendClientMessage(playeridYOURCOLOR"Have a bomb attached in this vehicle! Rest in peace.");
   if(
HaveBomb == false) return SendClientMessage(playeridYOURCOLOR"Don't have a bomb attached in this vehicle! ");
   return 
1

Reply
#3

Thanks but I didn't check codes yet Cuz I'm on mobile. But I want bombinfo like I attached a bomb in a car and then I got out and then someone else with 2 friends get in my bomb car so when I type /bombinfo so it should show me these players are under bomb . Did u get me bro?
Reply
#4

Here you go, this is my FS that should fit your desires
https://sampforum.blast.hk/showthread.php?tid=568160
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)