Scripting Help
#3

You can't stop the death, but a lot of servers does that system in another way...
Do something like that
Код:
enum death_system
{
        Float:DX,
        Float:DY,
        Float:DZ,
        Float:DA,
        bool:Status 
};
new DeathInfo[MAX_PLAYERS][death_system];
In your hospital script place
Код:
if(!DeathInfo[playerid][Status])
OnPlayerDeath
Код:
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;
OnPlayerSpawn
Код:
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
}
Now it's simple, if he accepts to death do
Код:
if(DeathInfo[playerid][Status])
{
DeathInfo[playerid][Status]=false;
SetPlayerHealth(playerid,0);
}
Quote:
Originally Posted by Lordzy
Посмотреть сообщение
I suggest you to work on server sided health system which will then help you to work on features like these.
It would be good for making an Anticheat, but for those things only that would be really annoying x
Reply


Messages In This Thread
Scripting Help - by Disorder - 13.01.2017, 01:44
Re: Scripting Help - by Lordzy - 13.01.2017, 02:00
Re: Scripting Help - by darkdrago - 13.01.2017, 03:34
Re: Scripting Help - by Lordzy - 13.01.2017, 06:06
Re: Scripting Help - by darkdrago - 13.01.2017, 13:00
Re: Scripting Help - by GoldenLion - 13.01.2017, 13:27
Re: Scripting Help - by darkdrago - 13.01.2017, 13:30

Forum Jump:


Users browsing this thread: 1 Guest(s)