19.07.2014, 08:37
Hey guys, I started with new command.. for now I have only start of /bomb command:
How can I make /triggerbomb command that will make explosion at car coordinates that bomb is planted on?
rep+
pawn Код:
if(strcmp(cmd, "/plantbomb", true) == 0 || strcmp(cmd, "/pb", true) == 0)
{
new Float:X, Float:Y, Float:Z, bool: in_range;
for(new a = 1; a < MAX_VEHICLES - 1; a++)
{
if (!GetVehiclePos(a, X, Y, Z)) continue; // vehicle does not exist
if (IsPlayerInRangeOfPoint(playerid, 4.0, X, Y, Z))
{
in_range = true;
break;
}
}
SendClientMessage(playerid, -1, (in_range) ? ("{FF6A22}INFO:{FFFFFF} Bomb planted!") : ("{FF6A22}INFO:{FFFFFF} No vehicles near you to plant bomb."));
return 1;
}
rep+