Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- * By RaFaeL zilberman (c) 2012
- * This include have writed for Simple usage
- *
- */
- #if defined _Explode_included
- #endinput
- #endif
- #define _Explode_included
- /*
- native CreatePlayerExplosion(playerid, type, Float:radius, Float:offsetx = 0.0, Float:offsety = 0.0, Float:offsetz = 0.0);
- native CreateVehicleExplosion(vehicleid, type, Float:radius, Float:offsetx = 0.0, Float:offsety = 0.0, Float:offsetz = 0.0);
- native CreateObjectExplosion(objectid, type, Float:radius, Float:offsetx = 0.0, Float:offsety = 0.0, Float:offsetz = 0.0);
- */
- new Float:exPos[3];
- //==============================================================================================================================
- stock CreatePlayerExplosion(playerid, type, Float:radius, Float:offsetx = 0.0, Float:offsety = 0.0, Float:offsetz = 0.0) {
- if(playerid == INVALID_PLAYER_ID || !IsPlayerConnected(playerid)) return false;
- GetPlayerPos(playerid, exPos[0], exPos[1], exPos[2]);
- CreateExplosion(exPos[0]+offsetx, exPos[1]+offsety, exPos[2]+offsetz, type, radius);
- return true;
- }
- stock CreateVehicleExplosion(vehicleid, type, Float:radius, Float:offsetx = 0.0, Float:offsety = 0.0, Float:offsetz = 0.0) {
- if(GetVehicleModel(vehicleid) <= 0) return false;
- GetVehiclePos(vehicleid, exPos[0], exPos[1], exPos[2]);
- CreateExplosion(exPos[0]+offsetx, exPos[1]+offsety, exPos[2]+offsetz, type, radius);
- return true;
- }
- stock CreateObjectExplosion(objectid, type, Float:radius, Float:offsetx = 0.0, Float:offsety = 0.0, Float:offsetz = 0.0) {
- if(!IsValidDynamicObject(objectid)) return false;
- GetDynamicObjectPos(objectid, exPos[0], exPos[1], exPos[2]);
- CreateExplosion(exPos[0]+offsetx, exPos[1]+offsety, exPos[2]+offsetz, type, radius);
- return true;
- }
- //==============================================================================================================================
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement