SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help

Reply
 
Thread Tools Display Modes
Old 15/11/2014, 01:50 PM   #1
Supermaxultraswag
Huge Clucker
 
Join Date: Aug 2014
Posts: 225
Reputation: 2
Default How to get shooter id

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 Code:
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;
}
Supermaxultraswag is offline   Reply With Quote
Old 15/11/2014, 01:52 PM   #2
DavidBilla
Huge Clucker
 
DavidBilla's Avatar
 
Join Date: Aug 2013
Location: Planet Earth
Posts: 304
Reputation: 35
Default Re: How to get shooter id

Issuerid = shooter id
__________________
DavidBilla is offline   Reply With Quote
Old 15/11/2014, 01:57 PM   #3
Supermaxultraswag
Huge Clucker
 
Join Date: Aug 2014
Posts: 225
Reputation: 2
Default Re: How to get shooter id

Quote:
Originally Posted by DavidBilla View Post
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;
}
Supermaxultraswag is offline   Reply With Quote
Old 15/11/2014, 01:59 PM   #4
DavidBilla
Huge Clucker
 
DavidBilla's Avatar
 
Join Date: Aug 2013
Location: Planet Earth
Posts: 304
Reputation: 35
Default Re: How to get shooter id

GivePlayerMoney(issuerid, 10)
__________________
DavidBilla is offline   Reply With Quote
Old 15/11/2014, 01:59 PM   #5
HY
Gangsta
 
HY's Avatar
 
Join Date: Sep 2014
Location: România.
Posts: 544
Reputation: 87
Default Re: How to get shooter id

pawn Code:
if(GetPlayerScore(issuerid) >= 100)
__________________
hi.
HY is offline   Reply With Quote
Old 15/11/2014, 02:02 PM   #6
Supermaxultraswag
Huge Clucker
 
Join Date: Aug 2014
Posts: 225
Reputation: 2
Default Re: How to get shooter id

Quote:
Originally Posted by DavidBilla View Post
GivePlayerMoney(issuerid, 10)
wtf, so simple? thank you
Supermaxultraswag is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[FilterScript] [FS] First Person Shooter - First Person Shooter in San Andreas (little buggy) SpiderPork Filterscripts 35 09/06/2014 03:51 PM
[Pedido] Car shooter iTzDemon Português/Portuguese 3 22/07/2013 09:04 PM
Car Shooter magnetec Scripting Help 4 08/07/2013 09:31 AM


All times are GMT. The time now is 01:08 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.