[Tutorial] Save, load and set player position - using y_ini
#3

pawn Код:
public OnPlayerSpawn( playerid )
{
    if ( PosX[ playerid ] != 0 && PosY[ playerid ] != 0 && PosZ[ playerid ] != 0 )
    {
        SetPlayerPos( playerid, PosX[ playerid ], PosY[ playerid ], PosZ[ playerid ] );
        SetPlayerFacingAngle( playerid, Angle[ playerid ] );
        SendClientMessage( playerid, -1, "welcome to your last position" );
    }
    return ( 1 );
}
This would cause loading the position every spawn(even after death).
+ You don't clear the variables:
Player 0 loads his data, and disconnects. A newbie connects with ID 0, and gets spawned to the position.
Reply


Messages In This Thread
Save, load and set player position - using y_ini - by SmiT - 27.11.2011, 12:18
Re: Save, load and set player position - using y_ini - by SantarioLeone - 27.11.2011, 18:10
Re: Save, load and set player position - using y_ini - by wups - 27.11.2011, 19:13
Re: Save, load and set player position - using y_ini - by RepzThat - 27.11.2011, 20:05
Re: Save, load and set player position - using y_ini - by SmiT - 28.11.2011, 12:52
Re: Save, load and set player position - using y_ini - by SantarioLeone - 29.11.2011, 17:20
Re: Save, load and set player position - using y_ini - by dmng825 - 31.12.2011, 16:08
Re: Save, load and set player position - using y_ini - by Zom3ie - 31.12.2011, 20:41
Re: Save, load and set player position - using y_ini - by dmng825 - 02.01.2012, 12:16
Re: Save, load and set player position - using y_ini - by maxmax1 - 17.02.2012, 15:22
Re: Save, load and set player position - using y_ini - by Joe Vagos - 15.07.2012, 16:54
Re: Save, load and set player position - using y_ini - by Michael_Cuellar - 02.08.2012, 19:13
Re: Save, load and set player position - using y_ini - by rokasma - 07.11.2012, 14:15
Re: Save, load and set player position - using y_ini - by x96664 - 14.11.2012, 19:04
Re: Save, load and set player position - using y_ini - by Jesseding - 14.11.2012, 20:59
Re: Save, load and set player position - using y_ini - by jstowe96 - 24.11.2012, 01:16
Re: Save, load and set player position - using y_ini - by Crypt - 24.11.2012, 06:04
Re: Save, load and set player position - using y_ini - by jstowe96 - 24.11.2012, 11:38
Re: Save, load and set player position - using y_ini - by Blademaster680 - 15.07.2013, 21:45
Re : Save, load and set player position - using y_ini - by mirou123 - 23.08.2013, 19:29
Re: Save, load and set player position - using y_ini - by Ramms - 07.02.2014, 16:42
Re: Save, load and set player position - using y_ini - by xPirate - 05.04.2014, 12:13
Re: Save, load and set player position - using y_ini - by biker122 - 05.04.2014, 13:18
Re: Save, load and set player position - using y_ini - by xPirate - 05.04.2014, 14:26
Re: Save, load and set player position - using y_ini - by GrandTA - 20.06.2017, 15:39
Re: Save, load and set player position - using y_ini - by 2xRichard - 16.07.2017, 15:46
Re: Save, load and set player position - using y_ini - by beastmaster - 19.07.2018, 07:57
Re: Save, load and set player position - using y_ini - by CodeStyle175 - 19.07.2018, 08:51
Re: Save, load and set player position - using y_ini - by WilliamVN - 21.07.2018, 04:02
Re: Save, load and set player position - using y_ini - by DerickClark - 21.07.2018, 04:19
Re: Save, load and set player position - using y_ini - by beastmaster - 25.07.2018, 08:59
Re: Save, load and set player position - using y_ini - by DerickClark - 26.07.2018, 06:56
Re: Save, load and set player position - using y_ini - by beastmaster - 26.07.2018, 11:38

Forum Jump:


Users browsing this thread: 1 Guest(s)