08.10.2014, 03:56
Maybe you can improve this. If you knife someone from behind the damage says 0 (zero) and the killed guy gets desynced. I build a fix for that. Just call a respawn on the same position for the player.
Its good if you use:
//Call this after the zero damage event with the knife. I got some problems with calling this directly so i used a small timerdelay and put that in a "public".
The Player will be spawned without weapons, maybe you store them every time he get a new gun and give them back some time after the Spawn. 
Maybe you can upgrade that to:
OnPlayerKnifePlayer(playerid,targetid,Float:damage ,bool:instantkill) // Instantkill if it cause a zero damage and begins the desync.
OnPlayerKnifeRespawn(playerid) // called on spawn after the player got fixed against desync.
Its good if you use:
//Call this after the zero damage event with the knife. I got some problems with calling this directly so i used a small timerdelay and put that in a "public".
Код:
new Float:X,Float:Y,Float:Z,Float:Angle; GetPlayerPos(playerid,X,Y,Z); GetPlayerFacingAngle(playerid,Angle); SetSpawnInfo(playerid, 0, GetPlayerSkin(playerid), X,Y,Z, Angle, 0, 0, 0, 0, 0, 0); SpawnPlayer(playerid);

Maybe you can upgrade that to:
OnPlayerKnifePlayer(playerid,targetid,Float:damage ,bool:instantkill) // Instantkill if it cause a zero damage and begins the desync.
OnPlayerKnifeRespawn(playerid) // called on spawn after the player got fixed against desync.

