Bomb - seeks player continously with a nuclear bomb explosion sound! -
RajatPawar - 23.02.2013
Hey! This is a simple FS.
/pdropbomb (playerid/name) to drop the bomb on a player. Only for admins.
Players are warned when the bomb is dropped (No use, it seeks the player continously, updating the player pos with a timer of 500 ms.)
It drops and there's a huge explosion around! Also, there's a sound that plays! Almost perfectly synced - depends on the player's connection. I personally like the sound, haha! Also, the object that is dropped can be redefined.
Change this object to whatever you want the 'bomb' to be. Currently, it's a ball like thing.
Here's a video about it:
[ame]www.youtube.com/watch?v=4N4bxq2c4qE[/ame]
Credits:
Zeex - zcmd.
****** - sscanf.
Sa cam hack.
Thanks!
pawn Code:
#define FILTERSCRIPT
#include <a_samp>
#include <zcmd>
#include <sscanf2>
#define OBJECT 14566
new missile;
new bool:ismon = false;
new Float: Pos[3];
CMD:pdropbomb(playerid, params[])
{
new target;
if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, -1, "SERVER: Unknown command.");
if(sscanf(params, "u", target)) return SendClientMessage(playerid, -1, "USAGE: /pdropbomb (playerid/name)");
if(target == INVALID_PLAYER_ID) return SendClientMessage(playerid, -1, "Player not connected.");
else
{
GetPlayerPos(target, Pos[0], Pos[1], Pos[2]);
missile = CreateObject(OBJECT, Pos[0], Pos[1]+2, Pos[2]+200, 0, 0, 1000, 1000);
SetTimerEx("move", 100, 1, "d", target);
SetObjectRot(missile, 0, 0, 1000);
SendClientMessage(playerid, -1, "Done!");
GameTextForAll("There is a missile headed~n~one of you's way. ~r~Beware.", 5000, 5);
SetTimerEx("explode", 100, 1, "d", playerid);
SetTimerEx("play",1000, 0, "d", playerid);
ismon = true;
}
return 1;
}
forward public play(playerid);
public play(playerid)
{
PlayAudioStreamForPlayer(playerid, "http://macros.featurecam.com/bomb.wav", 0.0, 0.0, 0.0, 50.0, 0);
return 1;
}
forward public move(target);
public move(target)
{
GetPlayerPos(target, Pos[0], Pos[1], Pos[2]);
MoveObject(missile,Pos[0], Pos[1], Pos[2], 30, 0, 0, 1000);
return 1;
}
forward public explode(playerid);
public explode(playerid)
{
if(ismon == true)
{
new Float: oX, Float: oY, Float: oZ;
GetObjectPos(missile, oX, oY, oZ);
if(Pos[2] == oZ )
{
DestroyObject(missile);
SendClientMessage(playerid, -1, "BOOM!");
for(new i; i<50; i++)
{
CreateExplosion(oX+i, oY+i, oZ, 6, 100);
ismon = false;
}
}
}
return 1;
}
Re: Bomb - seeks player continously with a nuclear bomb explosion sound! -
Gamer_007 - 23.02.2013
Nice Brother.Rep for you
Re: Bomb - seeks player continously with a nuclear bomb explosion sound! -
RajatPawar - 24.02.2013
Thanks! Is there any update anyone will like to make this a bit more 'appealing'?
Re: Bomb - seeks player continously with a nuclear bomb explosion sound! -
XtremeR - 24.02.2013
wola great work! keep it up! and i think it would be great if u used the missile object .
Re: Bomb - seeks player continously with a nuclear bomb explosion sound! -
RajatPawar - 24.02.2013
Hey, thanks, but is there any way you could tell me the ID of the missile object? I tried searching, but to no use.
Re: Bomb - seeks player continously with a nuclear bomb explosion sound! -
Arnold_Collins - 24.02.2013
Good job it's really good !! But why dont you use missle , it might be better..
Re: Bomb - seeks player continously with a nuclear bomb explosion sound! -
RajatPawar - 24.02.2013
Quote:
Originally Posted by Rajat_Pawar
Hey, thanks, but is there any way you could tell me the ID of the missile object? I tried searching, but to no use.
|
I ******d, only found missile launchers and rocket launchers.
Re: Bomb - seeks player continously with a nuclear bomb explosion sound! -
Katashi - 24.02.2013
Very nice, keep up the good work.