SA-MP Forums

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

Reply
 
Thread Tools Display Modes
Old 13/09/2011, 03:35 PM   #1
BigAl
Huge Clucker
 
Join Date: Oct 2010
Posts: 383
Reputation: 13
Post Kill/Death Textdraw

How could I make this... please could anyone help? I know how to make the textdraw and stuff... but how do i make it display the players kills and deaths? O.o


Thanks in advance...
__________________
My work
Drift/Stunt/Dm/Freeroam server
Mafia Vs Police
BigAl is offline   Reply With Quote
Old 13/09/2011, 03:36 PM   #2
Tigerbeast11
Gangsta
 
Join Date: Aug 2009
Posts: 771
Reputation: 2
Default Re: Kill/Death Textdraw

Script Request Thread
Tigerbeast11 is offline   Reply With Quote
Old 13/09/2011, 03:47 PM   #3
Improvement™
Big Clucker
 
Improvement™'s Avatar
 
Join Date: Aug 2011
Posts: 131
Reputation: 9
Default Re: Kill/Death Textdraw

Use the OnPlayerDeath Callback and use the playerid, killerid, reason parameters. Also use the GetPlayerName function, from the playerid & killerid. This is all I can help you with right now, as you mentioned you know how to make textdraws.

Hope this helps,

Kind Regards,
Improvement™
__________________
Still A Secret!

Improvement™ is offline   Reply With Quote
Old 13/09/2011, 04:35 PM   #4
Wesley221
High-roller
 
Wesley221's Avatar
 
Join Date: Apr 2011
Posts: 1,564
Reputation: 714
Default Re: Kill/Death Textdraw

pawn Code:
new Kills[MAX_PLAYERS];
new Deaths[MAX_PLAYERS];

OnPlayerDeath
Kills[killerid]++;
Deaths[playerid]++;
new PIDstring[50], TIDstring[50];
format(PIDstring, sizeof PIDstring, "Kills: %i Deaths: %i"Kills[playerid], Deaths[playerid]);
format(TIDstring, sizeof TIDstring, "Kills: %i Deaths: %i"Kills[killerid], Deaths[killerid]
TextDrawSetString(Textdraw[playerid], PIDstring);
TextDrawSetString(Textdraw[killerid], TIDstring);
Add all of this to OnPlayerDeath except the variables, those need to be globa.
You dont need a timer to change the textdraws, just change the string like i did onplayerdeath. And if you still need help, u got my msn
__________________
yes
Wesley221 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
Kill/Death Ratio and amount stats cozza123456 Help Archive 1 30/03/2010 08:12 AM
[Include] [INC]KIll Death Admin - ReVo_ ReVo_ Includes 6 02/01/2010 06:02 PM
[HELP] Need help - kill/death textdraw Striker_Moe Help Archive 9 01/01/2010 11:47 PM
Death/kill textdraw help. Striker_Moe Help Archive 6 18/12/2009 01:33 PM
Need some help with this formula to calculate kill death ratio Celson Help Archive 5 18/03/2009 12:35 PM


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


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