Problem with function - 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: Problem with function (
/showthread.php?tid=608764)
Problem with function -
Mijata - 04.06.2016
fixed
Re: Problem with function -
CSLangdale - 04.06.2016
Maybe because it's setting the score and giving the money in the explosion timer so it's counting it as the player that gets hit by the explosion gets the score and money?
Not sure how you could fix it though as if it is that maybe you could create a variable for bomb creator or something so if bomb kills anyone it gives score and money to bomb creator...
Re: Problem with function -
Mijata - 04.06.2016
Can u help me to create this
Re: Problem with function -
blanic - 04.06.2016
https://sampforum.blast.hk/showthread.php?tid=608744
Re: Problem with function -
Mijata - 04.06.2016
////
Re: Problem with function -
Dayrion - 04.06.2016
Did you try this :
PHP код:
CMD:bombplant(playerid, params[])
{
if(IsPlayerInDynamicCP(playerid, PlantbombCP) && (gTeam[playerid] == T1 && (BombPlanted == 0)))
{
ApplyAnimation(playerid, "BOMBER", "BOM_Plant", 4.0, 0, 0, 0, 0, 0); // Place Bomb
Bomb = CreateDynamicObject(1654, 211.78671, 1824.10706, 6.43200, -87.00000, 0.00000, 0.00000);
BombExplodeTimer = SetTimerEx("BombExplodes", 110000, false, "i", playerid);
GameTextForAll("~r~Bomb Has Been Planted!", 4000, 3);
BombPlanted = 1;
}
else if(IsPlayerInDynamicCP(playerid, PlantbombCP) && (gTeam[playerid] == T1 && (BombPlanted != 0))) return SendClientMessage(playerid, COLOR_RED, "The bomb is already planted!");
return 1;
}
Re: Problem with function -
Mijata - 04.06.2016
Thanks rep+
Re: Problem with function -
Dayrion - 04.06.2016
No problem. Good luck for your project.