27.11.2011, 19:13
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 );
}
+ 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.