18.05.2018, 08:48
Quote:
It's a good idea but you should really hook OnPlayerDisconnect() and do your clean up work automatically.
A definite problem area is in this function. Код:
stock DeathSequenceInitial(playerid) { DeathSeq[playerid][isdead] = true; DeathSeq[playerid][skinid] = GetPlayerSkin(playerid); GetPlayerPos(playerid, DeathSeq[playerid][deadpos][0], DeathSeq[playerid][deadpos][1], DeathSeq[playerid][deadpos][2]); GetPlayerFacingAngle(playerid, DeathSeq[playerid][deadpos][3]); // Potential problem here - How do you know this function is not called again before the player actually spawns? // Don't use this function without actually spawning the player immediately afterwards as a rule of thumb // Especially in an include SetSpawnInfo(playerid, NO_TEAM, DeathSeq[playerid][skinid], DeathSeq[playerid][deadpos][0], DeathSeq[playerid][deadpos][1], DeathSeq[playerid][deadpos][2], DeathSeq[playerid][deadpos][3], 0, 0, 0, 0, 0, 0 ); TogglePlayerSpectating(playerid, true); TogglePlayerSpectating(playerid, false); // Might cause problems with AC's / Auto health reset etc SetPlayerHealth(playerid, 9999); return 1; } |
Also it would've been better if the variable's names weren't as traditional as always, i can imagine having tons of players with a variable called skinid and whatnot, but i love it, it's a very cool concept and just needs a littttle more work over it, would've been perfect, over all you already got my rep hope to see you updating this with a final version.