Who killed Who script. really need help - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Who killed Who script. really need help (
/showthread.php?tid=270232)
Who killed Who script. really need help -
MeNMyselv - 19.07.2011
hey guyz,
i need a script that says who killed who with what weapon like this:
http://imageshack.us/photo/my-images/580/fakedeath.jpg/
Only this above is a fakedeath command on my server.
This is what much servers have so yeah...
Sorry if bad English but im Dutch.
THNX for interest and maybe helping
Re: Who killed Who script. really need help -
HyperZ - 19.07.2011
pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{
new name[MAX_PLAYER_NAME];
new string[256];
new deathreason[20];
GetPlayerName(playerid, name, sizeof(name));
GetWeaponName(reason, deathreason, 20);
if (killerid == INVALID_PLAYER_ID)
{
switch (reason)
{
case WEAPON_DROWN:
{
format(string, sizeof(string), "*** %s drowned.)", name);
}
default:
{
if (strlen(deathreason) > 0)
{
format(string, sizeof(string), "*** %s died. (%s)", name, deathreason);
}
else
{
format(string, sizeof(string), "*** %s died.", name);
}
}
}
}
else
{
new killer[MAX_PLAYER_NAME];
GetPlayerName(killerid, killer, sizeof(killer));
if (strlen(deathreason) > 0)
{
format(string, sizeof(string), "*** %s killed %s. (%s)", killer, name, deathreason);
}
else
{
format(string, sizeof(string), "*** %s killed %s.", killer, name);
}
SendClientMessageToAll(-1, string);
}
return 1;
}
Re: Who killed Who script. really need help -
MeNMyselv - 19.07.2011
@Russell_
i get this error:
D:\Documents and Settings\ben\Mijn documenten\SAMP Server\gamemodes\LSF4A.pwn(451) : warning 217: loose indentation
line:
Код:
SendClientMessageToAll(-1, string);
idk how to fix it
Re: Who killed Who script. really need help -
MeNMyselv - 19.07.2011
okay found it there was 1 tab to much at that line

@Russull_
THNX for helping
Re: Who killed Who script. really need help -
HyperZ - 19.07.2011
You're Welcome.
Re: Who killed Who script. really need help -
MeNMyselv - 19.07.2011
@Russell_
i have only one thing.
i just tested the script and it works only it is a clientmessage and i mean when someone kills another that theres on the right of the screen a thing like this:
http://imageshack.us/photo/my-images/580/fakedeath.jpg/
Re: Who killed Who script. really need help -
Runedog48 - 19.07.2011
public OnPlayerDeath(playerid, killerid, reason)
{
SendDeathMessage(killerid, playerid, reason);
return 1;
}