oscar-broman / samp-weapon-config

A more consistent and responsive damage system with many new features
Apache License 2.0
93 stars 83 forks source link

Open MP compatability #264

Closed PazzOnee closed 1 year ago

PazzOnee commented 1 year ago

https://github.com/openmultiplayer/open.mp/issues/640

Read this, at the end, then reproduce and see

`forward WC_PlayerDeathRespawn(playerid); public WC_PlayerDeathRespawn(playerid) { if (!s_IsDying[playerid]) { return; }

s_IsDying[playerid] = false;

if (!OnPlayerDeathFinished(playerid, true)) {
    UpdateHealthBar(playerid);
    SetFakeFacingAngle(playerid, _);
    FreezeSyncPacket(playerid, .toggle = false);

    return;
}

s_IsDying[playerid] = true;
s_TrueDeath[playerid] = false;

if (IsPlayerInAnyVehicle(playerid)) {
    new Float:x, Float:y, Float:z;
    GetPlayerPos(playerid, x, y, z);
    SetPlayerPos(playerid, x, y, z);
}

SetPlayerVirtualWorld(playerid, WC_DEATH_WORLD);
SetFakeFacingAngle(playerid, _);
TogglePlayerSpectating(playerid, true); // <<<<<<<<<<<<<<<<<<<<<<
TogglePlayerSpectating(playerid, false); // <<<<<<<<<<<<<<<<<<<<<<
//When i replace TogglePlayerSpectating with SpawnPlayer, then will be fixed

}`

PazzOnee commented 1 year ago

It's open mp issue