13.01.2017, 03:34
You can't stop the death, but a lot of servers does that system in another way...
Do something like that
In your hospital script place
OnPlayerDeath
OnPlayerSpawn
Now it's simple, if he accepts to death do
It would be good for making an Anticheat, but for those things only that would be really annoying x
Do something like that
Код:
enum death_system { Float:DX, Float:DY, Float:DZ, Float:DA, bool:Status }; new DeathInfo[MAX_PLAYERS][death_system];
Код:
if(!DeathInfo[playerid][Status])
Код:
new Float:x,Float:y,Float:z,Float:a; DeathInfo[playerid][DX] = x; DeathInfo[playerid][DY] = y; DeathInfo[playerid][DZ] = z; DeathInfo[playerid][DA] = a; DeathInfo[playerid][Status] = true;
Код:
if(DeathInfo[playerid][Status]) { SetPlayerPos(playerid,DeathInfo[playerid][DX],DeathInfo[playerid][DY],DeathInfo[playerid][DZ]); SetPlayerFacingAngle(playerid,DeathInfo[playerid][DA]); SetPlayerHealth(playerid,1.0); //Animation crack or something you would like to use }
Код:
if(DeathInfo[playerid][Status]) { DeathInfo[playerid][Status]=false; SetPlayerHealth(playerid,0); }