//////////////////////////////////////////////////////////////////////////////// /* This is created by Fj0rtizFredde. Dont remove credits! If you remove credits Garfield will come home to you and eat all your lasange!!! */ //////////////////////////////////////////////////////////////////////////////// #include #define BOMBID 512 new Float:A, Float:B, Float:C; forward ItsShowTime(playerid); public OnFilterScriptInit() { print("\n--------------------------------------"); print(" Terrorist Bomb Script By Fj0rtizFredde Loaded"); print("--------------------------------------\n"); return 1; } public OnFilterScriptExit() { print("\n--------------------------------------"); print(" Terrorist Bomb Script By Fj0rtizFredde Unloaded"); print("--------------------------------------\n"); return 1; } public OnPlayerDeath(playerid, killerid, reason) { //This is just so the system dont bug! StopPlayerHoldingObject(playerid); SetPVarInt(playerid, "MeatBalls", 0); SetPVarInt(playerid, "SuperMario", 0); return 1; } public OnPlayerCommandText(playerid, cmdtext[]) { if (strcmp("/BlowMe", cmdtext, true) == 0) { if(GetPVarInt(playerid, "MeatBalls") == 1) return SendClientMessage(playerid,0xE60000FF,"You already got a bomb on you.. Blow youself up first!"); if(GetPlayerMoney(playerid) <= 5000) return SendClientMessage(playerid,0xE60000FF,"You need at least $5000 to buy a bomb"); ShowPlayerDialog(playerid,BOMBID,DIALOG_STYLE_INPUT,"Freddes Terrorist Bomb System","Do you want a timed bomb or a controlled bomb? \n(Type in Timed or Controlled)","Buy","Cancel"); return 1; } return 0; } public OnPlayerKeyStateChange(playerid, newkeys, oldkeys) { if (newkeys == KEY_FIRE && GetPVarInt(playerid,"SuperMario") == 1) { GetPlayerPos(playerid, A, B, C); for(new i; i < MAX_PLAYERS; i++) { if(IsPlayerInRangeOfPoint(i,8.0,A,B,C)) { SetPlayerHealth(i,0); } } CreateExplosion(A, B, C, 6, 50.0); StopPlayerHoldingObject(playerid); SetPVarInt(playerid, "MeatBalls", 0); SetPVarInt(playerid, "SuperMario", 0); GameTextForPlayer(playerid, "BOOOOOM!!", 3000, 0); } return 1; } public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]) { if(dialogid == BOMBID && response) { if(!strcmp(inputtext, "Timed", true)) { ShowPlayerDialog(playerid,BOMBID+1,DIALOG_STYLE_INPUT,"Freddes Terrorist Bomb System","What should we set the timer to? \n(Type in how many seconds)","Buy","Cancel"); } if(!strcmp(inputtext, "Controlled", true)) { SetPVarInt(playerid, "MeatBalls", 1); SetPVarInt(playerid, "SuperMario", 1); SetPlayerHoldingObject(playerid, 1654, 1,0.1,0.20,0.0,180.0,100.0,0.0); GivePlayerWeapon(playerid, 40, 1); GivePlayerMoney(playerid, -5000); SendClientMessage(playerid,0x21DD00FF,"Great you got a bomb. Now go to a place with a lot of people and press the mouse botton!"); } } if(dialogid == BOMBID+1 && response) { new time = strval(inputtext); SetPVarInt(playerid, "MeatBalls", 1); SetPlayerHoldingObject(playerid, 1654, 1,0.1,0.20,0.0,180.0,100.0,0.0); GivePlayerMoney(playerid, -5000); SetTimerEx("ItsShowTime", time*1000, 0, "i", playerid); SendClientMessage(playerid,0x21DD00FF,"Great you got a bomb. Now run in to a place with a lot of people but dont be to late!"); } return 1; } public ItsShowTime(playerid) { if(GetPVarInt(playerid,"MeatBalls") == 1) { GetPlayerPos(playerid, A, B, C); for(new i; i < MAX_PLAYERS; i++) { if(IsPlayerInRangeOfPoint(i,8.0,A,B,C)) { SetPlayerHealth(i,0); PlayerPlaySound(i, 1057, A, B, C); } } CreateExplosion(A, B, C, 6, 50.0); StopPlayerHoldingObject(playerid); SetPVarInt(playerid, "MeatBalls", 0); GameTextForPlayer(playerid, "BOOOOOM!!", 3000, 0); } return 1; }