How to get shooter id
#1

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;
}
Reply
#2

Issuerid = shooter id
Reply
#3

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;
}
Reply
#4

GivePlayerMoney(issuerid, 10)
Reply
#5

pawn Код:
if(GetPlayerScore(issuerid) >= 100)
Reply
#6

Quote:
Originally Posted by DavidBilla
Посмотреть сообщение
GivePlayerMoney(issuerid, 10)
wtf, so simple? thank you
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)