How to get shooter id - 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: How to get shooter id (
/showthread.php?tid=546408)
How to get shooter id -
Supermaxultraswag - 15.11.2014
public OnPlayerTakeDamage(playerid, issuerid, Float: amount, weaponid)
{
// i need to check here if shooter has more than 100 score. It has to be smth like that
Код HTML:
if (GetPlayerScore(playerid)>=100)
. As you see, I know how to check player who
took damage, but how do i check player who
give damage..
if(weaponid == 30) GivePlayerMoney(playerid, 10);
return 1;
}
Re: How to get shooter id -
DavidBilla - 15.11.2014
Issuerid = shooter id
Re: How to get shooter id -
Supermaxultraswag - 15.11.2014
Quote:
Originally Posted by DavidBilla
Issuerid = shooter id
|
umm... could you write me code?

i dont really understand...
public OnPlayerTakeDamage(playerid, issuerid, Float: amount, weaponid)
{
// checking here
if(weaponid == 30) GivePlayerMoney(playerid, 10);
return 1;
}
Re: How to get shooter id -
DavidBilla - 15.11.2014
GivePlayerMoney(issuerid, 10)
Re: How to get shooter id -
HY - 15.11.2014
pawn Код:
if(GetPlayerScore(issuerid) >= 100)
Re: How to get shooter id -
Supermaxultraswag - 15.11.2014
Quote:
Originally Posted by DavidBilla
GivePlayerMoney(issuerid, 10)
|
wtf, so simple?

thank you