Created
August 15, 2013 10:05
-
-
Save WazzPup/6239769 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*====================================================================== | |
Bomb Create | |
Version 2: | |
_ Fixed bug | |
_ Add more explosion | |
_ And have a dynamicbomb command for admin | |
======================================================================*/ | |
#include <a_samp> | |
#include <zcmd> | |
new Float:x,Float:y,Float:z; | |
new Float:dx,Float:dy,Float:dz; | |
new bombpick; | |
forward bombtime(); | |
forward dynamicbombtime(); | |
public OnFilterScriptInit() | |
{ | |
print("\n--------------------------------------"); | |
print("Basic Bomb Create By xGanyx"); | |
print("--------------------------------------\n"); | |
return 1; | |
} | |
stock OnePlayAnim(playerid,animlib[],animname[], Float:Speed, looping, lockx, locky, lockz, lp) | |
{ | |
ApplyAnimation(playerid, animlib, animname, Speed, looping, lockx, locky, lockz, lp); | |
} | |
CMD:bomb(playerid,params[]) | |
{ | |
ClearAnimations(playerid); | |
OnePlayAnim(playerid, "BOMBER", "BOM_Plant", 4.0, 0, 0, 0, 0, 0); | |
GetPlayerPos(playerid,x,y,z); | |
CreatePickup(1252,1,x,y,z,0); | |
SetTimerEx("dynamicbombtime",6000,false,"i",playerid); | |
return 1; | |
} | |
CMD:dynamicbomb(playerid,params[]) | |
{ | |
if(!IsPlayerAdmin(playerid)) return 0; | |
for(new i; i < MAX_PLAYERS; i++) | |
{ | |
ClearAnimations(i); | |
OnePlayAnim(i, "BOMBER", "BOM_Plant", 4.0, 0, 0, 0, 0, 0); | |
GetPlayerPos(i,dx,dy,dz); | |
CreatePickup(1252,1,x,y,z,0); | |
SetTimerEx("bombtime",6000,false,"i",playerid); | |
} | |
return 1; | |
} | |
public bombtime() | |
{ | |
CreateExplosion(dx,dy,dz,6,100.0); | |
return 1; | |
} | |
public dynamicbombtime() | |
{ | |
CreateExplosion(dx,dy,dz,6,100.0); | |
return 1; | |
} | |
public OnPlayerPickUpPickup(playerid,pickupid) | |
{ | |
if(pickupid == bombpick) | |
{ | |
GameTextForPlayer(playerid,"~r~Bomb Has Been Placed",3000,4); | |
} | |
return 1; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment