Returning to where you died
#3

Quote:
Originally Posted by Vlad64
Посмотреть сообщение
I have not tested this, but it should work.

Add this on top of the script, but below the includes

pawn Код:
new Float:DeathPosX[MAX_PLAYERS];
new Float:DeathPosY[MAX_PLAYERS];
new Float:DeathPosZ[MAX_PLAYERS];
new Died[MAX_PLAYERS];
Add this in the callback OnPlayerConnect

pawn Код:
Died[playerid] = 0;
Fast response! Thanks! Ill test out the code and ill reply if it worked!

Add this in the callback OnPlayerDeath

pawn Код:
GetPlayerPos(playerid,DeathPosX[playerid],DeathPosY[playerid],DeathPosZ[playerid]);
Died[playerid] = 1;
And finally, add this in the callback OnPlayerSpawn

pawn Код:
if(Died[playerid] == 1)
{
    SetPlayerPos(playerid,DeathPosX[playerid],DeathPosY[playerid],DeathPosZ[playerid]);
    Died[playerid] = 0;
}
Thanks! Ill test out the code and see if it worked then ill reply here!
Reply


Messages In This Thread
Returning to where you died - by yoran765 - 23.06.2013, 19:27
Re: Returning to where you died - by Vlad64 - 23.06.2013, 19:35
Re: Returning to where you died - by yoran765 - 23.06.2013, 19:40
Re: Returning to where you died - by yoran765 - 23.06.2013, 19:44
Re: Returning to where you died - by Vlad64 - 23.06.2013, 20:04
Re: Returning to where you died - by yoran765 - 23.06.2013, 20:07
Re: Returning to where you died - by Vlad64 - 23.06.2013, 20:15

Forum Jump:


Users browsing this thread: 1 Guest(s)