07.04.2020, 11:09
CreateParticle and CreateParticleForPlayer functions:
List of particles (to be used as "type" parameter):
Example:
pawn Code:
stock CreateParticle(type, Float:X, Float:Y, Float:Z, Float:DrawDistance = 0.0, time = 0)
{
new particleid = CreateObject(type, X, Y, Z, 0.0, 0.0, 0.0, DrawDistance);
if(time > 0) SetTimerEx("DestroyParticle", time, 0, "i", particleid);
return particleid;
}
forward DestroyParticle(particleid);
public DestroyParticle(particleid) return DestroyObject(particleid);
stock CreateParticleForPlayer(playerid, type, Float:X, Float:Y, Float:Z, Float:DrawDistance = 0.0, time = 0)
{
new particleid = CreatePlayerObject(playerid, type, X, Y, Z, 0.0, 0.0, 0.0, DrawDistance);
if(time > 0) SetTimerEx("DestroyParticleForPlayer", time, 0, "ii", playerid, particleid);
return particleid;
}
forward DestroyParticleForPlayer(playerid, particleid);
public DestroyParticleForPlayer(playerid, particleid) return DestroyPlayerObject(playerid, particleid);
pawn Code:
#define WATERSPLASH 18720
#define FIRE_BIKE 18689
#define FLAMETHROWERP 18694
#define WATER_HYDRANT 18740
#define EXHALE 18677
#define BLOODPOOL1 19836
#define SMOKE30LIT 18725
#define SHOOTLIGHT 18724
#define RIOT_SMOKE 18723
#define PUKE 18722
#define PRT_WHEELDIRT 18721
#define PRT_WAKE 18719
#define SMOKE50LIT 18727
#define PRT_SPARK_2 18718
#define PRT_SPARK 18717
#define PRT_SMOKE_EXPAND 18716
#define PRT_SMOKE_HUGE 18715
#define PRT_SAND 18714
#define PRT_SAND2 18713
#define PRT_GUNSHELL 18712
#define PRT_GLASS 18711
#define SMOKE30M 18726
#define SPRAYCANP 18729
#define SMOKE_FLARE 18728
#define WATER_FOUNTAIN 18739
#define WATERFALL_END 18747
#define WATER_SWIM 18746
#define WATER_SPLSH_SML 18745
#define WATER_SPLASH_BIG 18744
#define WATER_SPLASH 18743
#define WATER_SPEED 18742
#define WATER_RIPPLES 18741
#define WATER_FNT_TME 18738
#define PRT_CARDEBRIS 18709
#define WALLBUST 18737
#define VENT 18736
#define VENT2 18735
#define TREE_HIT_PALM 18734
#define TREE_HIT_FIR 18733
#define TEARGASAD 18732
#define TEARGAS99 18731
#define TANK_FIRE 18730
#define PRT_COLLISIONSMOKE 18710
#define PRT_BLOOD 18706
#define PRT_BUBBLE 18708
#define COKE_PUFF 18675
#define EXPLOSION_MEDIUM 18683
#define EXPLOSION_LARGE 18682
#define EXPLOSION_FUEL_CAR 18681
#define EXPLOSION_DOOR 18680
#define EXPLOSION_CRATE 18679
#define EXPLOSION_BARREL 18678
#define COKE_TRAIL 18676
#define CLOUDFAST 18674
#define EXPLOSION_SMALL 18685
#define CIGARETTE_SMOKE 18673
#define CEMENTP 18672
#define CARWASHSPRAY 18671
#define CAMFLASH 18670
#define BOAT_PROP 18669
#define BLOOD_HELI 18668
#define EXPLOSION_MOLOTOV 18684
#define EXPLOSION_TINY 18686
#define PRT_BOATSPLASH 18707
#define JETPACKP 18699
#define PETROLCAN 18705
#define OVERHEAT_CAR_ELEC 18704
#define OVERHEAT_CAR 18703
#define NITROP 18702
#define MOLOTOV_FLAME 18701
#define JETTHRUST 18700
#define INSECTS 18698
#define EXTINGUISHER 18687
#define HELI_DUST 18697
#define GUNSMOKE 18696
#define GUNFLASH 18695
#define FLAME99 18693
#define FIRE_MED 18692
#define FIRE_LARGE 18691
#define FIRE_CAR 18690
#define FIRE 18688
#define WS_FACTORYSMOKE 18748
pawn Code:
CreateParticle(PRT_SMOKE_HUGE, 1958.3783, 1343.1572, 15.3746, 0.0, 1500); //Create huge smoke particle for 1500 ms

