CreateExplosion

From SA-MP Wiki

Jump to: navigation, search

CreateExplosion


With this function, you can create an explosion at the given location.


Parameters:
(Float:X, Float:Y, Float:Z, type, Float:radius)
Float:XThe X-coordinate where the explosion will happen.
Float:YThe Y-coordinate where the explosion will happen.
Float:ZThe Z-coordinate where the explosion will happen.
typeThe type of explosion.
Float:radiusThe explosion radius.
This function does not return a specific value.


public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
    new Float:x, Float:y, Float:z;
 
    // Get Player Position
    GetVehiclePos(vehicleid, x, y, z);
 
    // Create an explosion near the vehicle you get into
    CreateExplosion(x+random(5), y+random(5), z+random(5), 12, 10.0);
 
    return 1;
}
Personal tools
In other languages