CreateExplosion

From SA-MP Wiki

Jump to: navigation, search


Description:

Create an explosion at the specified coordinates.


Parameters:
(Float:X, Float:Y, Float:Z, type, Float:radius)
Float:XThe X coordinate of the explosion.
Float:YThe Y coordinate of the explosion.
Float:ZThe Z coordinate of the explosion.
typeThe type of explosion.
Float:radiusThe explosion radius.


Return Values:

This function always returns 1, even when the explosion type and/or radius values are invalid.


Image:32px-Ambox_warning_orange.png

Note

There is a limit as to how many explosions can be seen at once by a player. This is roughly 10.


Example Usage:

public OnPlayerEnterCheckpoint(playerid)
{
    // Get the player's position
    new Float:x, Float:y, Float:z;
    GetPlayerPos(playerid, x, y, z);
 
    // Create an explosion at the player's position
    CreateExplosion(x, y, z, 12, 10.0);
 
    return 1;
}

Related Functions

The following functions may be useful, as they are related to this function in one way or another.