SA-MP Forums Archive
[FilterScript] Realistic Nuclear Bomb Script - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Filterscripts (https://sampforum.blast.hk/forumdisplay.php?fid=17)
+--- Thread: [FilterScript] Realistic Nuclear Bomb Script (/showthread.php?tid=260117)



Realistic Nuclear Bomb Script - blackwidow18 - 07.06.2011

Realistic Nuke Sript
Version 0.2.5
Players can do /makenuke at 1 of 4 locationsCurrent FeaturesPlanned Features Command List:
/makenuke - create a nuke at the spawn point. Takes 2 mins
/launchnuke - launches the nuke.
/nukea - Takes RCON admin to nuke location A
/nukeb - Takes RCON admin to nuke location B
/nukec - Takes RCON admin to nuke location C
/nuked - Takes RCON admin to nuke location D
/nonuke - RCON admin cancels current nuke

Screenshots:
Screen 1 - One of the nuke site
Screen 2 - another nuke site
Screen 3 - another nuke site
Screen 4 - Map of one site
Screen 5 - Fallout (realistically, can be called debris as fallout is not visible)

0.2 Updates: Additional Notes:
I run this on a dedicated box with 12gb of ram and 6core i5 proc, it doesn't lag out, however on my other dedi with 4gb ram and 3cores it will sometimes lag out the server, this is because it is constantly checking where players are, and if they are in a vehicle. I will update this script for better effectiveness.
====================

V. 0.1
Pastebin: http://pastebin.com/nYE9tZEW
V. 0.2
Pastebin: http://pastebin.com/0YmDXtXf
Mirror: DOWNLOAD
Mirror: DOWNLOAD
V. 0.2.5
Pastebin
Download (amx+pwn+foreach zip)
Foreach (samp thread)
Other:

This is my first public script; positive feedback welcome and encouraged.


Re: Realistic Nuclear Bomb Script - Markx - 07.06.2011

Good work bro! Ill give you 10/10 if your a beginner! If not, 8/10


Re: Realistic Nuclear Bomb Script - Phanto90 - 07.06.2011

Lacks of video or at least screenshot!
Nice post attract more user, and this is really too simple

However nice job.

I suggest you some part to correct:
Код:
                if(GetVehicleModel(vehicleid) == 523) // Open Top
                        {
            new Float:hp;
                GetPlayerHealth(i,hp);
                        SetPlayerHealth(i,(hp-3));
                        SetPlayerDrunkLevel (i, 5000);
                        fallouthp = SetTimer("Fallout",6000,false);
                }
You did this for a lot of vehicle, insert the same function. So simply do this:
Код:
                if(GetVehicleModel(vehicleid) == id || GetVehicleModel(vehicleid) == id2 || GetVehicleModel(vehicleid) == id3 ) // Open Top
                        {
            new Float:hp;
                GetPlayerHealth(i,hp);
                        SetPlayerHealth(i,(hp-3));
                        SetPlayerDrunkLevel (i, 5000);
                        fallouthp = SetTimer("Fallout",6000,false);
                }



Re: Realistic Nuclear Bomb Script - Meinstad - 07.06.2011

Looks good. Testing now


Re: Realistic Nuclear Bomb Script - XFlawless - 07.06.2011

Good job why not use foreach ?


Re: Realistic Nuclear Bomb Script - blackwidow18 - 07.06.2011

Quote:
Originally Posted by Phanto90
Посмотреть сообщение
Lacks of video or at least screenshot!
Nice post attract more user, and this is really too simple

However nice job
I suggest you some part to correct:
Код:
                if(GetVehicleModel(vehicleid) == 523) // Open Top
                        {
            new Float:hp;
                GetPlayerHealth(i,hp);
                        SetPlayerHealth(i,(hp-3));
                        SetPlayerDrunkLevel (i, 5000);
                        fallouthp = SetTimer("Fallout",6000,false);
                }
You did this for a lot of vehicle, insert the same function. So simply do this:
if(GetVehicleModel(vehicleid) == id || GetVehicleModel(vehicleid) == id2 || GetVehicleModel(vehicleid) == id3 ) // Open Top
{
new Float:hp;
GetPlayerHealth(i,hp);
SetPlayerHealth(i,(hp-3));
SetPlayerDrunkLevel (i, 5000);
fallouthp = SetTimer("Fallout",6000,false);
}
Thanks, I will make that note for when I address the other issues.
I will record a video place a screen shot shortly when I get home later on.


Thanks for the feedback.


Re: Realistic Nuclear Bomb Script - gamer931215 - 07.06.2011

pawn Код:
C:\Users\Jonathan\Desktop\stuff\SAMP SERVER\filterscripts\test.pwn(71) : warning 213: tag mismatch
C:\Users\Jonathan\Desktop\stuff\SAMP SERVER\filterscripts\test.pwn(345) : warning 213: tag mismatch
C:\Users\Jonathan\Desktop\stuff\SAMP SERVER\filterscripts\test.pwn(355) : warning 213: tag mismatch
C:\Users\Jonathan\Desktop\stuff\SAMP SERVER\filterscripts\test.pwn(364) : warning 213: tag mismatch
C:\Users\Jonathan\Desktop\stuff\SAMP SERVER\filterscripts\test.pwn(373) : warning 213: tag mismatch
C:\Users\Jonathan\Desktop\stuff\SAMP SERVER\filterscripts\test.pwn(384) : warning 203: symbol is never used: "Engine"
Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


6 Warnings.
Tip:
-Remove engine[MAX_VEHICLES] (i can see you ripped this script out of a gamemode i guess ?)
-If you are using true/false, use a bool like this
pawn Код:
new bool:nuke = false;
new bool:nukea = false;
new bool:nukeb = false;
new bool:nukec = false;
new bool:nuked = false;
,


also i think if someone would create a nuke, everyone can actually launch it!
it doesnt create the author of the nuke.


Re: Realistic Nuclear Bomb Script - blackwidow18 - 07.06.2011

Kinda; I made this into an older gamemode script. When i started working on my own i remove this script out of the old gamemode into this filterscript.

The engine part i forgot about that. That was a feature i was working on, where after so much time a vehicle engine is turned on and exposed to fallout it causes the vehicle to stall.


Thank you for the Tip!


Re: Realistic Nuclear Bomb Script - gamer931215 - 07.06.2011

However the effect is pretty nice, good choise of weatherid and drunkcam!

Screenshot for the people who are interested :



Re : Re: Realistic Nuclear Bomb Script - Naruto_Emilio - 09.06.2011

Quote:
Originally Posted by gamer931215
Посмотреть сообщение
However the effect is pretty nice, good choise of weatherid and drunkcam!

Screenshot for the people who are interested :
You got an awesome FPS