dimachepul
Новичок
Собственно проблема в том, что игрок лежит с 0 хп на полу для всех, а на самом деле он сам бегает с 0 хп и не умерает.
Немогу понять из за чего такое происходит...
Паблик OnPlayerDeath
Немогу понять из за чего такое происходит...
Паблик OnPlayerDeath
PHP:
public OnPlayerDeath(playerid, killerid, reason)
{
if(PlayerInfo[playerid][pLogin] == 0) SCM(playerid, COLOR_LIGHTRED, "Íåîáõîäèìî çàëîãèíèòñÿ"),KickWithMessage(playerid);
//if(killerid == playerid) KickWithMessage(playerid);
ResetPlayerWeapons(playerid);
plafk[playerid] = -2;
SendDeathMessage(killerid, playerid, reason);
string[0] = 0;
//PlayerInfo[killerid][pMoney] += 1000;
//SCM(killerid, COLOR_GREEN, "?? ????? ??????. ??? ????? ????? ??????? 1000$");
PlayerInfo[playerid][pDeath]++;
SetPlayerScore(killerid, PlayerInfo[killerid][pKills]);
UpdateStats(killerid);
if(PlayerTotalKills[playerid] >= 5 && PlayerTotalKills[playerid] >= 20)
{
format(string, 120, "{ff9900}Èãðîê {ccff00}%s[%d] {ff9900}ïðåðâàë ñåðèþ óáèéñòâ èãðîêà {ccff00}%s[%d]", GN(killerid), killerid, GN(playerid), playerid);
SendClientMessageToAll(COLOR_RED, string);
}
PlayerTotalKills[playerid] = 0;
if(killerid != INVALID_PLAYER_ID)
{
PlayerInfo[killerid][pKills]++;
format(string, sizeof(string), "Óáèò èãðîêîì: %s", GN(killerid));
SetPlayerChatBubble(playerid, string, 0x0fff00FF, 30.0, 5000);
format(string, sizeof(string), "Óáèë èãðîêà: %s", GN(playerid));
SetPlayerChatBubble(killerid, string, 0x34c924FF, 30.0, 5000);
format(string,sizeof(string),"Killed by %s",GN(killerid));
GameTextForPlayer(playerid,string,3000,5);
if(PlayerInfo[playerid][pZone] == 2)
{
SetPlayerHealth(killerid, 45);
}
else if(PlayerInfo[playerid][pZone] == 3)
{
SetPlayerHealth(killerid, 45);
}
else if(PlayerInfo[playerid][pZone] == 14)
{
SetPlayerHealth(killerid, 100);
}
else if(PlayerInfo[playerid][pZone] == 15)
{
SetPlayerHealth(killerid, 100);
}
else if(PlayerInfo[playerid][pZone] == 16)
{
SetPlayerHealth(killerid, 100);
}
PlayerTotalKills[killerid]++;
if(PlayerTotalKills[killerid] <= 20)
{
format(string,sizeof string,"%d/20 Kill",PlayerTotalKills[killerid]);
GameTextForPlayer(killerid,string,3000, 1);
switch(PlayerTotalKills[killerid])
{
case 5,10,15,20:
{
format(string, 120, "{ff9900}Èãðîê {ccff00}%s[%d] {ccff00}ñîâåðøèë ñåðèþ óáèéñòâ {ccff00}[%d/20]", GN(killerid), killerid,PlayerTotalKills[killerid]);
SendClientMessageToAll(COLOR_LIGHTRED, string);
}
}
}
}
return true;
}
Чтобы видеть скрытое содержание Зарегистрируйтесь на форуме!
Последнее редактирование:
