SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Filterscripts

Reply
 
Thread Tools Display Modes
Old 09/02/2016, 07:40 PM   #11
K0P
Banned
 
Join Date: Nov 2015
Location: *.*.*.*
Posts: 599
Reputation: 87
Default Re: Dynamic Military Landmines System

Good Job
K0P is offline   Reply With Quote
Old 09/02/2016, 09:03 PM   #12
FreAkeD
Gangsta
 
FreAkeD's Avatar
 
Join Date: May 2012
Location: Australia
Posts: 630
Reputation: 87
Default Re: Dynamic Military Landmines System

Nice. This looks interesting, going to try this out.
FreAkeD is offline   Reply With Quote
Old 10/02/2016, 01:20 AM   #13
Pottus
High-roller
 
Pottus's Avatar
 
Join Date: Jun 2012
Posts: 4,832
Reputation: 1292
Default Re: Dynamic Military Landmines System

You forgot one thing here....

Code:
public DestroyDynamicMine(mineid){
	if(mineid < 0 || mineid >= MAX_MINES) return 0;
	DestroyDynamicObject(MineComponent[mineid][mine_objectid]);
	DestroyDynamicArea(MineComponent[mineid][mine_areaid]);
No verification of the mine actually exists but still running deletion functions on arbitrary reference id's is never good
Pottus is offline   Reply With Quote
Old 10/02/2016, 12:57 PM   #14
AbyssMorgan
High-roller
 
AbyssMorgan's Avatar
 
Join Date: Apr 2015
Location: Poland
Posts: 1,212
Reputation: 351
Default Re: Dynamic Military Landmines System

Quote:
Originally Posted by Pottus View Post
You forgot one thing here....

Code:
public DestroyDynamicMine(mineid){
	if(mineid < 0 || mineid >= MAX_MINES) return 0;
	DestroyDynamicObject(MineComponent[mineid][mine_objectid]);
	DestroyDynamicArea(MineComponent[mineid][mine_areaid]);
No verification of the mine actually exists but still running deletion functions on arbitrary reference id's is never good
True, I forgot.
I corrected.
AbyssMorgan is offline   Reply With Quote
Old 10/02/2016, 07:36 PM   #15
AbyssMorgan
High-roller
 
AbyssMorgan's Avatar
 
Join Date: Apr 2015
Location: Poland
Posts: 1,212
Reputation: 351
Default Re: Dynamic Military Landmines System

added a new parameter 'mine_object'

Values:
PHP Code:
MINE_OBJECT_STANDARD //default
MINE_OBJECT_UNDERWATER
MINE_OBJECT_LASER
MINE_OBJECT_PIZZA 
//what ? xD 
AbyssMorgan is offline   Reply With Quote
Old 16/06/2016, 05:51 PM   #16
AbyssMorgan
High-roller
 
AbyssMorgan's Avatar
 
Join Date: Apr 2015
Location: Poland
Posts: 1,212
Reputation: 351
Default Re: Dynamic Military Landmines System

Update 1.6:
Added additional parameters:

Code:
CreateDynamicMine(type,Float:detection_range,Float:explode_radius,Float:health,respawntime,
Float:x,Float:y,Float:z,worldid,interiorid,playerid,Float:streamdistance,
mine_object=MINE_OBJECT_STANDARD,teamid=ANY_TEAM); 

teamid - player team will be immune to detection range or destroy mine
AbyssMorgan is offline   Reply With Quote
Old 17/06/2016, 04:04 AM   #17
samp_boy
Huge Clucker
 
samp_boy's Avatar
 
Join Date: Aug 2012
Location: Algeria
Posts: 360
Reputation: 13
Default Re: Dynamic Military Landmines System

you should make an command to plant them btw, good job +rep
__________________
New Community
New Sa-mp Zombie Server: Coming Soon (members/admins needed)
Forum: Coming Soon

Feel Free To Join Us
samp_boy is offline   Reply With Quote
Old 17/06/2016, 02:35 PM   #18
AbyssMorgan
High-roller
 
AbyssMorgan's Avatar
 
Join Date: Apr 2015
Location: Poland
Posts: 1,212
Reputation: 351
Default Re: Dynamic Military Landmines System

Quote:
Originally Posted by samp_boy View Post
you should make an command to plant them btw, good job +rep
Example command has been added in description
AbyssMorgan is offline   Reply With Quote
Old 18/06/2016, 08:05 PM   #19
AbyssMorgan
High-roller
 
AbyssMorgan's Avatar
 
Join Date: Apr 2015
Location: Poland
Posts: 1,212
Reputation: 351
Default Re: Dynamic Military Landmines System

Update v1.7:

Added callback:
PHP Code:
OnMineDestroy(mobid,Float:x,Float:y,Float:z,type,killerid); 
Fixed explosion in VW = -1, INT = -1
AbyssMorgan is offline   Reply With Quote
Old 19/06/2016, 09:35 PM   #20
AbyssMorgan
High-roller
 
AbyssMorgan's Avatar
 
Join Date: Apr 2015
Location: Poland
Posts: 1,212
Reputation: 351
Default Re: Dynamic Military Landmines System

Update v1.8:
- Increase Mine capacity from 300 to 2048
- Added function CreateDynamicMineEx
PHP Code:
CreateDynamicMineEx(objectid,type,Float:detection_range,Float:explode_radius,Float:health,respawntime,Float:x,Float:y,Float:z,Float:rx,Float:ry,Float:rz,worldid,interiorid,playerid,Float:streamdistance,teamid ANY_TEAM); 
- Added extended functions:
PHP Code:
Float:GetMineExplodeVisibility();
SetMineExplodeVisibility(Float:explode_stream); 
AbyssMorgan is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[FilterScript] Dynamic House System v0.5 (w/Dialog Builder System+Customizable) ABKPot Filterscripts 19 27/01/2015 06:56 PM
[FilterScript] Dynamic Box [Vip System/Help System/2 previous script all in dBox!] JaKe Elite Filterscripts 6 28/11/2014 05:48 AM
[FilterScript] DWS - Dynamic Weapon System (Gun object, Saving system,...More) JusstinRoller Filterscripts 15 31/07/2013 11:02 AM
[Map] [MAP] From The Creators Of Abandoned Military Base: Big Ear Military Camp NiiRV4N4 Maps 2 10/04/2010 07:06 PM


All times are GMT. The time now is 03:27 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.