Got a problem with C4 - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Got a problem with C4 (
/showthread.php?tid=485749)
Got a problem with C4 -
Antoniohl - 05.01.2014
Actually it works perfect but it doesn't wont to explode, i have tried to increasing range but still doesn't work, Please help me' ASAP
Код:
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:X,Float:Y,Float:Z;
GetObjectPos(BombID[playerid],X,Y,Z);
DestroyDynamicObject(BombID[playerid]);
CreateExplosion(X,Y,Z,12,1);
BombID[playerid] = 0;
SetPlayerWeapons(playerid);
new killerid = GoChase[playerid];
if(IsPlayerInRangeOfPoint(killerid,50,X,Y,Z))
{
if(GoChase[playerid] == killerid)
{
if(PlayerInfo[killerid][pHeadValue] > 0)
{
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]++;
}
}
}
}
}
}
Re: Got a problem with C4 -
Antoniohl - 05.01.2014
Anyone can help me?
Re: Got a problem with C4 -
BlackSirrah239 - 06.01.2014
This works fine for me:
Код:
CreateExplosion(x, y, z, 7, 8);
Although that is a "huge" explosion according to
https://sampwiki.blast.hk/wiki/Explosion_List.
I noticed you use explosion 12, have you tried changing that? It might just be too small and not seen for some reason.
Re: Got a problem with C4 -
Antoniohl - 06.01.2014
still not working

i have tried to change it but still, nothing happens
Re: Got a problem with C4 -
Antoniohl - 06.01.2014
come on can anyone help me 'shit'