CreateExplosion
From SA-MP Wiki
CreateExplosion
With this function, you can create an explosion at the given location.
(Float:X, Float:Y, Float:Z, type, Float:radius)
| Float:X | The X-coordinate where the explosion will happen. |
| Float:Y | The Y-coordinate where the explosion will happen. |
| Float:Z | The Z-coordinate where the explosion will happen. |
| type | The type of explosion. |
| Float:radius | The explosion radius. |
This function does not return a specific value, it's best to simply ignore it.
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; }
