How can i know in the script when the player kills someone..?
#1

I have this script for if you die, but i want to know how i can know who i have killed and whith which weapon..

new kname[128];
new string[128];
GetPlayerName(killerid, kname, sizeof(kname));
format(string, sizeof(string), ">> %s has killed you.", kname);
SendDeathMessage(killerid, playerid, reason);
PlayerInfo[playerid][Deaths] += 1;
SendClientMessage(playerid, COLOR_DARKRED, string);
Reply
#2

Use this, and cases for the reason (according to the wiki, the reason is the weapon of which killed the player)

pawn Код:
public OnPlayerDeath(playerid, killerid, reason);
Reply
#3

Quote:
Originally Posted by Ihsan_Cingisiz
Посмотреть сообщение
I have this script for if you die, but i want to know how i can know who i have killed and whith which weapon..

new kname[128];
new string[128];
GetPlayerName(killerid, kname, sizeof(kname));
format(string, sizeof(string), ">> %s has killed you.", kname);
SendDeathMessage(killerid, playerid, reason);
PlayerInfo[playerid][Deaths] += 1;
SendClientMessage(playerid, COLOR_DARKRED, string);
I'm %100 percent sure you copyed that because if you made it you would no what these things do.
Reply
#4

Quote:
Originally Posted by [BADBOY]
Посмотреть сообщение
I'm %100 percent sure you copyed that because if you made it you would no what these things do.
Agreed, i meant to mention that in my first post lol ¬¬
Reply
#5

And please make your strings smaller. You dont need 128 strings for sentences that has 20(-) letters
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)