Explosions
#1

I've got trouble with this code, When the bomb goes off, the explosion is very small, though it's set to be alot bigger.

Any ideas?

pawn Код:
if(BombID[playerid] != 0)
        {
            if(GetPlayerWeapon(playerid) == 0)
            {
                if(!IsPlayerInAnyVehicle(playerid))
                {
                    ClearAnimations(playerid);
                    ApplyAnimation(playerid,"PED","bomber",4.0,0,0,0,0,0);
                }
                new Float:BX,Float:BY,Float:BZ;
                GetObjectPos(BombID[playerid],BX,BY,BZ);
                DestroyDynamicObject(BombID[playerid]);
                //CreateExplosion(X,Y,Z,6,10);
                CreateExplosion(BX, BY , BZ, 7, 1);
                //printf("Explosion Created");
                BombID[playerid] = 0;
                SetPlayerWeapons(playerid);
                new killerid = GoChase[playerid];
                if(IsPlayerInRangeOfPoint(killerid,3,BX,BY,BZ))
                {
                    if(GoChase[playerid] == killerid)
                    {
                        if(PlayerInfo[killerid][pHeadValue] > 0)
                        {
                            new string[128];
                            new price = PlayerInfo[killerid][pHeadValue];
                            new name[MAX_PLAYER_NAME];
                            new killa[MAX_PLAYER_NAME];
                            GetPlayerName(playerid, name, sizeof(name));
                            GetPlayerName(killerid, killa, sizeof(killa));
                            PlayerInfo[killerid][pCash] = PlayerInfo[killerid][pCash]-price/2;
                            GivePlayerMoney(killerid, -price/2);
                            PlayerInfo[playerid][pCash] = PlayerInfo[playerid][pCash]+price/2;
                            GivePlayerMoney(playerid, price/2);
                            format(string,128,"Hitman %s has fulfilled the contract on %s and collected $%d.",name,killa,price/2);
                            SendFamilyMessage(8, COLOR_YELLOW, string);
                            format(string,128,"You have been critically injured by a hitman and lost $%d.",price/2);
                            SendClientMessage(killerid, COLOR_YELLOW, string);
                            SetPlayerHealth(killerid, 0);
                            ClearContract(killerid);
                            GoChase[playerid] = 999;
                            PlayerInfo[playerid][pCHits]++;
                        }
                    }
                }
            }
Reply
#2

pawn Код:
CreateExplosion(BX, BY , BZ, 7, 10);
Changed the last value from 1 to 10.


https://sampwiki.blast.hk/wiki/CreateExplosion
Reply
#3

Its still the same, Picture of explosion:

Reply
#4

Quote:
Originally Posted by acade
Посмотреть сообщение
Its still the same, Picture of explosion:

Have a look here to see the types you can use:

https://sampwiki.blast.hk/wiki/Explosion_List
Reply
#5

N-e-v-e-r M-i-n-d
Reply
#6

That has exploded me, Not the bomb. Though the explosions are bigger.

I think it has something to do with the object, Would it be because it's a dynamic one?
Reply
#7

Quote:
Originally Posted by acade
Посмотреть сообщение
That has exploded me, Not the bomb. Though the explosions are bigger.

I think it has something to do with the object, Would it be because it's a dynamic one?
Oops right,sorry for that one.
I don't know if its because its dynamic,but I can not stop the issue,all lines seems fine to me.
So the only problem I can think of is the explosion type,you might set it wrong.
Reply
#8

Solved, Dynamic object co-ords can't be used for explosions.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)