a small question - 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: a small question (
/showthread.php?tid=364925)
a small question - Jarnu - 01.08.2012
i made a nuke command.. which creates explode..
but...
i want to know that if the
other player dies will it give score to the player who used nuke command?
if
No then how can i do it?
Re: a small question -
XStormiest - 01.08.2012
hmmm
pawn Код:
new Float: Health, v;
v = 0;
forreach(Player,i)
{
GetPlayerHealth(i,Health);
if(Health == 0)
{
v++;
SetPlayerScore(playerid,GetPlayerScore(playerid)+v);
}
}
Re: a small question - Jarnu - 01.08.2012
its foreach i guess :S .. fail type gave me error.
Re: a small question -
XStormiest - 01.08.2012
yeah sorry
fixed
pawn Код:
new Float: Health, v;
new Float:X,Float:Y,Float:Z;
GetPlayerPos(playerid,X,Y,Z);
v = 0;
foreach(Player,i)
{
GetPlayerHealth(i,Health);
if(Health == 0)
{
if(IsPlayerInRangeOfPoint(i, 40, X,Y,Z) )
{
v++;
SetPlayerScore(playerid,GetPlayerScore(playerid)+v);
}
}
}
add this to your command