SA-MP Forums

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

Reply
 
Thread Tools Display Modes
Old 30/12/2019, 01:01 PM   #11
Mugala
High-roller
 
Mugala's Avatar
 
Join Date: Nov 2012
Location: Georgia, Tbilisi
Posts: 1,161
Reputation: 73
Default Re: after player dies from shots, it shows "Splat" instead of the weapon shot at the player

try to commit suicide.
PHP Code:
forward OnPlayerTakeDamage(playeridissueridFloatamountweaponidbodypart);
public 
OnPlayerTakeDamage(playeridissueridFloatamountweaponidbodypart)
{
    
printf("%i | %f | %i | %i",issueridamountweaponidbodypart); 
__________________
Coding in 8 languages including Pawn, C#, C++ and SQL.
Available for hiring.

If you have a coding question or need an assistance in a code, just PM me.
If you want me to create something for you, here is a Discord Mugala#5651

Currently helping Community members in a coding.
Mugala is offline   Reply With Quote
Old 30/12/2019, 01:06 PM   #12
mems
Big Clucker
 
Join Date: Oct 2019
Posts: 66
Reputation: 0
Default Re: after player dies from shots, it shows "Splat" instead of the weapon shot at the player

so what i do is replace formats with printf?
mems is offline   Reply With Quote
Old 30/12/2019, 01:10 PM   #13
Mugala
High-roller
 
Mugala's Avatar
 
Join Date: Nov 2012
Location: Georgia, Tbilisi
Posts: 1,161
Reputation: 73
Default Re: after player dies from shots, it shows "Splat" instead of the weapon shot at the player

no, just add this line and try suicide, then check server.log or command window (if it's localhost/win)
__________________
Coding in 8 languages including Pawn, C#, C++ and SQL.
Available for hiring.

If you have a coding question or need an assistance in a code, just PM me.
If you want me to create something for you, here is a Discord Mugala#5651

Currently helping Community members in a coding.
Mugala is offline   Reply With Quote
Old 30/12/2019, 01:39 PM   #14
mems
Big Clucker
 
Join Date: Oct 2019
Posts: 66
Reputation: 0
Default Re: after player dies from shots, it shows "Splat" instead of the weapon shot at the player

sends this: 65535 | 4.950000 | 54 | 3

edit: sorry for late answer, i was having lunch xD
mems is offline   Reply With Quote
Old 30/12/2019, 01:48 PM   #15
Mugala
High-roller
 
Mugala's Avatar
 
Join Date: Nov 2012
Location: Georgia, Tbilisi
Posts: 1,161
Reputation: 73
Default Re: after player dies from shots, it shows "Splat" instead of the weapon shot at the player

agh, I noticed that in "else" logic, you have issuerid, instead of playerid.
PHP Code:
    else
    {
        
format(s36"%s -%.0f"weaponnameamount);
        
TextDrawSetString(TakeDamage[issuerid], s);
        
TextDrawShowForPlayer(issueridTakeDamage[issuerid]);
        
PlayerPlaySound(issuerid17802,0.0,0.0,0.0);
    } 
so change this with playerid.
__________________
Coding in 8 languages including Pawn, C#, C++ and SQL.
Available for hiring.

If you have a coding question or need an assistance in a code, just PM me.
If you want me to create something for you, here is a Discord Mugala#5651

Currently helping Community members in a coding.
Mugala is offline   Reply With Quote
Old 30/12/2019, 01:54 PM   #16
mems
Big Clucker
 
Join Date: Oct 2019
Posts: 66
Reputation: 0
Default Re: after player dies from shots, it shows "Splat" instead of the weapon shot at the player

but then after you kill the player with a weapon, the splat comes to the party
mems is offline   Reply With Quote
Old 30/12/2019, 03:11 PM   #17
coool
Gangsta
 
coool's Avatar
 
Join Date: Feb 2013
Location: Republic of Pakistan
Posts: 610
Reputation: 54
Default Re: after player dies from shots, it shows "Splat" instead of the weapon shot at the player

You have misunderstood something
Code:
format(s, 36, "%s - (Fist) -%.0f", issuername, amount); //The one who got damaged
format(s, 36, "%s - (Fist) +%.0f", pname, amount); //The one who damaged it
Issuer is the one who damages.
Player is the one who gets damage.
__________________
coool is offline   Reply With Quote
Old 30/12/2019, 03:20 PM   #18
mems
Big Clucker
 
Join Date: Oct 2019
Posts: 66
Reputation: 0
Default Re: after player dies from shots, it shows "Splat" instead of the weapon shot at the player

sorry, the code's right, it's just because i took it from someone else and the guy commented those two on wrong order so yeah.. xD
mems is offline   Reply With Quote
Old 30/12/2019, 05:29 PM   #19
mems
Big Clucker
 
Join Date: Oct 2019
Posts: 66
Reputation: 0
Default Re: after player dies from shots, it shows "Splat" instead of the weapon shot at the player

For some reason, when i type reloadfs <the filterscript>, it just doesn't work when i type it once. but when i close the samp-server.exe (which closes the server) and reopening it, it works beautifully, the takedamage thing on the right (might not have told you about that) and no splat textdraws when i kill someone with a gun... why does it happen ?
mems is offline   Reply With Quote
Old 30/12/2019, 10:11 PM   #20
mems
Big Clucker
 
Join Date: Oct 2019
Posts: 66
Reputation: 0
Default Re: after player dies from shots, it shows "Splat" instead of the weapon shot at the player

alright, so somehow it worked doing this trick after trying to find every single code that wasn't right, this is how i made it work.

1. Copied everything that the filterscript had: (variables, textdraws, public, stock functions)
2. Inserted everything copied to the gamemode carefully in order
3. it worked, why did i even make a third step...

it works good so far, tried /gmx command, still it's there working nice n good, will post if anything goes wrong
mems 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
[Tutorial] Creating a "Death Camera" spectating screen when a player dies. iGetty Tutorials 14 25/06/2015 10:21 AM
When player kill another player get MSG"You killed [NAME]" -I got problems with that script bustern Scripting Help 9 15/09/2013 06:40 PM
Player not connected-Invalid Player id and You can't goto to yourself. "Goto command" KurtAngle Scripting Help 4 28/08/2013 07:14 AM
Player "dies" but do not respawn. Lincoln.C Scripting Help 5 11/11/2011 07:22 PM
Is player talks, use OnePlayAnim(playerid,"PED","IDLE_CHAT",4.0,0,0,0,0,0); Ihsan_Cingisiz Help Archive 5 30/05/2010 04:26 PM


All times are GMT. The time now is 03:24 PM.


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