06.01.2011, 19:17
I'm having this issue with players joining the event and when they get killed by another player, they end up getting sent to the hospital instead of being sent back to where they were when they /join'ed the event. I want when they die, they go back to where they join'ed the event with their guns and whatever HP and Armor they had.
This is my OnPlayerDeath
Any other information that is needed, let me know.
This is my OnPlayerDeath
Код:
public OnPlayerDeath(playerid, killerid, reason) { // printf("OnPlayerDeath: playerid: %d, killerid: %d, reason: %s", playerid, killerid, reason); //debug ClearGuns(playerid); SetPlayerColor(playerid, TCOLOR_HOSPITAL); SetPlayerVirtualWorld(playerid, 0); PlayerInfo[playerid][pOnDuty] = 0; PlayerInfo[playerid][pBombs] = 0; PlayerInfo[playerid][pScope] = 0; PlayerInfo[playerid][pLocal] = 999; PlayerInfo[playerid][pVirtualWorld] = 0; PlayerInfo[killerid][pKills] += 1; CapturingTimer[playerid] = 0; STDPlayer[playerid] = 0; IsAtEvent[playerid] = 0; new name[MAX_PLAYER_NAME]; new killa[MAX_PLAYER_NAME]; new string[128]; new caller = Mobile[playerid]; GetPlayerName(playerid, name, sizeof(name)); GetPlayerName(killerid, killa, sizeof(killa));