Welcome, Guest
You have to register before you can post on our site.

Username
  

Password
  





Search Forums



(Advanced Search)

Forum Statistics
» Members: 7,660
» Latest member: rodeon
» Forum threads: 2,347
» Forum posts: 12,288

Full Statistics

Online Users
There are currently 359 online users.
» 2 Member(s) | 353 Guest(s)
Bing, Yandex, Google, Baidu, Lions66, milantumbas8

Latest Threads
How to Complete “Keeping ...
Forum: Questions and Suggestions
Last Post: rodeon
Yesterday, 07:26 AM
» Replies: 0
» Views: 24
Ultimate Roleplay!!
Forum: Advertisements
Last Post: URP_Wrzosek
2025-11-03, 09:43 AM
» Replies: 2
» Views: 85
samp openmp scripts
Forum: German/Deutsch
Last Post: pauli
2025-11-01, 01:21 AM
» Replies: 0
» Views: 69
YGG-Reborn
Forum: Advertisements
Last Post: Mw10
2025-10-31, 08:12 AM
» Replies: 0
» Views: 71
[GameMode] Brasil Vida Id...
Forum: Portuguese/Portugu?s
Last Post: Brasil Vida Ideal
2025-10-31, 01:12 AM
» Replies: 0
» Views: 66
Grand Gang War (GGW)
Forum: Advertisements
Last Post: coladaciren
2025-10-30, 10:00 AM
» Replies: 0
» Views: 62
undefined symbol
Forum: Portuguese/Portugu?s
Last Post: leobradoks
2025-10-25, 08:58 PM
» Replies: 1
» Views: 1,632
SA:MP Custom Character Li...
Forum: General Discussions
Last Post: Dilshad
2025-10-22, 04:15 PM
» Replies: 0
» Views: 118
Anyone got old rp scripts...
Forum: General Discussions
Last Post: Bilal
2025-10-21, 01:02 PM
» Replies: 5
» Views: 5,367
Anyone has the SARP Gamem...
Forum: Gamemodes
Last Post: Bilal
2025-10-21, 12:59 PM
» Replies: 0
» Views: 186

 
  Faction Missions
Posted by: AbyssMorgan - 2021-04-18, 01:23 PM - Forum: Filterscripts - Replies (1)

Hello, I would like to present you the Faction Mini Missions.



Video:

https://www.youtube.com/watch?v=uMpS2SaWmB0



Example Code:

Code:
#include <Streamer>

#include <colandreas>

#include <route_rand>

#include <3DTryg>

#include <Missions>



public OnPlayerEnterPatrol(playerid,mobid){

if(GetPlayerTeam(playerid) == TEAM_POLICEMAN) return 1; //policeman clear unsafe zone

return 0; //player get robbed

}



public OnPlayerDestroyPatrol(playerid,mobid){

//give mission prize

GivePlayerMoney(playerid,100);

return 1;

}



public OnPlayerRobbed(playerid,mobid,mission_state){

switch(mission_state){

case MISSIONS_STATE_FAIL_ROBBERY: {

SendClientMessage(playerid,0xFFFFFFFF,"The thief stumbled and you managed to escape :)");

}

case MISSIONS_STATE_ROBBED: {

SendClientMessage(playerid,0xFFFFFFFF,"You lose $100 by robbers");

GivePlayerMoney(playerid,-100);

}

}

return 1;

}



public OnPlayerFoundCorpse(playerid,mobid){

if(GetPlayerTeam(playerid) == TEAM_MEDIC) return 1;

return 0; //player able hit corpse (if in vehicle)

}



public OnPlayerHitCorpse(playerid,mobid){

SendClientMessage(playerid,0xFFFFFFFF,"You hit corpse by vehicle, you got mandate $100");

GivePlayerMoney(playerid,-100);

return 1;

}



public OnPlayerHealCorpse(playerid,mobid){

if(GetPlayerTeam(playerid) == TEAM_MEDIC){

SendClientMessage(playerid,0xFFFFFFFF,"You healed the corpse");

return 1;

}

return 0;

}



public OnPlayerFoundScrap(playerid,mobid){

if(GetPlayerTeam(playerid) == TEAM_METAL_SCRAPPER) return 1; //player able to pickup Scrap (Only for vehicle 578)

return 0;

}



public OnPlayerTakeScrap(playerid,mobid,mission_state,count_items){

switch(mission_state){

case MISSIONS_SCRAP_FULL: {

SendClientMessage(playerid,0xFFFFFFFF,"Your vehicle cargo is full");

}

case MISSIONS_SCRAP_LOADED: {

SendClientMessage(playerid,0xFFFFFFFF,"You picked up scrap metal");

}

}

return 1;

}



public OnPlayerExceededSpeed(playerid,mobid,Float:speed,Float:max_speed){

new buffer[256];

format(buffer,sizeof(buffer),"You exceeded the maximum speed %.1f mph you were driving %.1f mph",max_speed,speed);

SendClientMessage(playerid,0xFFFFFFFF,buffer);

//mandate or something :D

return 1;

}



public OnPlayerPutOutFire(playerid,mobid){

SendClientMessage(playerid,0xFFFFFFFF,"You put out fire");

return 1;

}



public OnPlayerVehicleDamagedByRoad(playerid,mobid,old_health,new_health,veh_damage){



return 1;

}



public OnPlayerDestroyedTreeOnRoad(playerid,mobid){

SendClientMessage(playerid,0xFFFFFFFF,"You destroyed tree on road");

return 1;

}



public OnPlayerUnloadingScrap(playerid,count_items){

if(Item::InCircle(playerid,item_player,0.0,0.0,10.0)){

SendClientMessage(playerid,0xFFFFFFFF,"You unloading scrap");

return 1;

}

return 0;

}



public OnPlayerTryDisarmBomb(playerid,mobid){

if(GetPlayerTeam(playerid) == TEAM_ARMY) return 1;

return 0;

}



public OnPlayerDisarmBomb(playerid,mobid,mission_state){

switch(mission_state){

case MISSIONS_BOMB_DISARM_FAIL: {

SendClientMessage(playerid,0xFFFFFFFF,"Failed to disarm bomb !!!");

}

case MISSIONS_BOMB_DISARM_SUCCESS: {

SendClientMessage(playerid,0xFFFFFFFF,"Bomb disarmed");

}

case MISSIONS_BOMB_DISARM_TOO_LATE: {

SendClientMessage(playerid,0xFFFFFFFF,"Is too late to disarm bomb !!!");

}

}

return 1;

}



public OnPlayerFixedRoad(playerid,mobid){

SendClientMessage(playerid,0xFFFFFFFF,"Road fixed");

return 1;

}



public OnGameModeInit(){



Missions::SetMissionsScrapKey(KEY_YES);

Missions::SetMissionsCorpseKey(KEY_YES);

Missions::SetMissionsBombKey(KEY_YES);



Missions::Enable(MISSIONS_TYPE_BOMB);

Missions::Enable(MISSIONS_TYPE_WOOD);

Missions::Enable(MISSIONS_TYPE_SCRAP);

Missions::Enable(MISSIONS_TYPE_CORPSE);

Missions::Enable(MISSIONS_TYPE_DMGROUTE);

Missions::Enable(MISSIONS_TYPE_FIRE);

Missions::Enable(MISSIONS_TYPE_PATROL);



Missions::SetSpawnRectangle(MISSIONS_TYPE_BOMB,-3000.0,-3000.0,3000.0,3000.0);

Missions::SetSpawnRectangle(MISSIONS_TYPE_CORPSE,-3000.0,-3000.0,3000.0,3000.0);

Missions::SetSpawnRectangle(MISSIONS_TYPE_FIRE,-3000.0,-3000.0,3000.0,3000.0);

Missions::SetSpawnRectangle(MISSIONS_TYPE_WOOD,-3000.0,-3000.0,3000.0,3000.0);

Missions::SetSpawnRectangle(MISSIONS_TYPE_SCRAP,-3000.0,-3000.0,3000.0,3000.0);

Missions::SetSpawnRectangle(MISSIONS_TYPE_DMGROUTE,-3000.0,-3000.0,3000.0,3000.0);

Missions::SetSpawnRectangle(MISSIONS_TYPE_PATROL,-3000.0,-3000.0,3000.0,3000.0);



Missions::Generate(); //force mission generate after server restart



return 1;

}



CMD:speedcamera_del(playerid,params[]){

if(IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid,0xFFFFFFFF,"Leave vehicle");

new mobid;

if(sscanf(params,"d",mobid)) return SendClientMessage(playerid,0xFFFFFFFF,"Usage /speedcamera_del <id>");

if(mobid < 0 || mobid >= MISSIONS_MAX_RADAR) return SendClientMessage(playerid,0xFFFFFFFF,"Wrong speed camera ID (0 - 99)");

if(!Missions::RadarData[mobid][f_active]) return SendClientMessage(playerid,0xFFFFFFFF,"Speed camera is not active");

Missions::DestroyRadar(mobid);

SendClientMessage(playerid,0xFFFFFFFF,"Speed camera deleted");

return 1;

}



CMD:speedcamera_add(playerid,params[]){

if(IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid,0xFFFFFFFF,"Leave vehicle");

new Float:speed;

if(sscanf(params,"f",speed)) return SendClientMessage(playerid,0xFFFFFFFF,"Uzywaj /speedcamera_add <max_speed>");

new Float:x,Float:y,Float:z,Float:z_angle;

GetPlayerPos(playerid,x,y,z);

GetPointInFrontOfPlayer(playerid,x,y,1.0);

GetPlayerFacingAngle(playerid,z_angle);

if(Missions::CreateRadar(x,y,z,z_angle,0,0,speed)){

SendClientMessage(playerid,0xFFFFFFFF,"Speed camera added");

ApplyAnimation(playerid,"BOMBER","BOM_Plant",4.1,0,0,0,0,0);

} else {

SendClientMessage(playerid,0xFFFFFFFF,"Unable to add speed camera (limit exceeded)");

}

return 1;

}



Functions:

Code:
Missions::SetMissionsScrapKey(key);

Missions::SetMissionsCorpseKey(key);

Missions::SetMissionsBombKey(key);

Missions::CountVehicleScrap(vehicleid);

Missions::DropScrap(vehicleid);

Missions::HealCorpse(playerid);

Missions::CreateRadar(Float:x,Float:y,Float:z,Float:rz,worldid=0,interiorid=0,Float:speed=80.0);

Missions::DestroyRadar(mobid);

Missions::SetSpawnRectangle(mission_type,Float:minx,Float:miny,Float:maxx,Float:maxy,bool:spawn_validation=true);

Missions::SetSpawnPolygon(mission_type,Float:points[],maxpoints=sizeof(points),bool:spawn_validation=true);



Callbacks:

Code:
OnPlayerEnterPatrol(playerid,mobid);

OnPlayerDestroyPatrol(playerid,mobid);

OnPlayerRobbed(playerid,mobid,mission_state);

OnPlayerFoundCorpse(playerid,mobid);

OnPlayerHitCorpse(playerid,mobid);

OnPlayerFoundScrap(playerid,mobid);

OnPlayerTakeScrap(playerid,mobid,mission_state,count_items);

OnPlayerExceededSpeed(playerid,mobid,Float:speed,Float:max_speed);

OnPlayerPutOutFire(playerid,mobid);

OnPlayerVehicleDamagedByRoad(playerid,mobid,old_health,new_health,veh_damage);

OnPlayerDestroyedTreeOnRoad(playerid,mobid);

OnPlayerUnloadingScrap(playerid,count_items);

OnPlayerHealCorpse(playerid,mobid);

OnPlayerTryDisarmBomb(playerid,mobid);

OnPlayerDisarmBomb(playerid,mobid,mission_state);

OnPlayerFixedRoad(playerid,mobid);



Download:

Missions.inc

route_rand.inc

route_rand.bin (put in /scriptfiles)

3DTryg.inc

ColAndreas Plugin



Notice:

Filterscript not exist because filterscripts have limits.

This has been replaced by include, having automatic installation, efficient GameMode/FilterScript.


  Santa Gifts
Posted by: AbyssMorgan - 2021-04-18, 01:07 PM - Forum: Filterscripts - No Replies

Hello, I would like to present a simple script to automatically deploy gifts on the map.



Description:

- On the map there is a prescribed amount of gifts. (Default 100)

- They appear in random locations on the map, in addition to water.

- What definite time reset location. (Default 2 hours)

- After collecting gifts a player receives award. (To set)

- After collecting gift changing locations.

- Nobody, not even the admin does not know gift location.



The script can be used to:

- Christmas

- Easter

- Halloween



Installation:

Code:
//#define SANTA_IS_EASTER_EVENT? ? //Change to Easter Event

//#define SANTA_IS_EASTER_HALLOWEEN //Change to Halloween Event

#include <streamer>

#include <ColAndreas>

#include <3DTryg>

#include <Santa>



public OnGameModeInit(){



//Santa::SetSpawnRectangle(Float:minx,Float:miny,Float:maxx,Float:maxy,bool:reset=true);

//Santa::SetSpawnPolygon(Float:points[],maxpoints=sizeof(points),bool:reset=true);



return 1;

}



public OnSantaPickupReward(playerid){



//edit this

GivePlayerMoney(playerid,250);



return 1;

}



Download:

Santa.inc

3DTryg.inc

ColAndreas Plugin



Notice:

Filterscript not exist because filterscripts have limits.

This has been replaced by include, having automatic installation, efficient GameMode/FilterScript.


  Missile (Missile Launcher)
Posted by: AbyssMorgan - 2021-04-18, 01:03 PM - Forum: Libraries - No Replies

Hi I would like to present include for Missile Launcher.



Video:

- Sniper Missile

- Vehicle Missile (MapAndreas Version)

- Vehicle Missile (ColAndreas Update)

- Marica Mortar V1

- Heavy Marica Mortar

- Missile Launcher Aim Player

- Congreve Rocket

- Marica Mortar V2

- New Vehicle Missile

- Flares



Functions:

Code:
Missile::Launch(type,Float:detection_range,Float:explode_radius,Float:speed,Float:x,Float:y,Float:z,worldid,interiorid,playerid,Float:streamdistance,missile_object,Float:tx,Float:ty,Float:tz,byplayerid=INVALID_PLAYER_ID,teamid=ANY_TEAM,bool:remote=false,remote_count=MAX_MISSILE_REMOTE_TARGET,remote_height=1.0,Float:arc_roll=0.0,Float:damage=-1.0,Float:vehicle_damage=-1.0);



type - explosion type //https://wiki.sa-mp.com/wiki/Explosion_List

Float:detection_range - detection range player/vehicle

Float:explode_radius - the explosion range (the same as in CreateExplosion)

Float:speed - projectile speed

Float:x, Float:y, Float:z - Starting position

worldid, interiorid, playerid, Float:streamdistance - the same as in CreateDynamicObject

missile_object: MISSILE_OBJECT_NORMAL / MISSILE_OBJECT_BIG / MISSILE_OBJECT_HYDRA / MISSILE_OBJECT_BOMB / MISSILE_OBJECT_BOMB_STATIC / MISSILE_OBJECT_FLARE

Float:tx, Float:ty, Float:tz - Target position

byplayerid - selected player will be immune to detection range

teamid - player team will be immune to detection range

remote - enable remote targeting (for Vehicle Missile Mortar)

remote_count - number of remote targeting 1 - 32

remote_height - arc height

arc_roll - rotation Y axis

Float:damage - player damage on explosion created

Float:vehicle_damage - vehicle damage on explosion created



Rotation: Auto!



Missile::LaunchAimPlayer(targetid,type,Float:detection_range,Float:explode_radius,Float:speed,Float:x,Float:y,Float:z,worldid,interiorid,playerid,Float:streamdistance,missile_object,Float:tx,Float:ty,Float:tz,byplayerid=INVALID_PLAYER_ID,teamid=ANY_TEAM,Float:damage=-1.0,Float:vehicle_damage=-1.0);



Missile::StopAimPlayer(mobid);

Missile::Destroy(mobid,type,playerid);

Missile::RemoteTarget(mobid,Float:tx,Float:ty,Float:tz,Float:speed = 0.0);

Missile::GetExplodeVisibility();

Missile::SetExplodeVisibility(Float:explode_stream);

Missile::DisableAllAim(playerid);



Misile::GetObject(mobid);

Misile::GetArea(mobid);

Misile::GetType(mobid);

Misile::GetExplode(mobid);

Misile::GetPlayer(mobid);

Misile::GetTeamID(mobid);

Misile::GetVehicle(mobid);

Misile::GetRemoteCount(mobid);

Misile::GetRemoteID(mobid);

Misile::GetSpeed(mobid);

Misile::GetTargetID(mobid);

Misile::GetDamage(mobid);

Misile::GetVehicleDamage(mobid);



Callbacks:

Code:
OnMissileDestroy(mobid,Float:x,Float:y,Float:z,type,killerid,byplayerid);



types:

MISSILE_DESTROY_TYPE_TARGET? //When rocket reaches its destination (always killerid=INVALID_PLAYER_ID)

MISSILE_DESTROY_TYPE_DETECT? //When rocket has been destroyed by detection range

MISSILE_DESTROY_TYPE_KILL? ? //When rocket has been destroyed by player



OnMissileDetectPlayer(playerid,killerid); //called when a player is within range of detection range



OnMissileRequestLaunch(Float:x,Float:y,Float:z,playerid,targetid);



Example Code:

Code:
public OnPlayerWeaponShot(playerid, weaponid, hittype, hitid, Float:fX, Float:fY, Float:fZ){

if(weaponid == 34){

new Float:x, Float:y, Float:z,

Float:tx, Float:ty, Float:tz,

Float:rx, Float:rz,

vw, int, Float:dist;



GetPlayerPos(playerid,x,y,z);

GetRotationFor2Point3D(x,y,z,fX,fY,fZ,rx,rz);



dist = GetDistanceBetweenPoints3D(x,y,z,fX,fY,fZ);

vw = GetPlayerVirtualWorld(playerid);

int = GetPlayerInterior(playerid);



GetPointInFront3D(x,y,z,rx,rz,4.0,tx,ty,tz);

Missile::Launch(MISSILE_TYPE_EXPLODE_HUGE,4.0,25.0,35.0,tx,ty,tz,vw,int,-1,300.0,MISSILE_OBJECT_HYDRA,fX,fY,fZ,playerid,.damage=100.0,.vehicle_damage=1000.0);



GetPointInFront3D(x,y,z,rx,rz,3.0,tx,ty,tz);

Missile::Launch(MISSILE_TYPE_EXPLODE_HUGE,4.0,25.0,35.0,tx,ty,tz.0,vw,int,-1,300.0,MISSILE_OBJECT_HYDRA,fX,fY,fZ.0,playerid,.damage=100.0,.vehicle_damage=1000.0);

Missile::Launch(MISSILE_TYPE_EXPLODE_HUGE,4.0,25.0,35.0,tx,ty,tz-3.0,vw,int,-1,300.0,MISSILE_OBJECT_HYDRA,fX,fY,fZ-3.0,playerid,.damage=100.0,.vehicle_damage=1000.0);



GetPointInFront3D(tx,ty,tz,rx,rz.0,3.0,x,y,z);

GetPointInFront3D(x,y,z,rx,rz,dist,fX,fY,fZ);

Missile::Launch(MISSILE_TYPE_EXPLODE_HUGE,4.0,25.0,35.0,x,y,z,vw,int,-1,300.0,MISSILE_OBJECT_HYDRA,fX,fY,fZ,playerid,.damage=100.0,.vehicle_damage=1000.0);

GetPointInFront3D(tx,ty,tz,rx,rz-90.0,3.0,x,y,z);

GetPointInFront3D(x,y,z,rx,rz,dist,fX,fY,fZ);

Missile::Launch(MISSILE_TYPE_EXPLODE_HUGE,4.0,25.0,35.0,x,y,z,vw,int,-1,300.0,MISSILE_OBJECT_HYDRA,fX,fY,fZ,playerid,.damage=100.0,.vehicle_damage=1000.0);



}

return 1;

}



Bullet example:

Code:
Missile::Launch(MISSILE_TYPE_EXPLODE_NONE,1.0,1.0,20.0,Float:x,Float:y,Float:z,worldid,interiorid,playerid,Float:streamdistance,MISSILE_OBJECT_BULLET,Float:tx,Float:ty,Float:tz,byplayerid=INVALID_PLAYER_ID,teamid=ANY_TEAM,.damage=5.0,.vehicle_damage=25.0);



How to check is player kill by missile (this is not required if you using custom missile damage):

Code:
enums:

last_missile_shot

last_missile_player



public OnMissileDestroy(mobid,Float:x,Float:y,Float:z,type,killerid,byplayerid){

if(type == MISSILE_DESTROY_TYPE_DETECT && killerid != INVALID_PLAYER_ID){

PlayerInfo[killerid][last_missile_shot] = GetTickCount();

PlayerInfo[killerid][last_missile_player] = byplayerid;

}

return 1;

}



public OnMissileDetectPlayer(playerid,killerid){

if(killerid != INVALID_PLAYER_ID){

PlayerInfo[playerid][last_missile_shot] = GetTickCount();

PlayerInfo[playerid][last_missile_player] = killerid;

}

? ? return 1;

}



public OnPlayerDeath(playerid, killerid, reason){

if(PlayerInfo[playerid][last_missile_player] != INVALID_PLAYER_ID && reason > 46 && playerid != killerid){

if(GetTickCount()-PlayerInfo[playerid][last_missile_shot] < 2000){

killerid = PlayerInfo[playerid][last_missile_player];

reason = 51;

}

}



//your code

return 1;

}



Download:

Missile.inc

3DTryg.inc

ColAndreas Plugin


  Hunting System
Posted by: AbyssMorgan - 2021-04-18, 12:54 PM - Forum: Filterscripts - Replies (1)

Hello, I would like to present you the Hunting System.



Video:

https://www.youtube.com/watch?v=gySSTtjFRB0



Functions:

Code:
Hunting::Create(type,Float:x,Float:y,Float:z,Float:health,respawntime,worldid=-1,interiorid=-1,playerid=-1,Float:streamdistance=200.0,moving_area = 0);

Hunting::Destroy(mobid);

Hunting::Respawn(mobid);

Hunting::ForceRespawn(mobid,Float:x,Float:y,Float:z);

Hunting::Kill(mobid,playerid=INVALID_PLAYER_ID);

Hunting::Stop(mobid,delay=-1);

Hunting::GoTo(mobid,Float:x,Float:y,bool:disable_moving=false);

Hunting::GetDrop(mobid);

Hunting::SetDrop(mobid,drop);

Hunting::GetPos(mobid,Float:x,Float:y,Float:z);

Hunting::SetPos(mobid,Float:x,Float:y,Float:z,bool:disable_moving=false);

Hunting::GetScaredRange(mobid);

Hunting::SetScaredRange(mobid,Float:range);

Hunting::GetHealth(mobid);

Hunting::SetHealth(mobid,Float:health);

Hunting::GetSpawnHealth(mobid);

Hunting::SetSpawnHealth(mobid,Float:health);

Hunting::GetRespawnTime(mobid);

Hunting::SetRespawnTime(mobid,respawntime);

Hunting::GetSpawn(mobid,&Float:x,&Float:y,&Float:z);

Hunting::SetSpawn(mobid,Float:x,Float:y,Float:z);

Hunting::GetInterior(mobid);

Hunting::SetInterior(mobid,interiorid);

Hunting::GetVirtualWorld(mobid);

Hunting::SetVirtualWorld(mobid,worldid);

Hunting::GetSpeed(mobid);

Hunting::SetSpeed(mobid,Float:speed);

Hunting::GetPressTime(mobid);

Hunting::SetPressTime(mobid,miliseconds);

Hunting::GetFacingAngle(mobid);

Hunting::SetCalmTime(mobid,time=0);

Hunting::IsPlayerInRange(playerid,mobid,Float:range);

Hunting::IsToggledMoving(mobid);

Hunting::ToggleMoving(mobid,toggle);

Hunting::IsValid(mobid);

Hunting::IsSpawned(mobid);

Hunting::IsDead(mobid);

Hunting::IsScared(mobid);

Hunting::IsStopped(mobid);

Hunting::IsMoving(mobid);



Extended Functions:

Code:
Hunting::Count();

Hunting::GetKey();

Hunting::SetKey(key);

Hunting::GetFreeID();

Hunting::GetActiveMob(playerid,mob_state);



Callbacks:

Code:
OnPlayerTakeHuntDrop(playerid,mobid,drop);

OnPlayerKillHuntAnimal(playerid,mobid);

OnPlayerApproachingAnimal(playerid,mobid,mob_state);

OnPlayerExitApproachingAnimal(playerid,mobid,mob_state);

OnAnimalTakeDamage(mobid,playerid,Float:amount,weaponid);

OnHuntAnimalRespawn(mobid);

OnAnimalScareStateChanged(mobid,playerid,isscared);

OnPlayerHuntDropStateChange(playerid,mobid,drop_state); //only called if press time > 0



Definitions:

Code:
//Config

MAX_HUNTING_ANIMALS? ? //default is 100 allowed to redefine

HUNTING_UPDATE_INTERVAL //default is 500 allowed to redefine



//Animal types

HUNTING_TYPE_COW

HUNTING_TYPE_DEER



//Animal state

HUNTING_STATE_DESTROYED //animal not exist

HUNTING_STATE_SPAWNED? //animal is spawned

HUNTING_STATE_DEAD? ? ? //animal is dead



//Drop State

HUNTING_DROP_STATE_FINISH

HUNTING_DROP_STATE_START

HUNTING_DROP_STATE_INTERRUPT



//Other

INVALID_HUNTING_ID

HUNTING_NO_AUTO_RESPAWN //disable auto respawn (respawntime param)



Example Pawn Code:

Code:
#include <a_samp>

#include <streamer>

#include <ColAndreas>

#include <3DTryg>

#include <Hunting>



public OnFilterScriptInit(){



new my_zone = CreateDynamicRectangle(-100.0,-100.0,100.0,100.0);

for(new i = 0; i < 5; i){

Hunting::Create(HUNTING_TYPE_COW,0.0,0.0,3.0,55.0,30,.moving_area=my_zone);



Hunting::Create(HUNTING_TYPE_DEER,5.0,0.0,3.0,55.0,30,.moving_area=my_zone);

}



return 1;

}



public OnPlayerTakeHuntDrop(playerid,mobid,drop){



if(drop){

SendClientMessage(playerid,-1,"You received $2500");

GivePlayerMoney(playerid,2500);

}

return 0; //set drop flag 0

}



public OnPlayerKillHuntAnimal(playerid,mobid){



SendClientMessage(playerid,-1,"Animal has been killed !");



return 1;

}



public OnPlayerApproachingAnimal(playerid,mobid,mob_state){



if(mob_state == HUNTING_STATE_DEAD){

SendClientMessage(playerid,-1,"Press Y to raise prize.");

}



return 1;

}



public OnPlayerExitApproachingAnimal(playerid,mobid,mob_state){



return 1;

}



public OnAnimalTakeDamage(mobid,playerid,Float:amount,weaponid){



if(weaponid != 34) return 0; //sniper only :D



return 1;

}



public OnHuntAnimalRespawn(mobid){



return 1;

}



public OnAnimalScareStateChanged(mobid,playerid,isscared){



return 1;

}



//only called if press time > 0

public OnPlayerHuntDropStateChange(playerid,mobid,drop_state){

switch(drop_state){

case HUNTING_DROP_STATE_FINISH: {

//your code

}

case HUNTING_DROP_STATE_START: {

//your code

}

case HUNTING_DROP_STATE_INTERRUPT: {

//your code

}

}

return 1;

}



Download:

Hunting.inc

3DTryg.inc

ColAndreas Plugin



Notice:

Filterscript not exist because filterscripts have limits.

This has been replaced by include, having automatic installation, efficient GameMode/FilterScript.


  PortalGun
Posted by: AbyssMorgan - 2021-04-18, 12:51 PM - Forum: Filterscripts - No Replies

Hello, I would like to present you the Portal Gun Script



Video:

https://www.youtube.com/watch?v=pHGUVNh9y3c

https://www.youtube.com/watch?v=wDBgtBY-cPs



Download:

PortalGun.inc

3DTryg.inc

ColAndreas Plugin



Installation:

Code:
#include <3DTryg>

#include <PortalGun>



Functions:

Code:
TogglePrivatePortalGun(bool:toggle);? ? ? ? ? ? //default: false

bool:IsTogglePrivatePortalGun();

ToggleUseTeamPortalGun(bool:toggle);? ? ? ? ? ? //default: false

bool:IsToggleUseTeamPortalGun();

TogglePortalGunForAll(bool:toggle);? ? ? ? ? ? //default: true

bool:IsTogglePortalGunForAll();

TogglePortalGunForPlayer(playerid,toggle);? ? ? //default: 0

IsTogglePortalGunForPlayer(playerid);

Float:GetPortalGunSpeed(playerid);

SetPortalGunSpeed(playerid,Float:speed);

Float:GetPortalGunStreamDistance();

SetPortalGunStreamDistance(Float:streamdistance);

ForceOpenPortalGunRing(playerid,portal_id,Float:ox,Float:oy,Float:oz,Float:tx,Float:ty,Float:tz,worldid,interiorid);

ForceClosePortalGunRing(playerid);



Activation:

Code:
Weapon: Country Rifle

Y - Change Ring



Notice:

Filterscript not exist because filterscripts have limits.

This has been replaced by include, having automatic installation, efficient GameMode/FilterScript.


  Military Dynamic Mines System
Posted by: AbyssMorgan - 2021-04-18, 12:48 PM - Forum: Filterscripts - No Replies

Hello, I would like to present a dynamic system landmines.



Video:

https://www.youtube.com/watch?v=SXwb26E-kkU

https://www.youtube.com/watch?v=_E3tw_qYzhI



Functions:

Code:
Mines::Create(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,Float:damage=-1.0,Float:vehicle_damage=-1.0);

type - explosion type //https://wiki.sa-mp.com/wiki/Explosion_List

Float:detection_range - detection range player/vehicle

Float:explode_radius - the explosion range (the same as in CreateExplosion)

Float:health - mine health (set MINE_INFINITY_HEALTH to be indestructible)

respawntime - respawn time in seconds

Float:x, Float:y, Float:z, worldid, interiorid, playerid, Float:streamdistance - the same as in CreateDynamicObject

mine_object - mine object

teamid - player team will be immune to detection range or destroy mine

detect_type - specify which elements are to be detected (MINE_DETECT_TYPE_ALL / MINE_DETECT_TYPE_PLAYER / MINE_DETECT_TYPE_VEHICLE)

Float:damage - player damage on explosion created

Float:vehicle_damage - vehicle damage on explosion created





Mines::CreateEx(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,Float:damage=-1.0,Float:vehicle_damage=-1.0);

Mines::Destroy(mobid);

Mines::GetExplodeVisibility();

Mines::SetExplodeVisibility(Float:streamdistance);

Mines::ForceRespawn(mobid);

Mines::Count();

Mines::GetObjectID(mobid);

Mines::GetAreaID(mobid);

Mines::GetPos(mobid,&Float:x,&Float:y,&Float:z);

Mines::SetPos(mobid,Float:x,Float:y,Float:z);

Mines::GetRot(mobid,&Float:rx,&Float:ry,&Float:rz);

Mines::SetRot(mobid,Float:rx,Float:ry,Float:rz);

Mines::GetDetectionRange(mobid,&Float:detection_range);

Mines::SetDetectionRange(mobid,Float:detection_range);

Mines::GetExplodeRadius(mobid,&Float:explode_radius);

Mines::SetExplodeRadius(mobid,Float:explode_radius);

Mines::GetHealth(mobid,&Float:health);

Mines::SetHealth(mobid,Float:health);

Mines::GetMaxHealth(mobid,&Float:health);

Mines::SetMaxHealth(mobid,Float:health);

Mines::GetVirtualWorld(mobid);

Mines::SetVirtualWorld(mobid,worldid);

Mines::GetInterior(mobid);

Mines::SetInterior(mobid,interiorid);

Mines::GetStreamDistance(mobid,&Float:streamdistance);

Mines::SetStreamDistance(mobid,Float:streamdistance);

Mines::GetTeam(mobid);

Mines::SetTeam(mobid,teamid);

Mines::GetType(mobid);

Mines::SetType(mobid,type);

Mines::GetRespawnTime(mobid);

Mines::SetRespawnTime(mobid,respawntime);

Mines::GetDamage(mobid);

Mines::SetDamage(mobid,Float:damage);

Mines::GetVehicleDamage(mobid);

Mines::SetVehicleDamage(mobid,Float:damage);

Mines::Update(variable);



Extended Grenade Functions:

Mines::GetEffectVisibility();

Mines::SetEffectVisibility(Float:streamdistance);

Mines::GetSpecialWeapon(mobid);

Mines::SetSpecialWeapon(mobid,special_weaponid);

Mines::GetEffectID(mobid);

Mines::SetEffectID(mobid,effectid);

Mines::GetEffectDMG(mobid);

Mines::SetEffectDMG(mobid,Float:damage);

Mines::GetEffectVDMG(mobid);

Mines::SetEffectVDMG(mobid,Float:veh_damage);

Mines::GetEffectTime(mobid);

Mines::SetEffectTime(mobid,seconds);



Callbacks:

Code:
OnMineDestroy(mobid,Float:x,Float:y,Float:z,type,killerid,Float:radius,damagerid);



types:

MINE_DESTROY_TYPE_DETECT? //When mine has been destroyed by detection range

MINE_DESTROY_TYPE_KILL? ? //When mine has been destroyed by player shoot



Mine Object:

Code:
MINE_OBJECT_STANDARD //default

MINE_OBJECT_UNDERWATER

MINE_OBJECT_LASER

MINE_OBJECT_PIZZA



Example Pawn Code:

Code:
#include <a_samp>

#include <streamer>

#include <3DTryg>

#include <Mines>



public OnFilterScriptInit(){





/*

simply enter the coordinates of /save

AddPlayerClass(71,-0.3440,0.2275,3.1172,65.1647,0,0,0,0,0,0); //

and select other parameters

*/



// not recommended set worldid and interiorid -1





Mines::Create(MINE_TYPE_EXPLODE_HUGE, 2.0, 0.1, 200.0, 60, 10.0,0.0,3.1172, 0,0,-1, 300.0, MINE_OBJECT_STANDARD);



Mines::Create(MINE_TYPE_EXPLODE_SMALL, 1.5, 0.01, 100.0, 15, 0.0, 0.0, 3.1172, 0,0, -1, 200.0,MINE_OBJECT_PIZZA);



Mines::Create(MINE_TYPE_EXPLODE_HUGE, 6.0, 0.01, 2000.0, 120, 71.8122, 175.3036, -0.5547, 0,0,-1,200.0, MINE_OBJECT_UNDERWATER);



return 1;

}



Example Command:

Code:
CMD:addmine(playerid,params[]){

if(!IsPlayerAdmin(playerid)) return 0;



new buffer[128], type, Float:detection_range, Float:explode_radius, Float:health, respawntime,

Float:x, Float:y, Float:z, worldid, interiorid, Float:streamdistance, mine_object = MINE_OBJECT_STANDARD, teamid = ANY_TEAM;

GetPlayerPos(playerid,x,y,z);

worldid = GetPlayerVirtualWorld(playerid);

interiorid = GetPlayerInterior(playerid);

if(sscanf(params,"dfffdfD(-1)D(-1)",type,detection_range,explode_radius,health,respawntime,streamdistance,mine_object,teamid)) return SendClientMessage(playerid,-1,"/addmine <type> <detection r> <explode r> <hp> <respawn> <stream distance> [obj] [team]");



if(mine_object == -1) mine_object = MINE_OBJECT_STANDARD;

if(teamid == -1) teamid = ANY_TEAM;



new mobid = Mines::Create(type,detection_range,explode_radius,health,respawntime,x,y,z,worldid,interiorid,-1,streamdistance,mine_object,teamid);

format(buffer,sizeof buffer,"Added mine id %d",mobid);

SendClientMessage(playerid,-1,buffer);



/*

Mines::SetSpecialWeapon(mobid,GRENADE_SPECIAL_WEAPON_TEARGAS);

Mines::SetEffectID(mobid,GRENADE_EFFECT_HUGE_SMOKE_1);

Mines::SetEffectDMG(mobid,1.0);

Mines::SetEffectVDMG(mobid,0.0);

Mines::SetEffectTime(mobid,25);

*/



return 1;

}



CMD:delmine(playerid,params[]){

if(!IsPlayerAdmin(playerid)) return 0;

new buffer[128], mobid = INVALID_MINE_ID;

if(sscanf(params,"d",mobid)) return SendClientMessage(playerid,-1,"/delmine <mobid>");



if(MineComponent[mobid][mine_status] != MINE_STATUS_UNACTIVE){

Mines::Destroy(mobid);

format(buffer,sizeof buffer,"Removed mine id %d",mobid);

SendClientMessage(playerid,-1,buffer);

} else {

format(buffer,sizeof buffer,"Mine id %d not exist",mobid);

SendClientMessage(playerid,-1,buffer);

}

return 1;

}



Download:

Mines.inc

3DTryg.inc

ExtendedGrenade.inc



Notice:

Filterscript not exist because filterscripts have limits.

This has been replaced by include, having automatic installation, efficient GameMode/FilterScript.


  Stingers (Cops and Robbers)
Posted by: AbyssMorgan - 2021-04-18, 12:42 PM - Forum: Filterscripts - No Replies

Hello, I would like to present you the Stingers Script (Cops and Robbers)



Video:

https://www.youtube.com/watch?v=nslVT5RC3J0



Download:

Stingers.inc

3DTryg.inc



Installation:

Code:
#include <3DTryg>

#include <Stingers>



Functions:

Code:
CreateDynamicStinger(type,Float:x,Float:y,Float:z,Float:rx,Float:ty,Float:rz,worldid=-1,interiorid=-1,playerid=-1,Float:streamdistance=100.0,teamid=ANY_TEAM,byplayerid=INVALID_PLAYER_ID);

DestroyDynamicStinger(mobid);



bool:IsDynamicStingerActive(mobid);

GetDynamicStingerObjectID(mobid);

GetDynamicStingerTeam(mobid);

SetDynamicStingerTeam(mobid,teamid);

GetDynamicStingerPlayerID(mobid);

SetDynamicStingerPlayerID(mobid,byplayerid);

GetPlayerActiveDynamicStinger(playerid);

ToggleDynamicStingerDamage(mobid,bool:toggle);



Callbacks:

Code:
//called on vehicle damage updated by stinger

OnVehicleDamageByStinger(playerid,killerid,mobid,old_tires,new_tires);



Definitions:

Code:
STINGER_TYPE_SMALL //Object: 2899

STINGER_TYPE_BIG? //Object: 2892



Example code:

Code:
public OnVehicleDamageByStinger(playerid,killerid,mobid,old_tires,new_tires){

if(killerid != INVALID_PLAYER_ID){

new p_name[MAX_PLAYER_NAME],string[144];

GetPlayerName(killerid,p_name,sizeof(p_name));

format(string,sizeof(string),"{00AAFF}Your vehicle has been damaged by {00FF00}%s {00AAFF}stinger.",p_name);

SendClientMessage(playerid,-1,string);

}

return 1;

}



new StingerObj[MAX_PLAYERS];



public OnPlayerDisconnect(playerid,reason){

if(StingerObj[playerid] != 0){

DestroyDynamicStinger(StingerObj[playerid]);

StingerObj[playerid] = 0;

}

return 1;

}



CMD:stinger(playerid,params[]){

if(!strcmp(params,"destroy",true)){

DestroyDynamicStinger(StingerObj[playerid]);

StingerObj[playerid] = 0;

return SendClientMessage(playerid,-1,"Stinger Destroyed");

}

if(IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid,-1,"First get out of the vehicle");

if(GetPlayerActiveDynamicStinger(playerid)) return SendClientMessage(playerid,-1,"You are near another stinger");

new type;

if(!strcmp(params,"big",true)){

type = STINGER_TYPE_BIG;

} else if(!strcmp(params,"small",true)){

type = STINGER_TYPE_SMALL;

} else {

if(!IsGM(playerid)){

return SendClientMessage(playerid,-1,"Usage /stinger <big/small/destroy>");

} else {

return SendClientMessage(playerid,-1,"Usage /stinger <big/small/destroy>");

}

}



new Float:x,Float:y,Float:z,Float:z_angle;

GetPlayerPos(playerid,x,y,z);

GetPlayerFacingAngle(playerid,z_angle);

DestroyDynamicStinger(StingerObj[playerid]);

StingerObj[playerid] = CreateDynamicStinger(type,x,y,z-0.9,0.0,0.0,CompRotationFloat(z_angle.0),-1,-1,-1,100.0,ANY_TEAM,playerid);

return SendClientMessage(playerid,-1,"Stinger added");

}



Issues:

- Stinger can not be located near to another stinger



Notice:

Filterscript not exist because filterscripts have limits.

This has been replaced by include, having automatic installation, efficient GameMode/FilterScript.


  Los Santos Gang Graffiti
Posted by: AbyssMorgan - 2021-04-18, 12:30 PM - Forum: Filterscripts - No Replies

Hello, I would like to present you the Los Santos Gang Graffiti.



Video:

[Image: c0RgnwW.gif]



Installation:

Code:
#include <streamer>

#include <3DTryg>



//#define GRAFFITI_DEFAULT_GANG 0

//#define GRAFFITI_DEFAULT_COLOR 0x003D00FF

//#define GRAFFITI_DEFAULT_NAME "Sekhmete Axion Rush"



#include <Graffiti>



public OnGameModeInit(){

//...load gang meta before init Graffiti

Graffiti::Init();

return 1;

}



public Graffiti::GetPlayerGang(playerid){

return PlayerData[playerid][gang]; //your variable returning gangid

}



//called after player change graffiti tag

public OnGraffitiTagChanged(mobid,playerid,gangid,old_gangid){

new buffer[32];

format(buffer,sizeof(buffer),"~w~Tag painted ~n~%d of %d",Graffiti::CountGangTags(gangid),MAX_GRAFFITI);

GameTextForPlayer(playerid,buffer,3000,4);



//Graffiti::SetGangName(mobid,0xDBDE1FFF,"Grove Street");

return 1;

}



//called after server init

public OnGraffitiTagCreated(mobid,gangid){



//Graffiti::SetGangName(mobid,0xDBDE1FFF,"Grove Street");

return 1;

}



Download:

Graffiti.inc

graffiti.bin (put in /scriptfiles)

3DTryg.inc



Notice:

Filterscript not exist because filterscripts have limits.

This has been replaced by include, having automatic installation, efficient GameMode/FilterScript.


  Magic Wand
Posted by: AbyssMorgan - 2021-04-18, 12:28 PM - Forum: Filterscripts - Replies (1)

Hello, I would like to present you the Magic Wand Script



Video:

https://www.youtube.com/watch?v=aaHfVz-UxR8



Download:

Magic.inc

3DTryg.inc

ColAndreas Plugin



Installation:

Code:
#include <colandreas>

#include <3DTryg>

#include <Magic>



Functions:

Code:
Magic::ToggleUseTeam(bool:toggle);            //default: false

Magic::IsToggleUseTeam();

Magic::ToggleForAll(bool:toggle);             //default: false

Magic::IsToggleForAll();

Magic::ToggleForPlayer(playerid,bool:toggle); //default: false

Magic::IsToggleForPlayer(playerid);

Magic::GetDamage(playerid);

Magic::SetDamage(playerid,Float:amount);

Magic::GetSpeed(playerid);

Magic::SetSpeed(playerid,Float:speed);

Magic::GetRange(playerid);

Magic::SetRange(playerid,Float:range);

Magic::GetAmmo(playerid);

Magic::SetAmmo(playerid,ammo);

Magic::TogglePoisoning(playerid,bool:toggle);

Magic::IsTogglePoisoning(playerid);

Magic::GetPoisoningTime(playerid);

Magic::SetPoisoningTime(playerid,seconds);

Magic::GetPoisoningDamage(playerid);

Magic::SetPoisoningDamage(playerid,Float:damage);

Magic::SetProjectile(playerid,modelid=18693,Float:rx=90.0,Float:ry=0.0,Float:rz=0.0,Float:offx=0.0,Float:offy=0.0,Float:offz=0.0);

Magic::GetProjectile(playerid,&modelid,&Float:rx=0.0,&Float:ry=0.0,&Float:rz=0.0,&Float:offx=0.0,&Float:offy=0.0,&Float:offz=0.0);



Callbacks:

Code:
OnPlayerRequestMagicShot(playerid,targetid); //return 0 - prevent to use magic shoot (this callback is called also if ammo is 0)



Definitions:

Code:
MAGIC_SPEED

MAGIC_MAX_RADIUS

MAGIC_REFRESH_ACTION

MAGIC_DAMAGE

MAGIC_DOT_POISONING

MAGIC_POISONING_TIME

MAGIC_WEAPON_AMMO_INFINITY



WEAPON_MAGIC_BULLET

WEAPON_MAGIC_POISONING



Activation:

Code:
Weapon: Fist

Left Mouse Button



Notice:

Filterscript not exist because filterscripts have limits.

This has been replaced by include, having automatic installation, efficient GameMode/FilterScript.


  Knife Shot / Throwing knife
Posted by: AbyssMorgan - 2021-04-18, 12:23 PM - Forum: Filterscripts - No Replies

Hello, I would like to present you the Knife Shot Script



Video:

https://www.youtube.com/watch?v=WJZCn3XXRHY

https://www.youtube.com/watch?v=PSfgKwm3Mc8



Download:

Knife.inc

3DTryg.inc

ColAndreas Plugin



Installation:

Code:
#include <colandreas>

#include <3DTryg>

#include <Knife>



Functions:

Code:
Knife::ToggleUseTeam(bool:toggle);            //default: false

Knife::IsToggleUseTeam();

Knife::ToggleForAll(bool:toggle);             //default: false

Knife::IsToggleForAll();

Knife::ToggleForPlayer(playerid,bool:toggle); //default: false

Knife::IsToggleForPlayer(playerid);

Knife::GetDamage(playerid);

Knife::SetDamage(playerid,Float:amount);

Knife::GetSpeed(playerid);

Knife::SetSpeed(playerid,Float:speed);

Knife::GetRange(playerid);

Knife::SetRange(playerid,Float:range);

Knife::GetAmmo(playerid);

Knife::SetAmmo(playerid,ammo);

Knife::TogglePoisoning(playerid,bool:toggle);

Knife::IsTogglePoisoning(playerid);

Knife::GetPoisoningTime(playerid);

Knife::SetPoisoningTime(playerid,seconds);

Knife::GetPoisoningDamage(playerid);

Knife::SetPoisoningDamage(playerid,Float:damage);



Callbacks:

Code:
OnPlayerRequestKnifeShot(playerid,targetid); //return 0 - prevent to use knife shoot (this callback is called also if ammo is 0)



Definitions:

Code:
KNIFE_SPEED

KNIFE_MAX_RADIUS

KNIFE_REFRESH_ACTION

KNIFE_REFRESH_MISS

KNIFE_DAMAGE

KNIFE_WEAPON_AMMO_INFINITY

KNIFE_DOT_POISONING

KNIFE_POISONING_TIME



WEAPON_KNIFE_THROWN

WEAPON_KNIFE_POISONING



Activation:

Code:
Weapon: Knife



Step 1: Right Mouse Button

Step 2: Left Mouse Button



Notice:

Filterscript not exist because filterscripts have limits.

This has been replaced by include, having automatic installation, efficient GameMode/FilterScript.