06.10.2012, 09:24
Hello.Today I download EBS system (BOMB SYSTEM).I edit it.But I have problem.Plant bomb works fine.But detonate is working problem.First if I plant Large Explosive Bomb it will produce big explosive.But when I plant small one.It`s produce small explosive.Again when I buy large bomb it`s produce SMALL EXPLOSIVE.I don`t know why It`s won`t produce big explosive...
CODE:
CODE:
pawn Код:
CMD:plant(playerid,params[])
{
if(AmountBombs[playerid] == 0) return SendClientMessage(playerid,0xFFFFFFF,""embed_red"[ERROR] "embed_white"You don`t have enough explozive to plant bomb!Buy it in Bomb Shop!");
{
if(isbomb[playerid] == 1)
{
GetPlayerPos(playerid,X2,Y2,Z2);
bomb = CreatePlayerObject(playerid, 367, X2-0.5,Y2,Z2-0.9,0,-1,-1,300.0);
bomb0 = SetTimerEx("t0",180000,0,"i",playerid);
SendClientMessage(playerid, 0xFFFFFFFF, "Your bomb will explode in {FF1919}3 minutes{FFFFFF}!");
SendClientMessage(playerid, 0xFFFFFFFF, "If you want to explode it faster then use {FF1919}/kaboom{FFFFFF}!");
AmountBombs[playerid] = 0;
isbomb[playerid] = 0;
}
if(isbomb1[playerid] == 1)
{
GetPlayerPos(playerid,X2,Y2,Z2);
bomb1 = CreatePlayerObject(playerid, 343, X2-0.5,Y2,Z2-0.9,0,-1,-1,300.0);
bomb01 = SetTimerEx("t1",180000,0,"i",playerid);
SendClientMessage(playerid, 0xFFFFFFFF, "Your bomb will explode in {FF1919}3 minutes{FFFFFF}!");
SendClientMessage(playerid, 0xFFFFFFFF, "If you want to explode it faster then use {FF1919}/kaboom{FFFFFF}!");
AmountBombs[playerid] = 0;
isbomb1[playerid] = 0;
}
if(isbomb2[playerid] == 1)
{
GetPlayerPos(playerid,X2,Y2,Z2);
bomb2 = CreatePlayerObject(playerid, 1252, X2-0.5,Y2,Z2-0.65,0,-1,-1,300.0);
bomb02 = SetTimerEx("t2",180000,0,"i",playerid);
SendClientMessage(playerid, 0xFFFFFFFF, "Your bomb will explode in {FF1919}3 minutes{FFFFFF}!");
SendClientMessage(playerid, 0xFFFFFFFF, "If you want to explode it faster then use {FF1919}/kaboom{FFFFFF}!");
AmountBombs[playerid] = 0;
isbomb2[playerid] = 0;
}
if(isbomb3[playerid] == 1)
{
GetPlayerPos(playerid,X2,Y2,Z2);
bomb3 = CreatePlayerObject(playerid, 1264, X2-0.5,Y2,Z2-0.55,0,-1,-1,300.0);
bomb03 = SetTimerEx("t3",180000,0,"i",playerid);
SendClientMessage(playerid, 0xFFFFFFFF, "Your bomb will explode in {FF1919}3 minutes{FFFFFF}!");
SendClientMessage(playerid, 0xFFFFFFFF, "If you want to explode it faster then use {FF1919}/kaboom{FFFFFF}!");
AmountBombs[playerid] = 0;
isbomb3[playerid] = 0;
}
if(isbomb4[playerid] == 1)
{
GetPlayerPos(playerid,X2,Y2,Z2);
bomb4 = CreatePlayerObject(playerid, 345, X2-0.5,Y2,Z2-0.9,0,-1,-1,300.0);
bomb04 = SetTimerEx("t4",180000,0,"i",playerid);
SendClientMessage(playerid, 0xFFFFFFFF, "Your bomb will explode in {FF1919}3 minutes{FFFFFF}!");
SendClientMessage(playerid, 0xFFFFFFFF, "If you want to explode it faster then use {FF1919}/kaboom{FFFFFF}!");
AmountBombs[playerid] = 0;
isbomb4[playerid] = 0;
}
}
return 1;
}
CMD:detonate(playerid,params[])
{
if(IsValidPlayerObject(playerid,bomb))
{
KillTimer(bomb0);
CreateExplosion(X2,Y2,Z2,11,10.0);
DestroyPlayerObject(playerid,bomb);
isbomb[playerid] = 0;
}
else
if(IsValidPlayerObject(playerid,bomb1))
{
KillTimer(bomb01);
CreateExplosion(X2,Y2,Z2,5,150.0);
DestroyPlayerObject(playerid,bomb1);
isbomb1[playerid] = 0;
}
else
if(IsValidPlayerObject(playerid,bomb2))
{
KillTimer(bomb02);
CreateExplosion(X2,Y2,Z2,2,300.0);
DestroyPlayerObject(playerid,bomb2);
isbomb2[playerid] = 0;
}
else
if(IsValidPlayerObject(playerid,bomb3))
{
KillTimer(bomb03);
CreateExplosion(X2,Y2,Z2,6,1500.0);
DestroyPlayerObject(playerid,bomb3);
isbomb3[playerid] = 0;
}
else
if(IsValidPlayerObject(playerid,bomb4))
{
KillTimer(bomb04);
CreateExplosion(X2,Y2,Z2,7,3000000.0);
DestroyPlayerObject(playerid,bomb4);
isbomb4[playerid] = 0;
}
return 1;
}