I tried make a script that improves explosions of cars. Im a new scripter so this can be improved by community.
Video: https://youtu.be/P_Kw0lhgcw0
Scripts:
[spoiler]
--This script uses classes.--
class PlayerStats
{
patlama = false;
}
function onVehicleExplode( vehicle )
{
CreateExplosion( vehicle.World, 1, vehicle.Pos, -1, true )
local i =0;
local nearplr;
local distance;
for( i=0;i<100;i++)
{
nearplr=FindPlayer(i);
distance = DistanceFromPoint( nearplr.Pos.x, nearplr.Pos.y, vehicle.Pos.x, vehicle.Pos.y );
if( distance < 16 )
{
if(nearplr)
{
Player.CanAttack = false;
stats[nearplr.ID].patlama = true;
NewTimer("kamerapatlama", 1300, 1, nearplr.ID);
nearplr.SetAnim(0,126);
nearplr.SetDrunkLevel( 100, 100 );
}
if (!distance)
{
return false;
}
}
}
}
function kamerapatlama( player )
{
player = FindPlayer( player );
if ( player )
{
stats[ player.ID ].patlama = false;
Player.CanAttack = true;
player.SetDrunkLevel( 0, 0 );
}
}
[/spoiler]
Improving the explosion? The idea itself is great
@KadirYigit better late than never, good job :))
Congratulations. GJ mate ;)
Thanks everyone