Players doesn't die "properly" -
Luka P. - 09.10.2010
I don't know what's the problem, but sometimes players doesn't die "properly". Someone kills them, and it is visible that they are death on the "death list", but they can still move with 0hp and others see them lying without health.
I've already set instagib variable to 1, but it doesn't helps.
Re: Players doesn't die "properly" -
SampStunta - 10.10.2010
Could you please upload your OnPlayerDeath line using the Pawn tags.
Or please do so with the line the death thing is coming from.
Pawn tags:
which is [ pawn] [/pawn] (Without the space.)
Re: Players doesn't die "properly" -
Luka P. - 10.10.2010
It is unique script.
pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{
if(IsPlayerInGroup(killerid))
{
new buffer[32];
GetPVarString(killerid, "Group Name", buffer, sizeof(buffer));
if(buffer[0] != '\0' && buffer[1] != '\0')
{
SetGroupScore(buffer, GetGroupScore(buffer) + 1);
}
}
SendDeathMessage(killerid, playerid, reason);
GivePlayerMoneyEx(killerid, GetPlayerMoneyEx(playerid));
SetPVarInt(killerid, "Kills", GetPVarInt(killerid, "Kills") + 1);
SetPVarInt(playerid, "Deaths", GetPVarInt(playerid, "Deaths") + 1);
SetPlayerScore(killerid, GetPlayerScore(killerid) + 1);
SavePlayerData(playerid);
SavePlayerData(killerid);
if(IsPlayerConnected(killerid) && killerid != playerid && killerid != -1)
{
for(new i=0; i < MAX_PLAYERS; i++)
{
if(GetPVarType(i, "Bounty On") == PLAYER_VARTYPE_INT && GetPVarInt(i, "Bounty On") == playerid)
{
GivePlayerMoneyEx(killerid, GetPVarInt(i, "Bounty Value"));
new string[128], playerName[MAX_PLAYER_NAME], killerName[MAX_PLAYER_NAME];
GetPlayerName(playerid, playerName, sizeof(playerName));
GetPlayerName(killerid, killerName, sizeof(killerName));
format(string, sizeof(string), "SERVER: Player %s has killed wanted player %s and got a reward of $%i.", killerName, playerName, GetPVarInt(i, "Bounty Value"));
SendClientMessageToAll(COLOR_RED, string);
DeletePVar(i, "Bounty On");
DeletePVar(i, "Bounty Value");
}
}
}
TextDrawHideForPlayer(playerid, txtTimeDisp);
TextDrawHideForPlayer(playerid, LocationTextdraw[playerid]);
TextDrawHideForPlayer(playerid, WebsiteTextdraw);
TextDrawHideForPlayer(playerid, BoxTextdraw);
if(gPlayerUsingLoopingAnim[playerid])
{
gPlayerUsingLoopingAnim[playerid] = 0;
}
return 1;
}
Re: Players doesn't die "properly" -
SampStunta - 10.10.2010
Have you used the search bar at all?
Re: Players doesn't die "properly" -
Luka P. - 10.10.2010
Yep
The message you have entered is too short. Please lengthen your message to at least 8 characters.
Re: Players doesn't die "properly" -
New_Player[USW] - 10.10.2010
Hmmm....this might be a SA-MP glitch because when I also kill someone or someone kills me, I am still alive for more than 5 seconds.
Re: Players doesn't die "properly" -
SampStunta - 10.10.2010
It sometimes happens to me when I kill others.
Must be a 0.3b glitch?
Re: Players doesn't die "properly" -
Las Venturas CNR - 10.10.2010
It will still take a while for them to die... but OnPlayerDeath, add
pawn Код:
ClearAnimations(playerid);
Re: Players doesn't die "properly" -
Luka P. - 10.10.2010
Yeah, thanks! It helped.
Re: Players doesn't die "properly" - [03]Garsino - 10.10.2010
Put SetPlayerHealth(playerid, 100.0); at the
end of OnPlayerDeath. Works every time!