25.04.2011, 08:16
I dont know why doesnt this work.. its a simple bare FS, and its should show if killer is 1, it should show a SendDeathMessage that he is the killer. this is just an example..
pawn Код:
#include <a_samp>
#include <core>
#include <float>
#pragma tabsize 0
new killer[MAX_PLAYERS];
main()
{
print("\n----------------------------------");
print(" Bare Script\n");
print("----------------------------------\n");
}
public OnPlayerCommandText(playerid, cmdtext[])
{
new idx;
new cmd[256];
cmd = strtok(cmdtext, idx);
if(strcmp(cmd, "/kill", true) == 0)
{
killer[playerid] = 1;
SetPlayerHealth(playerid,0.0);
return 1;
}
return 0;
}
public OnPlayerDeath(playerid, killerid, reason)
{
if(killer[killerid] == 1)
{
SendDeathMessage(killerid,playerid, reason); // this doesnt show up
}
return 1;
}
// other stuff