[FilterScript] Dynamic Military Landmines System
#36

Update v2.0.0:

- Remove ATM.inc, replace with 3DTryg.inc (better compatibility)
- Update functions:
Код:
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,detect_type = MINE_DETECT_TYPE_ALL,byplayerid = INVALID_PLAYER_ID);
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,detect_type = MINE_DETECT_TYPE_ALL,byplayerid = INVALID_PLAYER_ID);
OnMineDestroy(mobid,Float:x,Float:y,Float:z,type,killerid,Float:radius,damagerid);
- Removed callback:
PHP код:
OnMineDetectPlayer(playerid,mobid); //how to detect now ? look down 
- New player detection method:
PHP код:
#define MINE_DAMAGE_PLAYER        80.0
#define MINE_DAMAGE_VEHICLE        1000.0
public OnMineDestroy(mobid,Float:x,Float:y,Float:z,type,killerid,Float:radius,damagerid){
    
    new 
Float:plx,Float:ply,Float:plz;
    
Tryg3DForeach(i){
        
GetPlayerPos(i,plx,ply,plz);
        if(
GetDistanceBetweenPoints3D(x,y,z,plx,ply,plz) <= radius){
            if(
IsPlayerInAnyVehicle(killerid)){
                new 
Float:hpvid GetPlayerVehicleID(killerid);
                
GetVehicleHealth(vid,hp);
                
SetVehicleHealth(vid,hp-MINE_DAMAGE_VEHICLE);
            } else {
                new 
Float:hp,Float:ar;
                
GetPlayerHealth(killerid,hp);
                
GetPlayerArmour(killerid,ar);
                
SetPlayerHealth(killerid,hp);
                
SetPlayerArmour(killerid,ar);
            
                
Tryg3D_GivePlayerDamage(killerid,MINE_DAMAGE_PLAYER,damagerid,51,true);
            }
        }
    }
    
    return 
1;

Reply


Messages In This Thread
Dynamic Military Landmines System - by AbyssMorgan - 07.02.2016, 09:56
Re: Dynamic Military Landmines System - by AbyssMorgan - 09.02.2016, 13:39
Re: Dynamic Military Landmines System - by Alf21 - 09.02.2016, 14:13
Re: Dynamic Military Landmines System - by SystemX - 09.02.2016, 14:17
Re: Dynamic Military Landmines System - by Crystallize - 09.02.2016, 14:28
Re: Dynamic Military Landmines System - by DEATHSTROKE - 09.02.2016, 16:04
Re: Dynamic Military Landmines System - by valych - 09.02.2016, 16:12
Re: Dynamic Military Landmines System - by AbyssMorgan - 09.02.2016, 16:16
Re: Dynamic Military Landmines System - by Ritzy2K - 09.02.2016, 16:28
Re: Dynamic Military Landmines System - by AbyssMorgan - 09.02.2016, 18:25
Re: Dynamic Military Landmines System - by K0P - 09.02.2016, 18:40
Re: Dynamic Military Landmines System - by FreAkeD - 09.02.2016, 20:03
Re: Dynamic Military Landmines System - by Pottus - 10.02.2016, 00:20
Re: Dynamic Military Landmines System - by AbyssMorgan - 10.02.2016, 11:57
Re: Dynamic Military Landmines System - by AbyssMorgan - 10.02.2016, 18:36
Re: Dynamic Military Landmines System - by AbyssMorgan - 16.06.2016, 16:51
Re: Dynamic Military Landmines System - by samp_boy - 17.06.2016, 03:04
Re: Dynamic Military Landmines System - by AbyssMorgan - 17.06.2016, 13:35
Re: Dynamic Military Landmines System - by AbyssMorgan - 18.06.2016, 19:05
Re: Dynamic Military Landmines System - by AbyssMorgan - 19.06.2016, 20:35
Re: Dynamic Military Landmines System - by Xdrime - 20.06.2016, 13:44
Re: Dynamic Military Landmines System - by AbyssMorgan - 23.06.2016, 12:02
Re: Dynamic Military Landmines System - by AbyssMorgan - 06.07.2016, 18:04
Re: Dynamic Military Landmines System - by Recko - 06.07.2016, 18:44
Re: Dynamic Military Landmines System - by AbyssMorgan - 06.07.2016, 18:52
Re: Dynamic Military Landmines System - by Recko - 06.07.2016, 19:00
Re: Dynamic Military Landmines System - by AbyssMorgan - 06.07.2016, 19:05
Re: Dynamic Military Landmines System - by Recko - 06.07.2016, 19:06
Re: Dynamic Military Landmines System - by AbyssMorgan - 06.07.2016, 19:11
Re: Dynamic Military Landmines System - by Recko - 06.07.2016, 19:16
Re: Dynamic Military Landmines System - by Recko - 06.07.2016, 19:22
Re: Dynamic Military Landmines System - by AbyssMorgan - 06.07.2016, 19:25
Re: Dynamic Military Landmines System - by Recko - 06.07.2016, 19:28
Re: Dynamic Military Landmines System - by AbyssMorgan - 06.07.2016, 19:31
Re: Dynamic Military Landmines System - by quochuy - 07.07.2016, 18:16
Re: Dynamic Military Landmines System - by AbyssMorgan - 31.08.2016, 19:53
Re: Dynamic Military Landmines System - by Crayder - 31.08.2016, 20:06
Re: Dynamic Military Landmines System - by SickAttack - 31.08.2016, 20:10
Re: Dynamic Military Landmines System - by Crayder - 31.08.2016, 22:15
Re: Dynamic Military Landmines System - by Zorono - 01.09.2016, 00:28
Re: Dynamic Military Landmines System - by AbyssMorgan - 02.09.2016, 18:43
Re: Dynamic Military Landmines System - by Crayder - 02.09.2016, 19:02
Re: Dynamic Military Landmines System - by AbyssMorgan - 21.08.2017, 16:06

Forum Jump:


Users browsing this thread: 24 Guest(s)